Oxbridge Class Statistics

The Class Statistics (class_stats) project is a key part of class scheduling and paying instructor stipends. Classes are scheduled via a Google App-Engine interface created by Tali Rosca. The interface defines lectures separately from the schedule and location. Defined lectures can then be assigned to times and locations on the schedule calendar.

The scheduling interface makes JSON files with weekly scheduling available to PHP scripts on the Oxbridge website. A secondary PHP script makes available a JSON file with only the current day's schedule to inworld class monitoring scripts. These scripts reside in a monitoring object at each official inworld class location.

Class monitoring and class statistics gathering is done via two LSL scripts within the monitor object. The first script, using the single day JSON file, checks at 15 minutes after the hour at which a class is to begin. It determines whether the assigned instructor is present and the number of students present. The first script uses the second script to create an eight bin avatar age histogram of those attending the class.

After all the classes for the day at a given location have been monitored, an email is sent to the Dean of Education. After the end of each week, the emails are saved to this project's emails directory. They are then scraped for class data lines via a Python script, creating a comma separated data file (.csv) for the week. Further Python scripts are used to create a "Checks" file for the week, a cumulative weekly summary file of student numbers and age histogram, and a cumulative file with data for individual classes.

The data in the "Checks" file is then brought back in-world under the Oxbridge Mint account to pay instructor stipends for classes that occurred with the assigned instructor present.

The JSON files made available by the app-engine interface are also used by PHP scripts on the website to generate the two-week schedule image, the class catalog, and the schedule notecard. The schedule image and notecard have to be uploaded into Second Life manually and placed into the schedule server.

To update the schedule in the inworld kiosk server, one edits the server, deletes the old schedule image and notecard from the contents, and then adds the new schedule image and notecard. The final step is to reset the scripts from the viewer Build menu.

The kiosk server is "permanently" rezzed, so its UUID (Universal Unique Identifier, type 4) is stable. Using that UUID and within two hours, each schedule kiosk will poll the server via email for the UUID of the current schedule image. The server will then email the UUID back to the querying kiosk, which will update its display. When a kiosk is touched, it will email the avatar's UUID to the server, which will then give a copy of the schedule notecard to the avatar.

Scheduling of classes, creation of schedule images and notecards, monitoring of classes, and paying instructor stipends are all closely linked and automated to the extent possible.

Inworld Class Monitoring Scripts

ClassStats.lslMain class monitoring script
AgentAge.lslUsed by ClassStats to create an avatar age histogram

Processing Scripts

scrape.pyScrapes weekly class data from email files into a .csv file
payroll.pyGenerakes a "Checks" file from the weekly .csv file
concat.pyAppends individual class lines to *cumulative_stats.csv*
attendsum.pyAppends weekly totals of students and age histograms to *attendance.csv*

2020-02-09 — Wordsmith Jarvinen