-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New course management script, point documentation to ngshare
- Loading branch information
1 parent
3e21f6a
commit 30c5d63
Showing
3 changed files
with
224 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,101 +12,4 @@ To install this and `ngshare`, see the instructions on [Read the Docs](https://n | |
|
||
# ngshare Course Management | ||
|
||
To manage students in your course, please don't use formgrader's web interface since it doesn't use ngshare. Instead, use the `ngshare-course-management` command that gets installed with this package. Usage is as follows: | ||
|
||
## Flags | ||
- `-c`, `--course_id` : A unique name for the course. | ||
- `-s`, `--student_id` : The ID given to a student. | ||
- `-i`, `--instructor_id` : The ID given to an instructor | ||
- `-f`, `--first_name` : First name of the user you are creating | ||
- `-l`, `--last_name` : Last name of the user you are creating | ||
- `-e`, `--email` : Email of the user you are creating | ||
- `--students_csv` : csv file containing a list of students to add. See `students.csv` as an example. | ||
- `--instructors` : list of instructors | ||
- `--gb` : add/update the student to the nbgrader gradebook | ||
- `--force` : use to force an nbgrader gradebook command | ||
--- | ||
### Create a course | ||
User creating course must be *admin*. | ||
You can specify the instructors for the course in a list. | ||
|
||
``` | ||
$ ngshare_course_management create_course --course_id math101 | ||
``` | ||
``` | ||
$ ngshare_course_management create_course -c math101 -i | ||
``` | ||
``` | ||
$ ngshare_course_management create_course --course_id math101 --instructors math101_instructor1 math101_instructor2 | ||
``` | ||
|
||
Remember to add the `nbgrader_config.py` on the course root directory e.g. `/home/username/math101` | ||
Example course configuration file: | ||
```python | ||
c = get_config() | ||
c.CourseDirectory.course_id = 'math101' | ||
``` | ||
|
||
Also, remember to add the `nbgrader_config.py` on the instructor's `/home/username/.jupyter` folder. | ||
Example user configuration file: | ||
```python | ||
c = get_config() | ||
c.CourseDirectory.root = '/home/username/math101' | ||
``` | ||
|
||
### Add/update one student | ||
``` | ||
$ ngshare_course_management add_student --course_id math101 --student_id 12345 --first_name jane --last_name doe --email [email protected] | ||
``` | ||
``` | ||
$ ngshare_course_management add_student -c math101 -s 12345 -f jane -l doe -e [email protected] | ||
``` | ||
|
||
first name, last name, and email are optional parameters. | ||
|
||
### Add/update multiple students | ||
``` | ||
$ ngshare_course_management add_students --course_id math101 --students_csv math101Students.csv | ||
``` | ||
``` | ||
$ ngshare_course_management add_students -c math101 --students_csv math101Students.csv | ||
``` | ||
|
||
The csv file must have the following columns: **student_id**, **first_name**, **last_name**, **email**. | ||
|
||
### Remove student from a course | ||
``` | ||
$ ngshare_course_management remove_student --course_id math101 --student_id 12345 | ||
``` | ||
``` | ||
$ ngshare_course_management remove_student -c math101 -s 12345 | ||
``` | ||
|
||
### Add instructor to a course | ||
``` | ||
$ ngshare_course_management add_instructor --course_id math101 --instructor_id 12345 --first_name jane --last_name doe --email [email protected] | ||
``` | ||
``` | ||
$ ngshare_course_management add_instructor -c math101 -i 12345 -f jane -l doe -e [email protected] | ||
``` | ||
first name, last name, and email are optional parameters | ||
|
||
### Remove instructor from a course | ||
``` | ||
$ ngshare_course_management remove_instructor --course_id math101 --instructor_id 12345 | ||
``` | ||
``` | ||
$ ngshare_course_management remove_instructor -c math101 -i 12345 | ||
``` | ||
--- | ||
You can add the `--gb` flag at the end of `add_student`, `add_students`, or `remove_student` to add or remove the students from the nbgrader gradebook **and** ngshare | ||
|
||
For example running: | ||
``` | ||
$ ngshare_course_management add_student -c math101 -s 12345 -f jane -l doe -e [email protected] --gb | ||
``` | ||
|
||
Adding the --gb flag runs: | ||
``` | ||
$ nbgrader db student add --first-name jane --last-name doe --email [email protected] 12345 | ||
``` | ||
To manage students in your course, please don't use formgrader's web interface since it doesn't use ngshare. Instead, use the `ngshare-course-management` command that gets installed with this package. Please [read the documentation](https://ngshare.readthedocs.io/en/latest/user_guide/course_management.html) for instructions on how to use this tool. |
Oops, something went wrong.