/**
* This page allows the teacher to enter a manual grade for a particular question.
* This page is expected to only be used in a popup window.
- * *
+ *
+ * @package mod
+ * @subpackage quiz
+ * @copyright gustav delius 2006
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package quiz
*/
require_once('../../config.php');
$attemptobj->question_print_comment_fields($questionid, 'response');
?>
<div>
- <input type="hidden" name="attempt" value="<?php echo $attemptobj->get_uniqueid(); ?>" />
+ <input type="hidden" name="attempt" value="<?php echo $attemptobj->get_attemptid(); ?>" />
<input type="hidden" name="question" value="<?php echo $questionid; ?>" />
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
</div>
// Show a link to the comment box only for closed attempts
if ($attempt->timefinish && has_capability('mod/quiz:grade', $context)) {
- $options->questioncommentlink = '/mod/quiz/comment.php';
+ $options->questioncommentlink = new moodle_url('/mod/quiz/comment.php', array('attempt' => $attempt->id));
}
// Whether to display a response history.
if (!empty($options->questioncommentlink)) {
$strcomment = get_string('commentorgrade', 'quiz');
- $link = new moodle_url("$options->questioncommentlink?attempt=$state->attempt&question=$actualquestionid");
+ $link = new moodle_url($options->questioncommentlink, array('question' => $actualquestionid));
$action = new popup_action('click', $link, 'commentquestion', array('height' => 480, 'width' => 750));
$commentlink = $OUTPUT->container($OUTPUT->action_link($link, $strcomment, $action), 'commentlink');
}