The mgiQuiz Tag

Tag Behavior

Use the mgiQuiz tag to create, grade and manage online quizzes.


Tag Syntax

The mgiQuiz tag has two modes. Each mode has different required and optional parameters. The modes of mgiQuiz are:

  • grade - Grades quiz answers.
  • admin - Creates a web-based interface to create and manage quizzes.

Grade Mode

The grade mode of mgiQuiz has one required parameter and six optional parameters. The tag form is:

<mgiQuiz mode="grade" name="Quiz" username="Name" 
type="Quiz Type" odbcDatasource="Source Name" 
odbcUsername="Name" odbcPassword="Password">

Required Parameters:

  • name - The name is the name of the quiz to grade. Quizzes are named when they are created via the quiz admin interface. All quiz names are case-sensitive.

Optional Parameters:

  • mode - The mode is the function that the mgiQuiz tag performs. In "grade" mode, the mgiQuiz tag grades quiz answers, records quiz grades in the database (for "Composite" quizzes only) and displays the quiz grade. "Grade" is the default mode of the mgiQuiz tag.
  • username - The username is the username of the administrator that created the quiz. Quizzes created by different administrators may have the same name and this username parameter differentiates which quiz to grade. The default username is "Admin". All usernames are case-sensitive.
  • type - The type is the type of quiz you are grading. If the type parameter value is "composite", then the quiz you are grading was created from quiz questions in the quiz database. If the type parameter value is "custom", then the quiz questions were submitted from a custom quiz form and do not necessarily appear in the quiz database. The default value is "composite".
  • odbcDatasource (NT only) - The odbcDatasource is the name of datasource on the server that provides access information for an external ODBC database. If the odbcDatasource parameter is included, quiz information will be stored in the specified ODBC database rather than the internal MGI database. Inquire with the server administrator for additional information about the use of ODBC databases. If you include the odbcDatasource parameter, the odbcUsername and odbcPassword parameters are required.
  • odbcUsername (NT only) - The odbcUsername is the username required to access the ODBC datasource. The odbcUsername parameter is required if you include the odbcDatasource parameter.
  • odbcPassword (NT only) - The odbcPassword is the code required to access the ODBC datasource. The odbcPassword parameter is required if you include the odbcDatasource parameter.

Admin Mode

The admin mode of mgiQuiz has one required parameter and five optional parameters. The tag form is:

<mgiQuiz mode="admin" username="Name" 
displayLimit="Integer" odbcDatasource="Source Name" 
odbcUsername="Name" odbcPassword="Password">

Required Parameters:

  • mode - The mode is the function that the mgiQuiz tag performs. In "admin" mode, the mgiQuiz tag creates a web-based interface that allows you to add new quiz questions, "print" quiz forms, and manage quiz grades from composite quizzes.

Optional Parameters:

  • username - The username identifies the quiz administrator. Administrators will only have access to the quizzes created with their username. Quizzes created with different usernames (i.e, by different administrators) may have the same name. The default username is "Admin". All usernames are case-sensitive.
  • displayLimit - The displayLimite is the number of quiz questions to display per page in the quiz admin. The default value is "10". The maximum value is "50".
  • odbcDatasource (NT only) - The odbcDatasource is the name of datasource on the server that provides access information for an external ODBC database. If the odbcDatasource parameter is included, quiz information will be stored in the specified ODBC database rather than the internal MGI database. Inquire with the server administrator for additional information about the use of ODBC databases. If you include the odbcDatasource parameter, the odbcUsername and odbcPassword parameters are required.
  • odbcUsername (NT only) - The odbcUsername is the username required to access the ODBC datasource. The odbcUsername parameter is required if you include the odbcDatasource parameter.
  • odbcPassword (NT only) - The odbcPassword is the code required to access the ODBC datasource. The odbcPassword parameter is required if you include the odbcDatasource parameter.


Example Usage and Output

Grade Mode

<mgiQuiz name="Algebra1A" username="MathDept">

In this example, the "Algeabra1A" quiz questions will be graded and the grades and associated information will be stored in the quiz database.

Admin Mode

<mgiQuiz mode="admin" username="ScienceDept" 
displayLimit="25">

When you access a page with the mgiQuiz tag in admin mode, the quiz admin interface displays allowing you to manage quiz questions and grades. In this example, only those quizzes created by the "Science" administrator will appear and questions will be displayed 25 per page.


Suggested Usage

  • Online Quizzes


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]