mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-30271 Inform the user about the example assessment conflict, instead of throwing the exception
This commit is contained in:
parent
660bc937f0
commit
2dce240984
@ -103,6 +103,15 @@ if ($id and $assess and $canassess) {
|
||||
if (!$asid) {
|
||||
$asid = $workshop->add_allocation($example, $USER->id, 0);
|
||||
}
|
||||
if ($asid == workshop::ALLOCATION_EXISTS) {
|
||||
// the training assessment of the example was not found but the allocation already
|
||||
// exists. this probably means that the user is the author of the reference assessment.
|
||||
echo $output->header();
|
||||
echo $output->box(get_string('assessmentreferenceconflict', 'workshop'));
|
||||
echo $output->continue_button($workshop->view_url());
|
||||
echo $output->footer();
|
||||
die();
|
||||
}
|
||||
redirect($workshop->exassess_url($asid));
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ $string['assessmentenddatetime'] = 'Assessment deadline: {$a->daydatetime} ({$a-
|
||||
$string['assessmentform'] = 'Assessment form';
|
||||
$string['assessmentofsubmission'] = '<a href="{$a->assessmenturl}">Assessment</a> of <a href="{$a->submissionurl}">{$a->submissiontitle}</a>';
|
||||
$string['assessmentreference'] = 'Reference assessment';
|
||||
$string['assessmentreferenceconflict'] = 'It is not possible to assess an example submission for which you provided a reference assessment.';
|
||||
$string['assessmentreferenceneeded'] = 'You have to assess this example submission to provide a reference assessment. Click \'Continue\' button to assess the submission.';
|
||||
$string['assessmentsettings'] = 'Assessment settings';
|
||||
$string['assessmentstart'] = 'Open for assessment from';
|
||||
|
Loading…
x
Reference in New Issue
Block a user