Documentation ¶
Overview ¶
short provides the core functionality for managing and grading coding modules. It handles initialization, grading, result uploading, and module lifecycle management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndModule ¶
EndModule grades all repositories in a module and removes write access for all participants.
- module: the module object containing the exercises
- config: the configuration object containing participants' information
func GradeModule ¶
GradeModule grades the exercises in a module for a specific student repository.
- module: the module object containing the exercises
- repoID: the ID of the student's repository
Returns an error if the grading process fails.
func StartModule ¶
StartModule creates a new repository for each participant, gives them write access, and uploads the module's subject to the repository.
- module: the module object containing the exercises
- config: the configuration object containing participants' information
Types ¶
type Config ¶
type Config struct { StartDate time.Time EndDate time.Time Participants []Participant }
func GetConfig ¶
Reads the configuration from CONFIG_PATH.
Returns a Config object containing the information set in your json.
See https://github.com/42-Short/shortinette/README.md for details on .env configuration.
type Participant ¶
type Short ¶
type Short struct { Name string // Name is the display name of the Short. Modules map[string]Module.Module // Modules is a map of module names to their corresponding Module structs. TestMode ITestMode.ITestMode // TestMode determines how the submission testing will be triggered. }
Short represents the main structure for managing a coding module, including the module's name, its exercises, and the test mode to use.
func NewShort ¶
NewShort returns a Short object, which serves as the wrapper for the entire Short configuration.
- name: the display name of your Short
- modules: a map of strings to Module.Module objects, used for quicker lookups during grading
- testMode: a ITestMode object, determining how the submission testing will be triggered
func (*Short) StartModule ¶ added in v0.4.9
Start begins the module lifecycle by starting the module and running the test mode.
- module: the name of the module to be started
Directories ¶
Path | Synopsis |
---|---|
Interface for creation of test modes, such as WebhookTestMode.
|
Interface for creation of test modes, such as WebhookTestMode. |
webhook
webhook provides functionality to monitor GitHub webhook events and trigger grading of student submissions based on push events to the main branch.
|
webhook provides functionality to monitor GitHub webhook events and trigger grading of student submissions based on push events to the main branch. |