mirror of
https://github.com/moodle/moodle.git
synced 2025-03-20 15:40:17 +01:00
MDL-28221 resource: improved file not found handling
When the referenced file is not found, do not rely on the record in resource_old as the resource can be actually restored from a 1.9 backup.
This commit is contained in:
parent
c6c9a3bcdb
commit
498c722d0f
@ -345,7 +345,11 @@ function resource_print_filenotfound($resource, $cm, $course) {
|
||||
resource_print_header($resource, $cm, $course);
|
||||
resource_print_heading($resource, $cm, $course);
|
||||
resource_print_intro($resource, $cm, $course);
|
||||
echo $OUTPUT->notification(get_string('notmigrated', 'resource', $resource_old->type));
|
||||
if ($resource_old) {
|
||||
echo $OUTPUT->notification(get_string('notmigrated', 'resource', $resource_old->type));
|
||||
} else {
|
||||
echo $OUTPUT->notification(get_string('filenotfound', 'resource'));
|
||||
}
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user