Permalink
Browse files

fix undefined property "cr_timefinish", when viewing click report

  • Loading branch information...
1 parent acf2052 commit 4db2e65f9d4dd1efde775cd66dc2563077e0fdea gbateson committed Dec 8, 2006
Showing with 8 additions and 3 deletions.
  1. +8 −3 mod/hotpot/report.php
View
@@ -259,9 +259,14 @@
$users[$userid]->attempts[] = &$attempts[$id];
- if ($mode=='click' && isset($cr_attempts[$id])) {
- $attempts[$id]->cr_lastclick = $cr_attempts[$id]->id;
- $attempts[$id]->cr_timefinish = $cr_attempts[$id]->timefinish;
+ if ($mode=='click') {
+ // shortcut to clickreportid (=the id of the FIRST attempt in this clickreport series)
+ $clickreportid = $attempt->clickreportid;
+ if (isset($cr_attempts[$clickreportid])) {
+ // store id and finish time of LAST attempt in this clickreport series
+ $attempts[$id]->cr_lastclick = $cr_attempts[$clickreportid]->id;
+ $attempts[$id]->cr_timefinish = $cr_attempts[$clickreportid]->timefinish;
+ }
}
}

0 comments on commit 4db2e65

Please sign in to comment.