On a new quiz that has incomplete results data (i.e. nobody has submitted the full quiz yet) I get the following error:

Notice: Trying to get property of non-object in _get_date_vs_takeup_count_chart() (line 223 of /sites/all/modules/quiz/includes/quiz_stats/quiz_stats.admin.inc).

This is the first IF() statement from the following code segment:

  foreach ($days as $date => &$value) {
   if ($date == $res_o->date) {
      $value->value = $res_o->count;
      if ($res_o->count > 0) $valid_data = TRUE;
      $res_o = db_fetch_object($results);
    }
  }
CommentFileSizeAuthor
#1 quiz-n1559364-d6_4.patch638 bytesdamienmckenna

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new638 bytes

This patch simply checks to see if the $res_o->date exists.

djdevin’s picture

Component: Code - other » Code - Quiz core
Issue summary: View changes
Status: Needs review » Closed (outdated)

This issue is being closed because it was filed against a version that is no longer supported. If the issue still persists in the latest version of Quiz, please open a new issue.