Skip to content

Commit

Permalink
MDL-13354 - wrong capability checked for view report link
Browse files Browse the repository at this point in the history
  • Loading branch information
poltawski committed Feb 8, 2008
1 parent c9534ef commit c095ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/scorm/view.php
Expand Up @@ -70,7 +70,7 @@
"$navigation <a $CFG->frametarget href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
'', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));

if (has_capability('moodle/course:manageactivities', $context)) {
if (has_capability('mod/scorm:viewreport', $context)) {
$trackedusers = get_record('scorm_scoes_track', 'scormid', $scorm->id, '', '', '', '', 'count(distinct(userid)) as c');
if ($trackedusers->c > 0) {
echo "<div class=\"reportlink\"><a $CFG->frametarget href=\"report.php?id=$cm->id\"> ".get_string('viewallreports','scorm',$trackedusers->c).'</a></div>';
Expand Down

0 comments on commit c095ae4

Please sign in to comment.