Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix undefined property "cr_timefinish", when viewing click report

  • Loading branch information...
commit 94a7bfecb079828806a8e058781a63c9f90113d9 1 parent 8665733
gbateson authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 mod/hotpot/report.php
View
11 mod/hotpot/report.php
@@ -237,9 +237,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;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.