Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-13110 - Manually grading random questions does not work. Fix than…

…ks to Ken Burres.
  • Loading branch information...
commit 2519a70a191c6998b847f39e4d973b835d670b7b 1 parent 5ed379d
tjhunt authored
3  question/type/questiontype.php
View
@@ -478,7 +478,8 @@ function print_question(&$question, &$state, $number, $cmoptions, $options) {
$commentlink = '';
if (isset($options->questioncommentlink)) {
$strcomment = get_string('commentorgrade', 'quiz');
- $commentlink = '<div class="commentlink">'.link_to_popup_window ($options->questioncommentlink.'?attempt='.$state->attempt.'&amp;question='.$question->id,
+ $question_to_comment = isset($question->randomquestionid) ? $question->randomquestionid : $question->id;
+ $commentlink = '<div class="commentlink">'.link_to_popup_window ($options->questioncommentlink.'?attempt='.$state->attempt.'&amp;question='.$question_to_comment,
'commentquestion', $strcomment, 450, 650, $strcomment, 'none', true).'</div>';
}
1  question/type/random/questiontype.php
View
@@ -212,6 +212,7 @@ function get_actual_response(&$question, &$state){
function print_question(&$question, &$state, &$number, $cmoptions, $options) {
global $QTYPES;
$wrappedquestion = &$state->options->question;
+ $wrappedquestion->randomquestionid = $question->id;
$QTYPES[$wrappedquestion->qtype]
->print_question($wrappedquestion, $state, $number, $cmoptions, $options);
}
Please sign in to comment.
Something went wrong with that request. Please try again.