Merge branch 'MDL-75442-404' of https://github.com/StudiUM/moodle into MOODLE_404_STABLE
This commit is contained in:
@@ -72,6 +72,9 @@ $summary->add_item('quizname', get_string('modulename', 'quiz'), format_string($
|
||||
// Question name.
|
||||
$summary->add_item('questionname', get_string('question', 'quiz'), $attemptobj->get_question_name($slot));
|
||||
|
||||
// Error message in case of input invalid mark.
|
||||
$submiterror = false;
|
||||
|
||||
// Process any data that was submitted.
|
||||
if (data_submitted() && confirm_sesskey()) {
|
||||
if (optional_param('submit', false, PARAM_BOOL) && question_engine::is_manual_grade_in_range($attemptobj->get_uniqueid(), $slot)) {
|
||||
@@ -96,12 +99,18 @@ if (data_submitted() && confirm_sesskey()) {
|
||||
echo $output->notification(get_string('changessaved'), 'notifysuccess');
|
||||
close_window(2, true);
|
||||
die;
|
||||
} else {
|
||||
$submiterror = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Print quiz information.
|
||||
echo html_writer::div($output->render($summary), 'mb-3');
|
||||
|
||||
// Display notification if current mark is invalid.
|
||||
if ($submiterror) {
|
||||
echo $output->notification(get_string('savemanualgradingfailed', 'quiz'), \core\output\notification::NOTIFY_ERROR);
|
||||
}
|
||||
// Print the comment form.
|
||||
echo '<form method="post" class="mform" id="manualgradingform" action="' .
|
||||
$CFG->wwwroot . '/mod/quiz/comment.php">';
|
||||
|
||||
@@ -967,6 +967,7 @@ $string['saveandedit'] = 'Save changes and edit questions';
|
||||
$string['saveattemptfailed'] = 'Failed to save the current quiz attempt.';
|
||||
$string['savedfromdeletedcourse'] = 'Saved from deleted course "{$a}"';
|
||||
$string['savegrades'] = 'Save grades';
|
||||
$string['savemanualgradingfailed'] = 'Modification not saved. Please check the message below and try again.';
|
||||
$string['savemyanswers'] = 'Save my answers';
|
||||
$string['savenosubmit'] = 'Save without submitting';
|
||||
$string['saveoverrideandstay'] = 'Save and enter another override';
|
||||
|
||||
@@ -164,7 +164,7 @@ abstract class qbehaviour_renderer extends plugin_renderer_base {
|
||||
$error = $qa->validate_manual_mark($currentmark);
|
||||
$errorclass = '';
|
||||
if ($error !== '') {
|
||||
$erroclass = ' error';
|
||||
$errorclass = ' error alert-danger';
|
||||
$error = html_writer::tag('span', $error,
|
||||
array('class' => 'error')) . html_writer::empty_tag('br');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user