Skip to content

Commit

Permalink
MDL-29030 migrate and cleanup log report
Browse files Browse the repository at this point in the history
AMOS BEGIN
 MOV [log:view,coursereport_log],[log:view,report_log]
 MOV [log:viewtoday,coursereport_log],[log:viewtoday,report_log]
AMOS END
  • Loading branch information
skodak committed Nov 6, 2011
1 parent 8a8f29c commit 033af4b
Show file tree
Hide file tree
Showing 16 changed files with 405 additions and 451 deletions.
10 changes: 8 additions & 2 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -831,13 +831,19 @@ function print_log_ods($course, $user, $date, $order='l.time DESC', $modname,

function print_log_graph($course, $userid=0, $type="course.png", $date=0) {
global $CFG, $USER;

// note: this is a hack - we should not use plugins from core
if (!file_exists($CFG->dirroot.'/report/log/graph.php')) {
return;
}

if (empty($CFG->gdversion)) {
echo "(".get_string("gdneed").")";
} else {
// MDL-10818, do not display broken graph when user has no permission to view graph
if (has_capability('coursereport/log:view', get_context_instance(CONTEXT_COURSE, $course->id)) ||
if (has_capability('report/log:view', get_context_instance(CONTEXT_COURSE, $course->id)) ||
($course->showreports and $USER->id == $userid)) {
echo '<img src="'.$CFG->wwwroot.'/course/report/log/graph.php?id='.$course->id.
echo '<img src="'.$CFG->wwwroot.'/report/log/graph.php?id='.$course->id.
'&amp;user='.$userid.'&amp;type='.$type.'&amp;date='.$date.'" alt="" />';
}
}
Expand Down
68 changes: 0 additions & 68 deletions course/report/log/db/access.php

This file was deleted.

169 changes: 0 additions & 169 deletions course/report/log/index.php

This file was deleted.

44 changes: 0 additions & 44 deletions course/report/log/indexlive.php

This file was deleted.

43 changes: 0 additions & 43 deletions course/report/log/live.php

This file was deleted.

23 changes: 0 additions & 23 deletions course/report/log/mod.php

This file was deleted.

Loading

0 comments on commit 033af4b

Please sign in to comment.