Instructor
As an instructor, you are allowed to perform tasks such as :
- View details of workshops you're assigned to
- Modify workshop material
- Create, modify and delete assignments
- Enroll or unenroll participants
- View participant scores
- Open and use your own jupyterlab instance by logging into the jupyterhub server with your credentials.
For managing a particular workshop, click the Manage button for that workshop in the dashboard.
All functions specific to an Instructor are documented below. For common functionality, please refer to participant documentation.
Note: When you first sign up to the system, you are defaulted to the role of a participant. You should ask an Admin to promote you to an instructor and assign you to workshops.
The system dashboard is available at : nsm.adityaap.tech
Jupyterhub is available at : j.adityaap.tech
Workshop Materials
- You can upload workshop course materials as a
zipfile. This should include all teaching material that you need participants to follow along, like jupyter notebooks, code files and anything else. - Prepare a zip file of all these, then click on the
Browsebutton and select your file, then pressUpload. - You can check the uploaded contents by downloading them via the
Downloadbutton. - Ensure there are not a lot of nested files/directories within you zip contents to provided a better experience to participants.
Participant Enrollment
You can either bulk enroll participants to the workshop or enroll them individually as required.
For bulk enrollment:
-
Click on the
Bulk Enroll via CSVbutton -
The participant data needs to be provided in a fixed csv format:
full_name, email, password
For example participants.csv:
full_name,email,password
1,aditya@mail.com,aditya123
2,vishal@mail.com,vishal123
- Either directly paste the csv data or upload the csv file, then press
Enroll Participants - This will start the enrollment process, which might take some time depending on the number of participants
- For each participant:
- If their account doesn't exist, their account is created with the given details and then enrolled to the workshop.
- If an account with the email exists, they are only enrolled to the workshop. Their details such as name/password do not change
For individual enrollment:
- Click to go to the
Enrollments & Scorestab, then click onAdd Enrollmentbutton. - This allows you to search through all the users in the current system, and enroll them. If they do not exist, ask them to sign up to the system.
For unenrolling participants:
- Click to go to the
Enrollments & Scorestab, then search to find the participant you need to unenroll. - Click on their actions button and select
Delete. This will delete the enrollment i.e. unenroll the user from the workshop.
Participant Scores
- Participant Scores for each assignment are visible in
Enrollments & Scorestab. - You can search and filter through participants via the given search box.
- You can export a detailed progress report via the
Export CSVbutton.
Assignments
Assignments are the coding exercises you give to your participants to solve and score marks.
- Each assignment can either be
Requiredor optional. Participants must complete all theRequiredassignments to complete the workshop. - Each assignment has these properties:
- Name: The title of the assignment
- Description: An optional description of the assignment
- Maximum Score: Maximum possible score for the assignment
- Passing Score: Score required to pass the assignment
- Assignment ID : This is a globally unique permanent ID assigned to your assignment by the system. It is shown in the assignment list with a hash(
#). For example, an assignment having#10has an Assignment ID 10. This is an important property, as Assignment ID is the number you pass to theevaluatecommand for submissions. We will see this further.
Grader/Judge Code
- Each assignment has an associated grader code(also called judge code). This is either a shell script or a python script that allows you to evaluate participant submitted code/file and assign them scores. Remember, we are evaluating code with code.
- The judging script must follow a specific input/output format.
- For input ( as the first argument ), it will receive the path for the file that participant submitted.
- The judging code may perform its task by first compiling the file (if not already compiled), then executing, checking its output and/or execution time and calculating the desired score.
- Finally the judging code should print only the score as a number to
stdout
Here is a very simple example of a python judging code:
#!/usr/bin/env python3
import sys, subprocess, time
# Getting the path of submission as 1st argument
exe = sys.argv[1]
# staring the timer
start = time.perf_counter()
# running the user code by passing 100 as input and collecting its output
out = subprocess.check_output([exe, "100" ])
out = out.decode().strip()
# calculating total execution time
runtime = time.perf_counter() - start
# calculating score (assuming correct ans is 300 and time limit is 1.5 seconds)
score = 0
if out == "300" and runtime <= 1.5:
score = 100
# outputting score
print(score)
Note : Both the judging code and user submitted code is run in a secure isolated environment with limited permissions. There are also hard limits on execution time and memory, after which the all processes are killed. This is necessary to prevent one submission getting unfair amounts of time while others are waiting in queue.
Setting up evaluation cells
To allow your participants to easily make submissions for your assignments, you should include an evaluate cell in you notebooks.
evaluate is a special command inside participants environment that allows them to queue their code for evaluation. It requires a parameter a : the assignment id (discussed above) and file path ( of the file to be submitted) as an argument.
For example, to submit a file called pi stored in participant's home inside of assignments directory, for an assignment with id: 33 you should include this code cell:
!evaluate -a 33 $HOME/assignments/pi
Assignment Order
- We can enfore sequential completion of assignments by turning the
Enforce Sequential Completionoption for the workshop (ask an admin to do this). Then we can order assignements in any order as required by dragging and dropping them in the Assignments tab. - Their order number is displayed in the list (note that this is different from the permanent assignment id, which is shown with a
#).