Skip to content
Snippets Groups Projects
Commit 7fdb6489 authored by Astor Bizard's avatar Astor Bizard :dog2:
Browse files

Fixed bug where teachers could not download corrupted groups submissions.

parent bf862be3
No related branches found
No related tags found
1 merge request!1Dev: Submissions list rework, webservices and bugfixes
...@@ -59,7 +59,8 @@ if (! $subinstance) { ...@@ -59,7 +59,8 @@ if (! $subinstance) {
if ($subinstance->vpl != $vpl->get_instance()->id) { if ($subinstance->vpl != $vpl->get_instance()->id) {
throw new moodle_exception( 'vpl submission vpl inconsistence' ); throw new moodle_exception( 'vpl submission vpl inconsistence' );
} }
if ($vpl->is_inconsistent_user( $subinstance->userid, $userid )) { if ($vpl->is_inconsistent_user( $subinstance->userid, $userid ) && !$vpl->has_capability( VPL_GRADE_CAPABILITY )) {
// A student can't download another student/group's submission.
throw new moodle_exception( 'nopermissions', null, null, get_string('download') ); throw new moodle_exception( 'nopermissions', null, null, get_string('download') );
} }
$submission = new mod_vpl_submission( $vpl, $subinstance ); $submission = new mod_vpl_submission( $vpl, $subinstance );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment