echo $quiz_description;
                            ?>
</td>
								</tr>
								<?php 
                        }
                        ?>
							<tr>
								<td colspan="3">&nbsp;</td>
							</tr>
							<tr>
								<td></td>
								<td style="vertical-align: top">Quiz Authors</td>
								<td>
									<?php 
                        $quiz_authors = Models_Quiz_Contact::fetchAllRecords($RECORD_ID);
                        if ($quiz_authors) {
                            foreach ($quiz_authors as $quiz_author) {
                                $author = User::get($quiz_author->getProxyID());
                                if ($author->getID()) {
                                    $q_a[] = "<a href=\"mailto:" . html_encode($author->getEmail()) . "\">" . html_encode($author->getFullname(false)) . "</a>";
                                }
                            }
                        }
                        if (isset($q_a) && !empty($q_a)) {
                            echo implode("; ", $q_a);
                        }
                        ?>
								</td>
							</tr>
						</tbody>
Beispiel #2
0
                             add_error("There was an error while trying to attach a <strong>Quiz Author</strong> to this quiz.<br /><br />The system administrator was informed of this error; please try again later.");
                             application_log("error", "Unable to insert a new quiz_contact record while adding a new quiz. Database said: " . $db->ErrorMsg());
                         }
                     }
                 }
                 add_success("The <strong>Quiz Information</strong> section has been successfully updated.");
                 application_log("success", "Quiz information for quiz_id [" . $quiz_id . "] was updated.");
             } else {
                 add_error("There was a problem updating this quiz. The system administrator was informed of this error; please try again later.");
                 application_log("error", "There was an error updating quiz information for quiz_id [" . $quiz_id . "]. Database said: " . $db->ErrorMsg());
             }
         }
         break;
     case 1:
     default:
         $quiz_contacts = Models_Quiz_Contact::fetchAllRecords($RECORD_ID);
         if ($quiz_contacts) {
             foreach ($quiz_contacts as $quiz_contact) {
                 $PROCESSED["associated_proxy_ids"][] = $quiz_contact->getProxyID();
             }
         }
         break;
 }
 // Display Content
 switch ($STEP) {
     case 2:
     case 1:
     default:
         if (!$ALLOW_QUESTION_MODIFICATIONS) {
             echo display_notice(array("<p><strong>Please note</strong> this quiz has already been attempted by at least one person, therefore the questions cannot be modified. If you would like to make modifications to the quiz questions you must copy it first using the Copy Quiz button below and then make your modifications.</p>"));
         }
Beispiel #3
0
                 foreach ($new_qquestion_ids as $new_qquestion_id) {
                     $qquestion_responses = Models_Quiz_Question_Response::fetchAllRecords($new_qquestion_id);
                     if ($qquestion_responses) {
                         foreach ($qquestion_responses as $qquestion_response) {
                             $qquestion_response->delete();
                         }
                     }
                 }
             }
             $quiz_questions = Models_Quiz_Question::fetchAllRecords($new_quiz_id);
             if ($quiz_questions) {
                 foreach ($quiz_questions as $quiz_question) {
                     $quiz_question->delete();
                 }
             }
             $quiz_contacts = Models_Quiz_Contact::fetchAllRecords($new_quiz_id);
             if ($quiz_contacts) {
                 foreach ($quiz_contacts as $quiz_contact) {
                     $quiz_contact->delete();
                 }
             }
             $quiz = Models_Quiz::fetchRowByID($new_quiz_id);
             if ($quiz) {
                 $quiz->delete();
             }
             add_error("There was a problem creating the new quiz at this time. The system administrator was informed of this error; please try again later.");
         }
     }
 } else {
     $quiz = Models_Quiz::fetchRowByID($new_quiz_id);
     if ($quiz) {