Exemplo n.º 1
0
    });
  </script>
</head>

<body>
<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post" name="theform" id="theform">
<?php 
    $disabled = '';
    $note_details = array('note_id' => 0, 'note' => '');
    $student_details = UserUtils::get_user_details($userID, $mysqli);
    if (isset($_GET['paperID'])) {
        echo "<input type=\"hidden\" name=\"paperID\" value=\"" . $_GET['paperID'] . "\" />\n";
        $note_details = StudentNotes::get_note($_GET['paperID'], $userID, $mysqli);
        echo '<strong>' . $student_details['title'] . ' ' . $student_details['surname'] . ', ' . $student_details['initials'] . '</strong><br />';
    } else {
        $student_modules = UserUtils::load_student_modules($userID, $mysqli);
        $current_year = date_utils::get_current_academic_year();
        $module_IDs = array();
        if (isset($student_modules[$current_year])) {
            foreach ($student_modules[$current_year] as $moduleID => $module_code) {
                $module_IDs[] = $moduleID;
            }
        }
        echo $string['papername'] . " <select name=\"paperID\" id=\"paperID\" required>\n<option value=\"\"></option>\n";
        if (count($module_IDs) > 0) {
            // Look up summative papers that have been live in the last 28 days.
            $result = $mysqli->prepare("SELECT DISTINCT properties.property_id, paper_title FROM properties, properties_modules WHERE properties.property_id = properties_modules.property_id AND idMod IN (" . implode(',', $module_IDs) . ") AND paper_type = '2' AND end_date > DATE_SUB(NOW(), INTERVAL 28 DAY) AND deleted IS NULL ORDER BY paper_title");
            $result->execute();
Exemplo n.º 2
0
// You should have received a copy of the GNU General Public License
// along with Rogō.  If not, see <http://www.gnu.org/licenses/>.
/**
* 
* @author Simon Wilkinson
* @version 1.0
* @copyright Copyright (c) 2014 The University of Nottingham
* @package
*/
require '../../include/staff_auth.inc';
require '../../include/errors.inc';
require '../../classes/noteutils.class.php';
require '../../classes/reviews.class.php';
$userID = check_var('userID', 'GET', true, false, true);
$paperID = check_var('paperID', 'GET', true, false, true);
if ($userObject->has_role('External Examiner')) {
    // Security: Check the external can access this paper.
    if (!ReviewUtils::is_external_on_paper($userObject->get_user_ID(), $paperID, $mysqli)) {
        echo "<div style=\"padding:10px\">" . $string['pagenotfound'] . "</div>\n";
        $mysqli->close();
        exit;
    }
}
$details = StudentNotes::get_note($paperID, $userID, $mysqli);
if ($details === false) {
    echo "<div style=\"padding:10px\">" . $string['err'] . "</div>\n";
} else {
    echo "<div style=\"padding:10px\">" . $details['note'] . "</div>\n";
    echo "<div style=\"padding:10px\"><em>" . $details['author_title'] . " " . $details['author_initials'] . " " . $details['author_surname'] . " - " . $details['date'] . "</em></div>\n";
}
$mysqli->close();