This space is archived

For current information please use the current ExamSys documentation

Marks Caching

Purpose

Marking in Rogo can be quite complicated. Questions can be included/excluded and percentages scaled depending on standard setting and other factors. Reports such as the 'Performance Summary' for a student require the range of marks for the whole cohort. Calculating this range could involve computationally expensive operations over 300 students. This, caching is employed to speed up this operation.

How it Works

Objects:

  • /classes/class_totals.class.php
  • /classes/results_cache.class.php

After a summative exam staff will go into the Class Totals report. This checks to see if caching is needed - if cached date is in place for the current paper and the exam has finished. If caching is needed then the class_totals.class.php object will write into three tables:

cache_median_question_marksHolds the mean and median performance of a question on a particular paper.
cache_paper_statsHolds statistics of the performance of a paper. Used in the Performance Summary reports.
cache_student_paper_marksHolds student marks/percent by paper. Used in the Performance Summary reports.

Automatic Re-caching

There are certain activities that will invalidate a cache:

  1. Changing the marking method in 'Edit Properties'
  2. Excluding or re-including a question
  3. Fill-in-the-Blank manual marks override

To get the system to recognise that re-caching is required the set_recache_marks(1) can be called on the paper object. This will set a flag on 'recache_marks' field in the properties table. When a member of staff goes back to /paper/details.php, which is a very commonly used screen, the system will pick up the recache flag and call /reports/recache_class_totals.php through AJAX and finally turn the flag off. AJAX is used so re-caching is handled transparently in the background and it removes the need for staff to explicitly go back to the Class Totals report.

Forced Re-caching

If there is a problem with populating a cache then it can be forced by using GET recache=1 on the end of the Class Totals URL.