DataCabinet and NBGrader

DataCabinet provides you the backend to create and distribute programming assignments using nbgrader. You can create a populated assignment with both questions and answers and then nbgrader turns it into unpopulated version which contains only questions. Then you can share the assignments with students, auto grade and/or form grade assignment, and then distribute grades. Please find more documentation about nbgrader here: jupyter nbgrader

For instructor

Prerequisite: Install and configure nbgrader with DataCabinet:

  1. Create and Open a new project.

  2. Go to New > Terminal, and then install nbgrader. You need to type your own:

    jupyter nbextension install --user --overwrite --py nbgrader
    jupyter nbextension enable --user --py nbgrader
    jupyter serverextension enable --user --py nbgrader
    
  3. You might need to restart notebook or log out/log in again to see the changes. To restart the notebook, you will have to either logout/login or start another project and switch back to the current project. We are working on fixing this.

  4. On terminal, Run the following command to create an empty configuration file:

    nbgrader generate_config
    
  5. Make a directory in Terminal and give everyone permission to it:

    mkdir /mnt/nfs/<your email>/share
    chmod 777 /mnt/nfs/<your email>/share
    
  6. Open the nbgrader_config.py file that is generated through the jupyter console and put:

    c = get_config()
    c.Exchange.course_id = "<Project name>"
    c.Exchange.root = "/mnt/nfs/<your email>/share"
    c.ExecutePreprocessor.kernel_name = “<Project name>”
    

Please be careful there should be no spaces before these lines. You will have to restart notebook for exchange root to be setup properly.

Create assignment (Original project):

  1. Go to Formgrader > Add new assignment
  2. Open the folder that you just created and create a notebook. Open the notebook.
  3. Go to View > Cell Toolbar > Create Assignment.
  4. Add cells with content:
    1. Multiple cells with questions and tasks, each cell will have ID, points.
    2. Solution in a solution block and student is expected to fill it up
    3. Assessment for you to grade answers
  5. Save using File > Save and Checkpoint

Release assignment:

Go to Formgrader > Click Generate > Click Release

After releasing, instructors will have to create a student version of the assignment(explained in the next section: Create student version)

Collect & Grade assignment:

  1. Go to Formgrader > Click Collect
  2. click the digits under Submissions
  3. click the mark under Autograde and see the solutions.

Create student version

Repeat Step 1 to Step 4 on For Instructor -> Pre-Requisite . Choose a different project name silly.

Next, open the nbgrader_config.py file that is generated through the jupyter console and put:

c = get_config()
c.Exchange.course_id = "<PROJECT_NAME>"
c.Exchange.root = "/mnt/nfs/<instructor email>/share"

Notice that PROJECT_NAME is the course_id project created in the instructor version and instructor email is instructor's email where the project was shared. WE can also install any other data or packages that are required to run the project at this point.

Next, we share this project using DataCabinet Project Manager's share icon. That would give you the ID of the project. This ID can be shared with the student directly or as an http link: (https://datacabinet.systems/#/projectImportRequest?project_id=PROJECT_ID)

Group Assignments

Group Assignments are assignments that a group of students can work on collaboratively. All members of the group get the same score for group assignment for now.

  • To create group assignment - just select is_group checkbox in create assignment modal.
  • After creating assignment go to Groups tab and create student groups. Add members to the group and assignment(s) this group will work on
  • Releasing, collecting and grading assignment is the same as for individual assignments

Integration with LMS

We provide integration with most popular lms system like Canvas, Blackboard, Moodle, Open EdEx. You can synchronize students' assignments grades with any of these platforms. To enable LMS synchronization, add to config:

c.CourseDirectory.lms_type = 'canvas'  # string

Requirements

  • Students' e-mails on Nbgrader are identical with students' e-mails on lms system
  • Assignments names on Nbgrader are identical with assignments names on lms system
  • You must be an course instructor on lms system
  • You must have API access on lms system

Integration with Canvas

Getting api token

Go to your profile settings page and at the bottom click the button that says "New Access Token". You can use this access token to synchronize grades with Nbgrader

Usage

Go to nbgrader home '/tree' and open nbgrader_config.py. Type next strings:

c.CourseDirectory.lms_type = 'canvas'
c.CourseDirectory.canvas_token = 'Your canvas api token'  # string
c.CourseDirectory.canvas_domain = 'Your canvas domain'  # string (e.g https://canvas.instructure.com)
c.CourseDirectory.canvas_course_id = 'Your canvas course id'  # string (the easiest way to get course_id is from url on course page)

Then save the file. In Nbgrader assignments manager click synchronize button with assignment name near your assignment.

