diff --git a/admin/reports_students.inc.php b/admin/reports_students.inc.php index 7156cc3..30cf3a3 100644 --- a/admin/reports_students.inc.php +++ b/admin/reports_students.inc.php @@ -38,11 +38,13 @@ function reports_students_numstudents(&$report, $field, $text) function report_student_safety_question(&$report, $field, $text) { - /* Field is 'question_x', users_id is passed in $text */ - $q_ord = substr($field, 15); + /* Field is 'safetyquestion_x', registration_id is passed in $text */ + $q_ord = intval(substr($field, 15)); $conferences_id = $report['conferences_id']; $regid = $text; + //safetyquestions start counting 1-10, but when we LIMIT, we need to index on 0-9 + $q_ord--; $q=mysql_query("SELECT safetyquestions.question, safety.answer @@ -53,8 +55,6 @@ function report_student_safety_question(&$report, $field, $text) { $r=mysql_fetch_object($q); return $r->answer; - - }