Fixed workshop view logging
authorDavid Mudrak <david.mudrak@gmail.com>
Fri, 12 Nov 2010 11:54:53 +0000 (11:54 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Fri, 12 Nov 2010 11:54:53 +0000 (11:54 +0000)
add_to_log() used to log whole workshop name instead of just id. Thanks
to Eloy for spotting that.

mod/workshop/view.php

index 1eefa0b..12f73ba 100644 (file)
@@ -46,9 +46,9 @@ if ($id) {
 
 require_login($course, true, $cm);
 require_capability('mod/workshop:view', $PAGE->context);
-add_to_log($course->id, 'workshop', 'view', 'view.php?id=' . $cm->id, $workshop->name, $cm->id);
 
 $workshop = new workshop($workshop, $cm, $course);
+$workshop->log('view');
 
 if (!is_null($editmode) && $PAGE->user_allowed_editing()) {
     $USER->editing = $editmode;