Grades API

Grades API

gradereport_overview_get_course_grades

Arguments
userid (Default to "0")
        Get grades for this user (optional, default current)

General structure
int  Default to "0" //Get grades for this user (optional, default current)

REST (POST parameters)
userid= int

core_grades_update_grades


source (Required)
        The source of the grade update

General structure
string   //The source of the grade update

REST (POST parameters)
source= string

courseid (Required)
        id of course

General structure

int   //id of course

REST (POST parameters)
courseid= int

component (Required)
        A component, for example mod_forum or mod_quiz

General structure
string   //A component, for example mod_forum or mod_quiz

REST (POST parameters)
component= string

activityid (Required)
        The activity ID

General structure
int   //The activity ID

REST (POST parameters)
activityid= int

itemnumber (Required)
        grade item ID number for modules that have multiple grades. Typically this is 0.

General structure
int   //grade item ID number for modules that have multiple grades. Typically this is 0.

REST (POST parameters)
itemnumber= int

grades (Default to "Array ( ) ")
        Any student grades to alter

General structure

 Default to "Array
(
)
" //Any student grades to alter
list of ( 
object {
studentid int   //Student ID
grade double   //Student grade
str_feedback string  Optional //A string representation of the feedback from the grader
)

REST (POST parameters)
grades[0][studentid]= int
grades[0][grade]= double
grades[0][str_feedback]= string


mod_assign_get_grades

Arguments
assignmentids (Required)
        1 or more assignment ids

General structure
  //1 or more assignment ids
list of ( 
int   //assignment id
)

REST (POST parameters)
assignmentids[0]= int
since (Default to "0")
        timestamp, only return records where timemodified >= since

General structure
int  Default to "0" //timestamp, only return records where timemodified >= since

REST (POST parameters)
since= int

mod_quiz_get_user_best_grade

Arguments
quizid (Required)
        quiz instance id

General structure
int   //quiz instance id

REST (POST parameters)
quizid= int
userid (Default to "0")
        user id

General structure
int  Default to "0" //user id

REST (POST parameters)
userid= int

    • Related Articles

    • Bulk Import Grades

      OVERVIEW Grades may be imported as a CSV or XML file, or by pasting from a spreadsheet. The import file format is the same as the corresponding export format. WARNING: If this is your first time attempting this, rather create a blank test course to ...
    • Generate your API Key

      Step 1: Click on "Site admin", followed by "Integrations", then "Manage tokens": Step 2: Click on "Add": Step 3: (1) Select the user you wish to give the API Token to, (2) Select "API" then (3) Save: Step 4: Share this token with the user or save it ...
    • Setting Up Your API

      We advise the use of a developer to help you setup your API connection. We will offer an example of how to CREATE NEW USER on your LMS (core_user_create_users) Let's review only the required REST (POST parameters): wsfunction=core_user_create_users ...
    • Messaging API

      core_message_get_messages Arguments useridto (Required) the user id who received the message, 0 for any user.  useridfrom (Default to "0") the user id who send the message, 0 for any user. Note that a useridto=0 and useridfrom=0, will not work. At ...
    • Calendar API

      core_calendar_create_calendar_events Arguments events (Required) General structure list of (    //event object { name string   //event name description string  Default to "null" //Description format int  Default to "1" //description format (1 = HTML, ...