Integration with BlackBoard

Getting api token

Register new app on https://developer.blackboard.com then, contact with your blackboard portal administrator to accept your app

Usage

Go to nbgrader home '/tree' and open nbgrader_config.py. Type the following strings:

c.CourseDirectory.lms_type = 'blackboard'
c.CourseDirectory.blackboard_app_key = 'Your BlackBoard app key'  # string
c.CourseDirectory.blackboard_app_secret = 'Your BlackBoard app secret'  # string
c.CourseDirectory.blackboard_learn_domain = 'Domain of BlackBoard your blackboard portal'  # for example 'http://my.blackboard.com'
c.CourseDirectory.blackboard_course_id = 'Your BlackBoard course id'  # string

Then save the file. In Nbgrader assignment manager click synchronize button with assignment name near your assignment.

Integration with Moodle

Getting api token

Contact with your Moodle portal administrator to get access token

Usage

Go to nbgrader home '/tree' and open nbgrader_config.py. Type the following strings:

c.CourseDirectory.lms_type = 'moodle'
c.CourseDirectory.moodle_app_key = 'Your access Moodle torken'  # string
c.CourseDirectory.moodle_domain = 'Your Moodle domain'  # for example 'http://mymoodle.com'
c.CourseDirectory.moodle_course_id = 'Your Moodle course id'  # string

Then save the file. In Nbgrader assignment manager click synchronize button with assignment name near your assignment.

Integration with Open EdEx

Open EdEx requirements

Getting api token

To request access to the edX Course Catalog API, you need a dedicated edx.org account with a user name that matches your organization’s identity. For example, if you are at an organization named Example, Inc., you need to create an edX account with a user name like Example. This enables edX to match your Course Catalog API request with an organization that is authorized to use the Course Catalog API.

To request access to the edX Course Catalog API, follow these steps.

  • Sign in to edX at https://courses.edx.org/login with an account whose user name matches your organization’s identity, as described in Create an Account on edx.org for API Access.
  • Go to http://courses.edx.org/api-admin.
  • On the EdX API Access Request page, enter the information for your organization. All fields are required.
::
Company Name: The name of your company. Website: The URL for your company’s website. Company Address: Your company’s mailing address. This can be a street address or a post office box. Application Description: A brief description of the main use for your application.
  • At the bottom of the form, select the Terms of Service check box.
  • Select Request API Access to submit your request.

After you submit the request form, edX will review your request, and then edX will send you an email message approving your request or providing more information.

When you receive your approval email message from edX, follow these steps.

  • Go to http://your-edx-platform.com/api-admin/status.

  • On the page that opens, enter the following information.

    Name: An identifying name that you assign to your application.
    Redirect URIs (optional):  https://datacabinet.info
    
  • Select Generate API client credentials.

The screen displays your application name, client ID, client secret, and any redirect URIs that you entered. Make sure that you record your client ID and client secret.

Usage

Go to nbgrader home '/tree' and open nbgrader_config.py. Type next strings:

c.CourseDirectory.lms_type = 'edx'
c.CourseDirectory.edx_auth_username = 'edx username'
c.CourseDirectory.edx_auth_password = 'edx password'
c.CourseDirectory.edx_users_ids = {'honor@example.com': 6}  # You may put dict of edx students ids into the settings
c.CourseDirectory.edx_app_key = 'Your app key'
c.CourseDirectory.edx_app_secret = 'Your app secret'
c.CourseDirectory.edx_courseid = 'your edx course id'  # for example 'course-v1:edX+DemoX+Demo_Course'
c.CourseDirectory.edx_domain = 'http://your-edx-platform.com'

Then save it file. In Nbgrader assignment manager click synchronize button with assignment name near your assignment.

Plagiarism detection

We provide a powerful tool for plagiarism detection- it's a MOSS.

How to use Moss report

  1. Go to Formgrader -> Manage Assignments
  2. Click on submission count (must be > 1)
  3. On "Manage Submissions" page click "Get moss report" button and wait few seconds
  4. Go to "View moss report" URL, that generated near "Get moss report" button.

For Student Users

To access assignments, students needs to import a course with the ID generated in the previous step (or by clicking the link). After import, you have the run the project, open a terminal and enable nbgrader:

jupyter nbextension install --user --overwrite --py nbgrader
jupyter nbextension enable --user --py nbgrader
jupyter serverextension enable --user --py nbgrader

To get assignment, you need to click “fetch” first in Assignents and open the assignment. After you finish the assignment, you just can click submit.

*Keep in mind that you may need to log out and in the account after you install nbgrader.

*When you create a new notebook, you have to choose the same name as the project’s name under “New”.