Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
moodle-mod_vpl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caseine
moodle-mod_vpl
Commits
7fdb6489
Commit
7fdb6489
authored
4 years ago
by
Astor Bizard
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug where teachers could not download corrupted groups submissions.
parent
bf862be3
No related branches found
No related tags found
1 merge request
!1
Dev: Submissions list rework, webservices and bugfixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
views/downloadsubmission.php
+2
-1
2 additions, 1 deletion
views/downloadsubmission.php
with
2 additions
and
1 deletion
views/downloadsubmission.php
+
2
−
1
View file @
7fdb6489
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment