Skip to content

Course PIcker Codebase

qqliu edited this page Sep 9, 2014 · 3 revisions

Welcome to the new and inproved Course Picker wiki!

For any questions related to the code base for this resource, please contact Quanquan Liu quanquan@mit.edu.

Framework

Course Picker runs off the Exhibit 3.0 framework. The data file used in the application is processed from the course feeds from the MIT data warehouse. A cron job in the picker directory at afs/athena.mit.edu/course/urop/picker/cron_scripts runs every minute updating the processed data file using a Node.js converter file.

Pages

All main parts of Course Picker are contained in one page: index.html. The application uses Exhibit views and widgets to display course data. All other functionality is implemented using Javascript/JQuery enumerated in the following section.

Scripts

All Javascript files are located under the scripts directory. autofill-recitations: Script containing the BFS algorithm implemented for filling in recitations for classes. index.js: Contains the scripts that are run after Exhibit has finished loading all data. These scripts are mainly responsible for loading other user data such as ratings if the user is logged in. browse.js: used for various clickable elements in the index page. class-data-importer: (OBSOLETE) Left over from the days when data was processed by a custom Exhibit importer before it was loaded. Now preprocessing occurs through the cron job. config: IMPORTANT Please update every semester. Contains the years and semester of the course. Please follow the format as stated in the comments in the file. google-cal-exporter: Contains the script for exporting Picker classes to Google Calendar. If you receive a 400 Error, update the token key. minigrid: Contains various methods related to the minigrid. section-picking: Methods related to picking classes. storing-data: Methods used in saving user data such as picked courses when the user is logged in.

Various other scripts deal with other functionality on the website. Scripts should be commented and comments explain each method's functionality.

PHP Scripts

This is a holdover from the old Course Picker with modifications. If anyone feels up to the task, they can feel free to turn this into Node.js or something else.

post: Save user actions and data when logged in. user: Used to obtain user data at the start of a session. Determines which data to obtain based on whether the user is logged in.

To the new developers of Picker, good luck and may the pick always be with you!

Clone this wiki locally