Allowing others to View Statistics and Reports for your Quiz

 

This feature requires the use of Directory Restrictions. To get detailed information about class performance on your quiz, the quiz directory in your central web account must be protected with a ".htaccess" file that forces people to log in to Passport York. This was probably arranged for you when you first requested YQuiz Writer. If not, please see the instructions below, or contact UIT Learning Technology Services at lts@yorku.ca for assistance.

For this task you will need a good understanding of HTML, and you will need to know how to use FTP (file transfer protocol) to move files.

Retrieve the Quiz Stats file

  1. The Quiz statistics configuration file is located in a directory in your central web site named "yquiz/myquiz/stats/, and is namedmyquiz.quizstats
    • For example, if you have a quiz named "economics", look for: yquiz/economics/stats/economics.quizstats
  2. Download this file to your computer. You may need to enforce ASCII mode with your FTP client to retain the structure of the file.

Understanding Stats Permissions & Course Restrictions

In order to allow another person to view stats for your quiz, you must give them general permission to check stats, and then restrict that permission to one or more specific courses. You must also carefully follow the tagging conventions of the configuration file. Most of this can be accomplished by copying lines from our samples into your quizstats file and editing them.

Sample Quizstats File 1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<?xml version="1.0" encoding="ISO-8859-1"?>
<quizstats id="sample">
 <data_dir>./</data_dir>
 <quiz_dir>./</quiz_dir>
 <stats_permission_list enabled="true">
   <sp_username admin="false">johndoe</sp_username>
   <sp_username admin="true">superman</sp_username>
 </stats_permission_list>
 <course_restriction_list enabled="true">
   <restriction>
      <cr_username>johndoe</cr_username>
      <course>2003_AK_ECON_S1_1000__3_A_EN_A_LECT_01</course>
   </restriction>
 </course_restriction_list>
</quizstats>

In the sample above, the text between the <stats_permission_list> tags (lines 5 to 8) is the list of the people who are allowed to look at statistics for this course. At least one of the people (usually the quiz author) will be an administrator (admin="true"). The others will usually NOT be administrators. Here (at line 6) the user "johndoe" has been added to the stats permission list, but not as an administrator.

The text between the <course_restriction_list> tags (lines 9 to 14) is the list of all the course restrictions for that quiz. The user "johndoe" who was added to the permissions list has a matching entry in the course restrictions area, surrounded by <restriction> tags (lines 10 to 13). His username is repeated followed by the course to which he is restricted.

Step-by-Step Instructions

You can give permission to others to retrieve statistics and reports for your quiz by using the sample quiz file above as a template. These instructions assume that this is the first time that you have added someone to your stats configuration file.

  1. Open your quizstats file with a text editor. (Do not allow style or formatting information to be copied—text only!)
  2. Copy line 6 from our sample file and paste it into your quizstats file right after the opening <stats_permission_list> tag.
  3. Change the username from "johndoe" to the Passport York username of the person you want to allow to check stats. Be sure that the "admin" option is set to "false".
  4. Copy the entire course restriction list (lines 9 to 14 in the sample file) and paste it into in your quizstats file right after the closing </stats_permission_list> tag.
  5. Locate the <cr_username> tags (our line 11) in your quizstats file and change the username from "johndoe" (highlighted in red) to the same username you used in step 3 above.
  6. Locate the <course> tags (our line 12) in your quizstats file and change the course string (highlighted in purple) to the allowed course for the username on the preceding line.
    • Course strings can be obtained from http://coursecode.yorku.ca
    • You can add additional <course> tags for this user, if you want.
  7. Save your quizstats file.
  8. Upload your quizstats file to the web server.
  9. Go to your quizstats page to test that the statistics function is working.
  10. Email the URL of your quizstats page to your colleague.

Adding Another Person Later

If you add another person later on, the steps will be the same as above, except that at step 4 you should not copy the entire course restriction list. You only need to add a new set of restriction tags in this area of your quizstats file.

  • Copy the sample <restriction> (lines 10 to 13) and paste it into your quizstats file right after the opening <course_restriction_list> tag. Revise as indicated in original steps 5 and 6.

Sample Quizstats File 2

Here's another sample quizstats file that restricts the username johndoe to one course and the username jd to two other courses. Note that in this file there are two sets of <restriction> tags, one for each of the people who have been given special permission to check stats for their courses.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="ISO-8859-1"?>
<quizstats id="sample">
 <data_dir>./</data_dir>
 <quiz_dir>./</quiz_dir>
 <stats_permission_list enabled="true">
   <sp_username admin="false">johndoe</sp_username>
   <sp_username admin="false">jd</sp_username>
   <sp_username admin="true">superman</sp_username>
   </stats_permission_list>
 <course_restriction_list enabled="true">
   <restriction>
      <cr_username>johndoe</cr_username>
      <course>2003_AK_ECON_S1_1000__3_A_EN_A_LECT_01</course>
   </restriction>
   <restriction>
      <cr_username>jd</cr_username>
      <course>2003_AS_EN_W_1100__3_M_EN_A_LECT_01</course>
      <course>2003_SC_COSC_F_1020__3_A_EN_A_LECT_01</course>
   </restriction>
 </course_restriction_list>
</quizstats>