MDL-50526 mod_assign: Highlight error message when user has no group
If I set the "Require group to make submission" setting in an assignment activity to yes, students who are not in any group are prevented from submitting their assignment and are presented a warning instead that they should contact their teacher. This message is now presented in an alert box.
This commit is contained in:
committed by
Dan Poltawski
parent
a059ef2e9f
commit
08a54173d8
@@ -453,9 +453,13 @@ class mod_assign_renderer extends plugin_renderer_base {
|
||||
$cell2 = new html_table_cell(format_string($group->name, false, $status->context));
|
||||
} else if ($status->preventsubmissionnotingroup) {
|
||||
if (count($status->usergroups) == 0) {
|
||||
$cell2 = new html_table_cell(get_string('noteam', 'assign'));
|
||||
$cell2 = new html_table_cell(
|
||||
html_writer::span(get_string('noteam', 'assign'), 'alert alert-error')
|
||||
);
|
||||
} else if (count($status->usergroups) > 1) {
|
||||
$cell2 = new html_table_cell(get_string('multipleteams', 'assign'));
|
||||
$cell2 = new html_table_cell(
|
||||
html_writer::span(get_string('multipleteams', 'assign'), 'alert alert-error')
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$cell2 = new html_table_cell(get_string('defaultteam', 'assign'));
|
||||
|
||||
Reference in New Issue
Block a user