Skip to content
Chris Manghane edited this page Jul 26, 2013 · 6 revisions

Grades are attached to submissions in Galah. Though Galah provides an alright interface for accessing students grades (and a pretty good interface for students to access their own grades) you'll often want to extract your student's grades or modify them. The commands on this page help towards those goals.

Note that currently there is no shortcuts for referencing submissions and you'll have to copy and paste IDs around, sorry about this!

Command Name Description
get_archive Gets an archive file containing all of the submissions for a particular assignment.
get_csv Gets a CSV file that contains all of the students' grades.
get_gradebook Gets a CSV that contains the grades for each student on each assignment in the class, in a gradebook style.
rerun_harness Reruns the test harness on the latest submission of each student.
change_submission_grade Changes the grade of a particular submission.

get_archive

Download all the submissions for a given assignment as a tarball. The tarball is structured with directories corresponding to users as top-level directories, then each of their submissions are in timestamped directories. See the below example...

user@school.edu
|---- 2012-10-20-23-44-55
|     |---- main.cpp
|     +---- something_else.cpp
|---- 2012-10-20-23-33-21
+     +---- main.cpp
other_user@school.edu
|---- 2012-10-19-21-33-43
+     +---- main.cpp

The timestamps follow the format YEAR-MONTH-DAY-HOUR-MINUTE-SECOND. Also, in the unlikely scenario that two submissions by the same user have the same timestamp, the timestamped directory will follow the format YEAR-MONTH-DAY-HOUR-MINUTE-SECOND-RANDOMNUMBER.

Reference

get_archive assignment [email = '']
assignment
The assignment to grab an archive of.
<dt>email</dt>
<dd>You can optionally specify a user's email to filter on, and only that user's submissions will be downloaded. The structure of the archive will remain the same however (so the only top-level directory will be named ``email``).</dd>

Example Usage

$ get_archive 5091654355c448096df90687
--Acting as user jsull003@ucr.edu--
Your archive is being created. You have 0 jobs ahead of you.
The server is requesting that you download a file...
Where would you like to save it (default: ./submissions.tar.gz)?: submissions-all.tar.gz
File saved to submissions-all.tar.gz.
$ get_archive 5091654355c448096df90687 student@ucr.edu
--Acting as user jsull003@ucr.edu--
Your archive is being created. You have 0 jobs ahead of you.
The server is requesting that you download a file...
Where would you like to save it (default: ./submissions.tar.gz)?:  
File saved to ./submissions.tar.gz.

Permissions

admin, teacher, and teaching_assistant users can use this command. Teacher and Teaching Assistant users can only download submissions for assignments in a class they're assigned to.

get_csv

Get a CSV containing all of the scores of all of the students for a particular assignment.

The format of the CSV is email,score,date, where score will be None if the user's last submission did not have a score associated with it.

Example of a line: magicman@school.edu,None,2013-02-12-13-31-02.

Note that currently only the most recent submission is grabbed, it does not look for the most recent submission with a score.

Reference

get_csv assignment

Example Usage

$ get_csv 10/6
--Acting as user john@admin.edu--
The CSV file for this assignment is being created.
The server is requesting that you download a file...
Where would you like to save it (default: ./assignment.csv)?: 
File ./assignment.csv already exists, would you like to overwrite it (y, n)? y
File saved to ./assignment.csv.

Permissions

admin, teacher, and teaching_assistant users can use this command.

get_gradebook

Get a CSV containing all of the scores of all of the students for each assignment in a particular class.

The format of the CSV is username,assn1_score,assn2_score,..., where score will be 0 if the user did not make a graded submission for the assignment. The empty score can be configured with the fill parameter.

Example of a line (w/ Header):

username,"Assignment 1","Assignment 2","Assignment 3"
magicman@school.edu,2.5,3.0,0.0

Note that currently only the most recently graded submission for each assignment, not necessarily the submission with highest score.

Reference

get_gradebook assignment [fill=0]

Example Usage

$ get_gradebook 10
--Acting as user john@admin.edu--
The CSV file for this class is being created.
The server is requesting that you download a file...
Where would you like to save it (default: ./gradebook.csv)?: 
File ./gradebook.csv already exists, would you like to overwrite it (y, n)? y
File saved to ./gradebook.csv.

Permissions

admin, teacher, and teaching_assistant users can use this command.

rerun_harness

Reruns the current test harness on each student's latest submission.

Reference

rerun_harness assignment

Example Usage

$ rerun_harness dummy/awesome_assignment
--Acting as user john@admin.edu--
Rerunning test harnesses on submissions for awesome_assignment

Permissions

admin, teacher, and teaching_assistant users can use this command.

change_submission_grade

Changes the grade of a submission.

Reference

change_submission_grade assignment user new_score [submission = '']

Example Usage

$ change_submission_grade "CS 111"/"Assignment 4" ds003@school.edu 78 
Successfully changed the score of Submission [id = 51967b3245fd9deccdfedb9e, user = ds003@school.edu, date = 2013-05-17 11:46:59.237000] to 78

Permissions

admin, teacher, and teaching_assistant users can use this command.