Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/grade/import/lib.php File Reference

Go to the source code of this file.

Functions

 get_new_importcode ()
 grade_import_commit ($courseid, $importcode, $importfeedback=true, $verbose=true)
 get_unenrolled_users_in_import ($importcode, $courseid)
 import_cleanup ($importcode)

Function Documentation

Returns new improtcode for current user

Returns:
int importcode

Definition at line 24 of file lib.php.

Here is the caller graph for this function:

get_unenrolled_users_in_import ( importcode,
courseid 
)

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.

Parameters:
integer$importcodeimport batch identifier
integer$courseidthe course we are importing to.
Returns:
mixed and array of user objects, or false if none.

Definition at line 162 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

grade_import_commit ( courseid,
importcode,
importfeedback = true,
verbose = true 
)

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

Parameters:
intcourseid - id of the course
stringimportcode - import batch identifier
feedbackprint feedback and continue button
Returns:
bool success

first select distinct new grade_items with this batch

create a new grade item for this - must use false as second param! TODO: we need some bounds here too

then find all existing items

Definition at line 45 of file lib.php.

Here is the call graph for this function:

import_cleanup ( importcode)

removes entries from grade import buffer tables grade_import_value and grade_import_newitem after a successful import, or during an import abort

Parameters:
stringimportcode - import batch identifier

Definition at line 200 of file lib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations