Search Google Appliance

Information Technology

Import Student Data to the Moodle Gradebook

We're taking you to an updated version of this article.

UMass Amherst Information Technology support articles are now updated in the new IT Knowledge Base. We found an updated version of this article, so we're sending you there.

Taking you to:

umass.service-now.com/sp
Redirecting in
10s

Stay here to view this page in the legacy Support Center.
Information may be outdated as these articles are no longer maintained.

Find answers to your tech questions in the new IT Knowledge Base.

UMass Amherst Information Technology support articles are now updated in the new IT Knowledge Base.

This article is part of our archived legacy Support Center and may be outdated or inaccurate.
We did not find an updated version of this article. That means this archived content is more likely to be outdated or no longer relevant.
Check the new IT Knowledge Base for updated information:

More tech help options

Using a spreadsheet, instructors can import student grades directly to the Moodle gradebook. This data can be imported into existing grade columns for Moodle activities, or into new grade items created during the import process. You cannot import directly into category totals or the Course total column. This page describes how to format a grading spreadsheet, and then import this student data into Moodle. For displaying imported grade as letters, see Letter Grades in Moodle.
Important: If you are importing Opscan results, see Import Opscan Test Results to Gradebook in Moodle.

Note: Teaching Assistants do not have permission to use this function by default. See Access to Moodle for Teaching Assistants - Add Full Gradebook Access for instructions on how to allow TAs to import grades.

Prepare a Data File for Import

To successfully import data to the Moodle gradebook, the import file must:

  • be saved as a Comma Separated Values (.csv) or Tab Delimited Text (.txt; use when importing comments)
  • have a header row containing a name for each column, and no duplicate headers
  • have a column containing unique identifiers for each student (either the 8-digit SPIRE ID number or email addresses that are listed for students in SPIRE) Note: Please be sure that there are no rows of data that do not have a student identifier as it might cause error in the grade upload.
  • have data only for students you intend to update (otherwise you may unintentionally override scores, even if cells are blank)
  • be free of duplicate students and empty cells (e.g., blank rows/columns, cells containing data other than student grades)
  1. For best results, we suggest you first go to the Moodle gradebook for the course and  Export the gradebook to use as a template to be imported back with new data. This will ensure you have the correct unique identifiers to match data to the correct students. See Export Gradebook Data from Moodle.

  2. Open the exported file and add your grade data.

    • If importing grades for an existing Grade item in Moodle, values must fit within the Grade range or Scale established in the activity settings.
    • To create new Grade items in the Moodle gradebook, add new columns to the spreadsheet document. Remember to label the column header.
      Note: Grades added in this manner will, by default, have a maximum value of 100 points and cannot exceed that value.
    • To import letter grades into Moodle, you must first create the Letter Grade column in the course grade book. See Letter Grades in Moodle.
    • To import strings of text that match values allowed by a Scale  (e.g., "Satisfactory," or "Not Satisfactory") see Custom Grading Scales in Moodle.
    • Written feedback can be imported into the Comments associated with a grade item.
  3. Save the file for import. Moodle will accept Comma Separated  Values (*.csv) or Tab Delimited Text (.txt).
    Important: If your spreadsheet includes values or headers containing commas, quotes, or apostrophes (for example, when importing feedback comments) save as a Tab Delimited Text file (.txt).

Import the File to the Moodle Gradebook

Regardless of which file format you decide to use (.csv or .txt), the following steps are the same.

To see these steps in a video tutorial, see Import grades from a .csv file to Moodle. (3 minutes, 41 seconds).

  1. Open your course grade book in Moodle and click the Import Tab. The Import: CSV file page will open.
    • Note: By default, Moodle will import a Comma Separated Values (.csv) or Tab Delimited Text (.txt) file (you can change the file format by looking below the Import tab and clicking XML file).
  2. In the Import file area, drag and drop a file from your desktop or click Choose a file....  The File picker will open. Use the File picker to select a file from your computer.  Once your file is uploaded, the file name will be displayed.
  3. On the Import CSV page, for Separator:
    • If uploading a Comma Separated Values (.csv) file, leave the option set to Comma.
    • If uploading a Tab Delimited Text (.txt) file, change the option to Tab.
        (click to enlarge)
    Leave other settings at defaults.
  4. Click Upload grades. If the upload is successful, the Import preview screen will open.
  5. In the Import preview area, review the sample grid and verify the upload data.
    Note: Data should appear in columns with headers above each column. If data is not displayed in a table with columns and rows, this indicates a problem with Moodle reading the file. Make sure the file is saved in the correct format and then repeat the upload.
  6. The Identify user by section is where you match the unique identifiers in your spreadsheet to students in Moodle.
    • To match users by Student ID, set both the Map from and Map to drop-down menus to ID number (default).
    • To match users by email address, set both the Map from and Map to drop-down menus to Email address.
  7. The Grade item mappings section is where you match columns in your spreadsheet to grade items in Moodle. The column headings from your imported file will be listed at left, with a drop-down menu (to the right) listing existing grade items in the course gradebook.
    • To import a column to an existing Grade item, select the Grade item name from the Grade item mapping drop-down.
      Note: This will overwrite existing data in the Moodle gradebook for each student in your spreadsheet.
    • To add a new Grade item, select new grade item (at top of drop-down list).
      Note: Each New grade item created in this manner will have a default maximum value of 100 points (If needed, you can adjust the maximum value after import—see Arrange & Customize the Gradebook in Moodle).
    • To skip a column, and not import its data, leave the drop down menu set to ignore.
    • To import written feedback for a Grade item, map the spreadsheet column to the Comments for a grade item, not to the Grade item itself, nor as a New grade item
      Note: Comments are grouped at the bottom of the Grade item mappings drop-down menus.
  8. Click Upload grades at the bottom of the screen.  The upload will begin. If the upload is successful, you will see a "Success" message.
  9. Click Continue to return to the Grader report view of your gradebook. Make sure the new data is properly inserted in the appropriate columns.

Errors and Troubleshooting for Grade Import

If the import fails there are several possible error messages and remedies:

  •  user mapping error, could not find user with username "Name"
    You did not properly set Step 6, (Identify user by).  Upload and import the file again making sure to match by Email address, or ID Number.
  •  user mapping error, could not find user with email address "name@student.umass.edu", or user mapping error, could not find user with ID number "12345678"
    Your file contains incorrect email addresses or student IDs. The import process will be canceled and no values imported. Return to your spreadsheet and fix the problem data, then upload and import again.
  •  user mapping error, could not find user with email address "", or user mapping error, could not find user with ID number ""
    The file contains empty cells, or duplicate students.
    Return to your spreadsheet, carefully select only the cells containing data, and copy and paste into a new spreadsheet. Another possible solution for a .csv file is to open the file in a text editor and remove the extra commas at the end of lines, or bottom of the page. Save the corrected file, then upload and import again.