require_once '../classes/noteutils.class.php'; $userID = check_var('userID', 'REQUEST', true, false, true); $paperID = check_var('paperID', 'REQUEST', true, false, true); // Does the paper exist? if (!Paper_utils::paper_exists($paperID, $mysqli)) { $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email')); $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true); } // Does the student exist? if (!UserUtils::userid_exists($userID, $mysqli)) { $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email')); $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true); } if (isset($_POST['submit'])) { if ($_POST['note_id'] == '' or $_POST['note_id'] == '0') { StudentNotes::add_note($userID, $_POST['note'], $paperID, $userObject->get_user_ID(), $mysqli); } else { StudentNotes::update_note($_POST['note'], $_POST['note_id'], $mysqli); } ?> <!DOCTYPE html> <html> <head><title><?php echo $string['note']; ?> </title> <?php if ($_POST['calling'] == 'class_totals') { ?> <script> function closeWindow() {
// Does the paper exist? if (!Paper_utils::paper_exists($paperID, $mysqli)) { $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email')); $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true); } // Does the student exist? if (!UserUtils::userid_exists($userID, $mysqli)) { $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email')); $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true); } if (isset($_POST['submit'])) { if ($_POST['note_id'] == '' or $_POST['note_id'] == '0') { $note_msg = trim($_POST['note']); if ($note_msg != '') { // Check we are not saving nothing. StudentNotes::add_note($userID, $note_msg, $paperID, $userObject->get_user_ID(), $mysqli); } } else { StudentNotes::update_note($_POST['note'], $_POST['note_id'], $mysqli); } ?> <!DOCTYPE html> <html> <meta http-equiv="content-type" content="text/html;charset=<?php echo $configObject->get('cfg_page_charset'); ?> " /> <head><title><?php echo $string['note']; ?> </title>