Merge branch 'MDL-54056-master' of git://github.com/junpataleta/moodle

This commit is contained in:
Andrew Nicols 2016-05-11 15:39:26 +08:00
commit 372def96c4

View File

@ -235,10 +235,13 @@ class gradingform_guide_renderer extends plugin_renderer_base {
// Grading remark text area.
$input = html_writer::tag('textarea', s($currentremark), $remarkparams);
// Show the frequently-used comments chooser only if there are defined entries.
if (!empty($comments)) {
// Frequently used comments chooser.
$chooserbuttonid = 'criteria-' . $criterion['id'] . '-commentchooser';
$commentchooserparams = array('id' => $chooserbuttonid, 'class' => 'commentchooser');
$commentchooser = html_writer::tag('button', get_string('insertcomment', 'gradingform_guide'), $commentchooserparams);
$commentchooser = html_writer::tag('button', get_string('insertcomment', 'gradingform_guide'),
$commentchooserparams);
// Option items for the frequently used comments chooser dialog.
$commentoptions = array();
@ -254,6 +257,7 @@ class gradingform_guide_renderer extends plugin_renderer_base {
// Include comment_chooser module.
$PAGE->requires->js_call_amd('gradingform_guide/comment_chooser', 'initialise',
array($criterion['id'], $chooserbuttonid, $remarkid, $commentoptions));
}
// Hidden marking guide remark label.
$remarklabelparams = array(