Skip to content

Commit

Permalink
MDL-60139 question manual grading: move code to reduce confusion
Browse files Browse the repository at this point in the history
Move the variable definition closer to where it is used.
  • Loading branch information
timhunt committed Oct 30, 2017
1 parent 808b688 commit 284c795
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions question/behaviour/rendererbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ public function manual_comment_fields(question_attempt $qa, question_display_opt
if (!is_null($currentmark)) {
$attributes['value'] = $currentmark;
}
$a = new stdClass();
$a->max = $qa->format_max_mark($options->markdp);
$a->mark = html_writer::empty_tag('input', $attributes);

$markrange = html_writer::empty_tag('input', array(
'type' => 'hidden',
Expand All @@ -152,6 +149,9 @@ public function manual_comment_fields(question_attempt $qa, question_display_opt
array('class' => 'error')) . html_writer::empty_tag('br');
}

$a = new stdClass();
$a->max = $qa->format_max_mark($options->markdp);
$a->mark = html_writer::empty_tag('input', $attributes);
$mark = html_writer::tag('div', html_writer::tag('div',
html_writer::tag('label', get_string('mark', 'question'),
array('for' => $markfield)),
Expand Down

0 comments on commit 284c795

Please sign in to comment.