mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Improved handling of occupied target issue
If the target area already contains a form, we can't pick anything to use there. If the user works in two windows or there are several teachers modifying the same course, it can happen that the form suddenly appears in the target area while we have the form picker still open. In such case, we simply redirects the user to the target area instead of displaying the pooky exception.
This commit is contained in:
parent
9e4eb676e4
commit
9e3d352dee
@ -47,7 +47,7 @@ $targetcontrollerclass = get_class($targetcontroller);
|
||||
|
||||
// make sure there is no such form defined in the target area
|
||||
if ($targetcontroller->is_form_defined()) {
|
||||
throw new moodle_exception('target_defined', 'core_grading');
|
||||
redirect(new moodle_url('/grade/grading/manage.php', array('areaid' => $targetid)));
|
||||
}
|
||||
|
||||
list($context, $course, $cm) = get_context_info_array($targetmanager->get_context()->id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user