The mgiQuiz TagTag BehaviorThe mgiQuiz tag allows website visitors to take a quiz designed by the site administrator. The mgiQuiz tag also scores the quiz and records the quiz scores. Tag SyntaxThe mgiQuiz tag has three required parameters and four optional parameters. The tag form is: <mgiQuiz databaseFileLocation="File Path" tableName="Name" formatFileLocation="File Path" maximumQuizGrade="Number" checkboxGradingMethod="Method" timer="On/Off" mode="Mode"> Required Parameters:
Optional Parameters:
Quiz Variables:
Example Usage and OutputThe Entry Page: If you are timing quizzes, you must enter the quiz page via a page containing mgiToken tags so that tokens are appended to and carried through the URL. If you are not timing quizzes, the entry page is not required. A simple entry page would contain: <mgiToken> <a href="quiz.html">Click Here to Take Quiz 1</a> </mgiToken> The Quiz Page: The quiz page contains the mgiQuiz tag and mgiToken tags (if you are timing quizzes). The quiz page displays the quiz questions, answers, HTML form tags and submit button as defined in the format file. An example quiz page would contain: <mgiToken> <mgiQuiz databaseFileLocation="Chemistry" tableName="Quiz1" formatFileLocation="quiz1format.txt" maximumQuizGrade="100" checkboxGradingMethod="Individual" timer="On"> </mgiToken> The following is an example format file: <form method="post" action="process.html"> <table> <tr><td align="right">First Name:</td><td> <input type="text" name="First Name"></td></tr> <tr><td align="right">Last Name:</td><td> <input type="text" name="Last Name"></td></tr> <tr><td align="right">Student ID:</td><td> <input type="text" name="ID"></td></tr> </table> <p><hr><p> <u>You want to check the odor of a chemical. You should:</u><br> <br><input type="radio" name="odor" value="Sniff Directly"> A. Sniff directly out of the flask <br><input type="radio" name="odor" value="Waft Gently" checked> B. Waft gently over the flask toward your nose <br><input type="radio" name="odor" value="Drink"> C. Drink some of it first <p><hr><p> <u>What element has an atomic number of 1?</u><br> <br><input type="radio" name="Atomic Number" value="Helium">A. Helium <br><input type="radio" name="Atomic Number" value="Hydrogen">B. Hydrogen <br><input type="radio" name="Atomic Number" value="Uranium">C. Uranium <p><hr><p> <u>Which of the following elements are present in hydrogen peroxide? (Check all that apply.)</u><br> <br><input type="checkbox" name="Peroxide" value="Hydrogen" checked>A. Hydrogen <br><input type="checkbox" name="Peroxide" value="Neon">B. Neon <br><input type="checkbox" name="Peroxide" value="Nitrogen">C. Nitrogen <br><input type="checkbox" name="Peroxide" value="Oxygen" checked>D. Oxygen <p><hr><p> <u>What is the chemical symbol for Lead?</u><br> <br><select name="Lead"> <option>Ld <option>Pb <option>Dr </select> <p><hr><p> <input type="submit" name="button" value="Submit Quiz"> </form> The Processing Page: The processing page records each quiz and stores the information in the specified database and table. The processing page should contain the mgiQuiz tag exactly as it appears on the quiz page (see example code below). Since the quiz processing is invisible to the quiz-taker, the processing page can also display a message to the quiz-taker such as "Thank You. Your quiz has been received." <mgiToken> <mgiQuiz databaseFileLocation="Chemistry" tableName="Quiz1" formatFileLocation="quiz1format.txt" maximumQuizGrade="100" checkboxGradingMethod="Individual" timer="On"> </mgiToken> The Admin Page: The admin page allows the quiz administrator to view, search and export quiz scores. If you are timing quizzes, you must include the "timer" parameter to view the elapsed time of each quiz in the administration interface: <mgiQuiz databaseFileLocation="Chemistry" mode="Admin" timer="On"> Taking Quizzes: After creating the entry, quiz, processing, and admin pages, the administrator should take the quiz once and input all correct answers. That quiz will become the first record in the specified database table and will be used as the key to grade all subsequent quiz submissions. After the key has been entered, other users can take and submit quizzes. After it is submitted, each quiz will be automatically graded based on the key and scored according to the parameters that are entered in the mgiQuiz tag. Quiz scores can be viewed, searched, or exported on the admin page. Suggested Usage
|
[Return to the Referencing MGI Menu]
[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]