mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-50484 core_grade: courseheader id should be unique
grader report show category with courseheader id which gets replicated for all categories on page. This will now be courseheader_categoryname.
This commit is contained in:
parent
7e341eb48f
commit
7b287e09e2
@ -1603,8 +1603,9 @@ class grade_report_grader extends grade_report {
|
||||
}
|
||||
|
||||
$name = shorten_text($element['object']->get_name());
|
||||
$courseheader = html_writer::tag('span', $name, array('id' => 'courseheader'));
|
||||
$courseheader .= html_writer::label($showing, 'courseheader', false, array('class' => 'accesshide'));
|
||||
$courseheaderid = 'courseheader_' . clean_param($name, PARAM_ALPHANUMEXT);
|
||||
$courseheader = html_writer::tag('span', $name, array('id' => $courseheaderid));
|
||||
$courseheader .= html_writer::label($showing, $courseheaderid, false, array('class' => 'accesshide'));
|
||||
$courseheader .= $icon;
|
||||
|
||||
return $courseheader;
|
||||
|
@ -103,9 +103,9 @@ foreach ($users as $k => $v) {
|
||||
if (!$user = $DB->get_record('user', array('id' => $v))) {
|
||||
continue;
|
||||
}
|
||||
$checkbox = html_writer::label(get_string('selectnotestate', 'notes'), 'menustates', false, array('class' => 'accesshide'));
|
||||
$checkbox = html_writer::label(get_string('selectnotestate', 'notes'), 'menustates_'.$v, false, array('class' => 'accesshide'));
|
||||
$checkbox .= html_writer::select($statenames, 'states[' . $k . ']',
|
||||
empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false, array('id' => 'menustates'));
|
||||
empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false, array('id' => 'menustates_'.$v));
|
||||
$table->data[] = array(
|
||||
'<input type="hidden" name="userid['.$k.']" value="'.$v.'" />'. fullname($user, true),
|
||||
'<textarea name="contents['. $k . ']" rows="2" cols="40" spellcheck="true">' . strip_tags(@$contents[$k]) . '</textarea>',
|
||||
|
Loading…
x
Reference in New Issue
Block a user