Developer Documentation

  • Bug fixes for general core bugs in 3.7.x will end 11 May 2020 (12 months).
  • Bug fixes for security issues in 3.7.x will end 9 November 2020 (18 months) - Support has ended.
  • minimum PHP 7.1.0 Note: minimum PHP version has increased since Moodle 3.6. PHP 7.2.x and 7.3.x are supported too. PHP 7.x could have some engine limitations.
  • Differences Between: [Versions 35 and 37] [Versions 36 and 37]

    (no description)

    File Size: 231 lines (10 kb)
    Included or required:0 times
    Referenced: 2 times
    Includes or requires: 0 files

    Defines 4 functions

    Functions that are not part of a class:

    get_new_importcode()   X-Ref
    Returns new improtcode for current user

    return: int importcode

    grade_import_commit($courseid, $importcode, $importfeedback=true, $verbose=true)   X-Ref
    given an import code, commits all entries in buffer tables
    (grade_import_value and grade_import_newitem)
    If this function is called, we assume that all data collected
    up to this point is fine and we can go ahead and commit

    return: bool success
    param: int $courseid - ID of the course.
    param: int $importcode - Import batch identifier.
    param: bool $importfeedback - Whether to import feedback as well.
    param: bool $verbose - Print feedback and continue button.

    get_unenrolled_users_in_import($importcode, $courseid)   X-Ref
    This function returns an array of grades that were included in the import,
    but where the user does not currently have a graded role on the course. These grades
    are still stored in the database, but will not be visible in the gradebook unless
    this user subsequently enrols on the course in a graded roles.

    The returned objects have fields user firstname, lastname and useridnumber, and gradeidnumber.

    return: mixed and array of user objects, or false if none.
    param: integer $importcode import batch identifier
    param: integer $courseid the course we are importing to.

    import_cleanup($importcode)   X-Ref
    removes entries from grade import buffer tables grade_import_value and grade_import_newitem
    after a successful import, or during an import abort

    param: string importcode - import batch identifier