コード例 #1
0
 $content["evaluation_attempt"] .= "        <li><strong>Warning Unsaved Response:</strong><br />Your response to the question indicated by a yellow background was not automatically saved.</li>\n";
 $content["evaluation_attempt"] .= "    </ul>\n";
 $content["evaluation_attempt"] .= "</div>\n";
 if ($ERROR) {
     $content["evaluation_attempt"] .= display_error();
 }
 if ($NOTICE) {
     $content["evaluation_attempt"] .= display_notice();
 }
 $content["evaluation_attempt"] .= "<input type=\"hidden\" name=\"step\" value=\"2\" />\n";
 $query = "\tSELECT a.*, b.*, c.`questiontype_shortname`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `evaluation_form_questions` AS a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN `evaluations_lu_questions` AS b\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tON a.`equestion_id` = b.`equestion_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN `evaluations_lu_questiontypes` AS c\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tON b.`questiontype_id` = c.`questiontype_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE a.`eform_id` = " . $db->qstr($evaluation_record["eform_id"]) . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY a.`question_order` ASC";
 $questions = $db->GetAll($query);
 $total_questions = 0;
 if ($questions) {
     $total_questions = count($questions);
     $content["evaluation_attempt"] .= Models_Evaluation::getMobileQuestionAnswerControls($questions, $PROCESSED["eform_id"], $eprogress_id);
 } else {
     $ERROR++;
     $ERRORSTR[] = "There are no questions currently available for this evaluation. This problem has been reported to a system administrator; please try again later.";
     application_log("error", "Unable to locate any questions for evaluation [" . $evaluation_record["evaluation_id"] . "]. Database said: " . $db->ErrorMsg());
 }
 $content["evaluation_attempt"] .= "<div style=\"border-top: 2px #CCCCCC solid; margin-top: 10px; padding-top: 10px\">\n";
 $content["evaluation_attempt"] .= "    <input type=\"button\" id=\"evaluation-submit\" value=\"Submit Evaluation\" />\n";
 $content["evaluation_attempt"] .= "</div>\n";
 $content["evaluation_attempt"] .= "<div class=\"clear\"></div>\n";
 $content["evaluation_attempt"] .= "</form>\n";
 $content["evaluation_attempt"] .= "<script type=\"text/javascript\">\n";
 $content["evaluation_attempt"] .= "function loadPreceptors(event_id) {\n";
 $content["evaluation_attempt"] .= "    var preceptor_proxy_id = 0;\n";
 $content["evaluation_attempt"] .= "    if (\$('preceptor_proxy_id') && \$('preceptor_proxy_id').selectedIndex > 0) {\n";
 $content["evaluation_attempt"] .= "        preceptor_proxy_id = \$('preceptor_proxy_id').options[\$('preceptor_proxy_id').selectedIndex].value;\n";