Skip to content

Uploading Enrollment Data

Rohan D'Souza edited this page Feb 1, 2021 · 1 revision

Uploading Enrollment Data

Requirements:

  • Make sure (through Heroku) that the CSM website is up and not under maintenance
  • Get CSV's of mentors and their corresponding sections (IN PROPER FORMAT)
  • Have collaboration access to Heroku
  • Have OCF account (or some way to host CSV's)

Notes:

  • represent course names in all caps. like CS61A and not cs61A or cs61a
    In Django, names must be all caps so this helps maintain consistency
    (also you can do whatever cause this is your local dev, but if you mess things up that's on you)
    This is why

Step 1 (skip if hosting CSV's yourself)

This step is for uploading the formatted CSV's to OCF. This allows us to access the data while in the prod shell (Django shell via Heroku)

  1. Make a local directory called "files" or whatever

  2. Download all CSV's into this directory

  3. scp the files directory into ~/public_html/files on your ocf account

     scp -r files <your_ocf_username>@ssh.ocf.berkeley.edu:'~/public_html/files'
    
  4. check that the csv's are available

     curl -L https://ocf.berkeley.edu/\~<your_ocf_username>/files/CS61A.csv
    

Step 2 - Create Course on Admin Page

  1. Go to scheduler.csmentors.org/admin
    note : you must be a superuser on the heroku django server to access the admin page

  2. Under Scheduler (in the left column) click on Courses and then in the top right Add Course

    • Name : CS61A
      Name of course must be in all caps
    • Title : Structure and Interpretation of Computer Programs
      Actual Berkeley title of course (get this from the course website or something)
    • Valid Until : 2021-05-20
      Make this a little past the end of the semester
    • Enrollment Start : 2021-02-03 , 12:00:00
      When students can actually see the mentor sections for the course and begin enrolling
    • Enrollment End : 2021-05-01 , 00:00:00
      When enrollment in sections is no longer available (as coordinators)
    • Section Start : 2021-02-08
      When we start recording attendance (ask coords)
    • Permitted absences : 2
      Not used for anything now (potential uses are like banning section enrollment from the course for the semester)
  3. Click SAVE

  4. Repeat for all courses

STEP 3 - Get data into dev server

Note: you must have Heroku access to do this
In this step, we will be running a script on the heroku server to parse a CSV and get the data into our prod server

  1. Validate locally

     ./csm_web/manage.py uploadsections --validateonly <all_caps_course_name> 'https://ocf.berkeley.edu/~<your_ocf_username>/files/<csv_name>.csv'
    
  2. Upload them

     heroku run -a csm-web "./csm_web/manage.py uploadsections <all_caps_course_name> 'https://ocf.berkeley.edu/~<your_ocf_username>/files/<csv_name>.csv'"
    
  3. Repeat for all courses