Documentation ¶
Index ¶
- type Assignment
- type Client
- func (c *Client) GetCourseAssignments(course *Course) ([]Assignment, error)
- func (c *Client) GetCourses() ([]Course, error)
- func (c *Client) GetSubmissions(assignment *Assignment) ([]Submission, error)
- func (c *Client) IsLoggedIn() bool
- func (c *Client) LoginWithGradescope(email, password string) error
- func (c *Client) LoginWithSSO(slug, username, password string) error
- func (c *Client) StoreAssignmentExtraData(assignment *Assignment) error
- func (c *Client) StoreSubmissionExtraData(submission *Submission) error
- func (c *Client) SubmitProgrammingAssignmentCustom(assignment *Assignment, fileData map[string]string) (string, error)
- func (c *Client) SubmitProgrammingAssignmentFiles(assignment *Assignment, filenames []string, pathToTrim string) (string, error)
- type Course
- type Submission
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignment ¶
type Assignment struct { Name string ID uint Status string // submitted state or score ReleaseDate time.Time DueDate time.Time HasSubmissionAvailable bool // ID of submission active for an assignment ActiveSubmissionID uint // HasCompleteData indicates the presence of valid data for IsProgrammingAssignment, HasLeaderboard, and AllowsUploads HasCompleteData bool IsProgrammingAssignment bool HasLeaderboard bool AllowsUploads bool *Course }
Course is the representation of an assignment for a course
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client necessary to interact with Gradescope, which can be initialized with goscope.New()
func (*Client) GetCourseAssignments ¶
func (c *Client) GetCourseAssignments(course *Course) ([]Assignment, error)
GetCourseAssignments returns the assignments for a course
func (*Client) GetCourses ¶
GetCourses returns the courses in a student's dashboard (only student courses)
func (*Client) GetSubmissions ¶
func (c *Client) GetSubmissions(assignment *Assignment) ([]Submission, error)
GetSubmissions returns all the past submissions associated with an assignment
func (*Client) IsLoggedIn ¶
IsLoggedIn returns whether a client is logged in
func (*Client) LoginWithGradescope ¶
LoginWithGradescope attempts to login to an account with the default Gradescope account (requires an email and password)
func (*Client) LoginWithSSO ¶
LoginWithSSO attempts to login utilizing an institution's single sign-on (Gradescope's "school credentials" login option), with the slug used by Gradescope and the account's associated username and password; this method only supports SSO systems utilizing Shibboleth
func (*Client) StoreAssignmentExtraData ¶
func (c *Client) StoreAssignmentExtraData(assignment *Assignment) error
StoreSubmissionExtraData adds data to the IsProgrammingAssignment, HasLeaderboard, and AllowsUploads fields to an assignment
func (*Client) StoreSubmissionExtraData ¶
func (c *Client) StoreSubmissionExtraData(submission *Submission) error
StoreSubmissionExtraData adds data to the Files, AutograderResults, and Questions fields to a submission
func (*Client) SubmitProgrammingAssignmentCustom ¶
func (c *Client) SubmitProgrammingAssignmentCustom(assignment *Assignment, fileData map[string]string) (string, error)
SubmitProgrammingAssignmentCustom submits data supplied in a map[string]string to an assignment
func (*Client) SubmitProgrammingAssignmentFiles ¶
func (c *Client) SubmitProgrammingAssignmentFiles( assignment *Assignment, filenames []string, pathToTrim string, ) (string, error)
SubmitProgrammingAssignmentFiles submits data to an assignment with the supplied filenames (prefix trimmed with pathToTrim)
type Submission ¶
type Submission struct { ID uint CreationDate time.Time IsActive bool // HasCompleteData indicates the presence of valid data for Files, AutograderResults, and Questions HasCompleteData bool Files []submissionFile // files submitted AutograderResults autograderResults // results of autograder test cases Questions []question // questions and associated scores *Assignment }
Submission is the representation of a submission for an assignment