Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-30144 Assignmnet 2.2: fixed context retrival

  • Loading branch information...
commit 377d577f2dfa5d47468303364d7f7d18f54f8c6c 1 parent 9cb6ecd
@rajeshtaneja rajeshtaneja authored danpoltawski committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  mod/assignment/lib.php
View
3  mod/assignment/lib.php
@@ -3553,7 +3553,8 @@ function assignment_get_all_submissions($assignment, $sort="", $dir="DESC") {
if ($assignment->course == SITEID) {
$select = '';
}*/
- $context = context_module::instance($assignment->id);
+ $cm = get_coursemodule_from_instance('assignment', $assignment->id, $assignment->course);
+ $context = context_module::instance($cm->id);
list($enroledsql, $params) = get_enrolled_sql($context, 'mod/assignment:submit');
$params['assignmentid'] = $assignment->id;
return $DB->get_records_sql("SELECT a.*
Please sign in to comment.
Something went wrong with that request. Please try again.