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
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:
There are certain activities that will invalidate a cache:
- Changing the marking method in 'Edit Properties'
- Excluding or re-including a question
- 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.
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.