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.
$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(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) {
} 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'));
}
} else {
$cell2 = new html_table_cell(get_string('defaultteam', 'assign'));