Permalink
Browse files

MDL-34228 Completion: Add capability that controls if a user is shown…

… in reports
  • Loading branch information...
1 parent 9273bd1 commit 5c3cb55b5dd144d5df093c7f9ef7cce79930cdc4 @sammarshallou sammarshallou committed Aug 29, 2012
Showing with 11 additions and 1 deletion.
  1. +1 −0 lang/en/role.php
  2. +2 −1 lib/completionlib.php
  3. +8 −0 lib/db/access.php
View
@@ -121,6 +121,7 @@
$string['course:enrolconfig'] = 'Configure enrol instances in courses';
$string['course:enrolreview'] = 'Review course enrolments';
$string['course:ignorefilesizelimits'] = 'Use files larger than any file size restrictions';
+$string['course:isincompletionreports'] = 'Be shown on completion reports';
$string['course:manageactivities'] = 'Manage activities';
$string['course:managefiles'] = 'Manage files';
$string['course:managegrades'] = 'Manage grades';
@@ -1069,7 +1069,8 @@ public function get_tracked_users($where = '', $whereparams = array(), $groupid
global $DB;
list($enrolledsql, $params) = get_enrolled_sql(
- context_course::instance($this->course->id), '', $groupid, true);
+ context_course::instance($this->course->id),
+ 'moodle/course:isincompletionreports', $groupid, true);
$sql = 'SELECT u.id, u.firstname, u.lastname, u.idnumber';
if ($extracontext) {
View
@@ -979,6 +979,14 @@
)
),
+ 'moodle/course:isincompletionreports' => array(
+ 'captype' => 'read',
+ 'contextlevel' => CONTEXT_COURSE,
+ 'archetypes' => array(
+ 'student' => CAP_ALLOW,
+ ),
+ ),
+
'moodle/course:viewscales' => array(
'captype' => 'read',

0 comments on commit 5c3cb55

Please sign in to comment.