|
| $columns |
|
| $course |
|
| $decimalpoints |
|
$displaytype | $displaytype |
| Grade display type (real, percentages or letter). More...
|
|
| $export_feedback |
|
| $export_letters |
|
| $grade_items |
|
| $groupid |
|
| $onlyactive |
|
| $plugin = 'xls' |
|
$previewrows | $previewrows |
|
| $updatedgradesonly |
|
| $usercustomfields |
|
| $userkey |
|
◆ __construct()
grade_export_xls::__construct |
( |
|
$course, |
|
|
|
$groupid, |
|
|
|
$formdata |
|
) |
| |
Constructor should set up all the private variables ready to be pulled.
This constructor used to accept the individual parameters as separate arguments, in 2.8 this was simplified to just accept the data from the moodle form.
- Parameters
-
object | $course | |
int | $groupid | |
stdClass | null | $formdata | |
- Note
- Exporting as letters will lead to data loss if that exported set it re-imported.
Reimplemented from grade_export.
◆ convert_flat_displaytypes_to_array()
static grade_export::convert_flat_displaytypes_to_array |
( |
|
$displaytypes | ) |
|
|
staticinherited |
Convert the grade display types parameter into the required array to grade exporting class.
In order to export, the array key must be the display type name and the value must be the grade display type constant.
Note: Added support for combined display types constants like the (GRADE_DISPLAY_TYPE_PERCENTAGE_REAL) as the $CFG->grade_export_displaytype config is still used on 2.7 in case of missing displaytype url param. In these cases, the file will be exported with a column for each display type.
- Parameters
-
string | $displaytypes | can be a single or multiple display type constants comma separated. |
- Return values
-
◆ convert_flat_itemids_to_array()
static grade_export::convert_flat_itemids_to_array |
( |
|
$itemids | ) |
|
|
staticinherited |
Convert the item ids parameter into the required array to grade exporting class.
In order to export, the array key must be the grade item id and all values must be one.
- Parameters
-
string | $itemids | can be a single item id or many item ids comma separated. |
- Return values
-
array::$items | correctly formatted array. |
◆ deprecated_constructor()
grade_export::deprecated_constructor |
( |
|
$course, |
|
|
|
$groupid = 0 , |
|
|
|
$itemlist = '' , |
|
|
|
$export_feedback = false , |
|
|
|
$updatedgradesonly = false , |
|
|
|
$displaytype = GRADE_DISPLAY_TYPE_REAL , |
|
|
|
$decimalpoints = 2 , |
|
|
|
$onlyactive = false , |
|
|
|
$usercustomfields = false |
|
) |
| |
|
protectedinherited |
Old deprecated constructor.
This deprecated constructor accepts the individual parameters as separate arguments, in 2.8 this was simplified to just accept the data from the moodle form.
- Deprecated:
- since 2.8 MDL-46548. Instead call the shortened constructor which accepts the data directly from the grade_export_form.
◆ display_preview()
grade_export::display_preview |
( |
|
$require_user_idnumber = false | ) |
|
|
inherited |
Prints preview of exported grades on screen as a feedback mechanism.
- Parameters
-
bool | $require_user_idnumber | true means skip users without idnumber |
- Deprecated:
- since 2.8 MDL-46548. Previews are not useful on export.
◆ export_bulk_export_data()
static grade_export::export_bulk_export_data |
( |
|
$id, |
|
|
|
$itemids, |
|
|
|
$exportfeedback, |
|
|
|
$onlyactive, |
|
|
|
$displaytype, |
|
|
|
$decimalpoints, |
|
|
|
$updatedgradesonly = null , |
|
|
|
$separator = null |
|
) |
| |
|
staticinherited |
Create a stdClass object from URL parameters to be used by grade_export class.
- Parameters
-
int | $id | course id. |
string | $itemids | grade items comma separated. |
bool | $exportfeedback | export feedback option. |
bool | $onlyactive | only enrolled active students. |
string | $displaytype | grade display type constants comma separated. |
int | $decimalpoints | grade decimal points. |
null | $updatedgradesonly | recently updated grades only (Used by XML exporting only). |
null | $separator | separator character: tab, comma, colon and semicolon (Used by TXT exporting only). |
- Return values
-
◆ format_column_name()
grade_export::format_column_name |
( |
|
$grade_item, |
|
|
|
$feedback = false , |
|
|
|
$gradedisplayname = null |
|
) |
| |
|
inherited |
Returns the name of column in export.
- Parameters
-
object | $grade_item | |
boolean | $feedback | feedback colum |
string | $gradedisplayname | grade display name. |
- Return values
-
◆ format_feedback()
grade_export::format_feedback |
( |
|
$feedback, |
|
|
|
$grade = null |
|
) |
| |
|
inherited |
Returns formatted grade feedback.
- Parameters
-
object | $feedback | object with properties feedback and feedbackformat |
object | $grade | Grade object with grade properties |
- Return values
-
◆ format_grade()
grade_export::format_grade |
( |
|
$grade, |
|
|
|
$gradedisplayconst = null |
|
) |
| |
|
inherited |
Returns string representation of final grade.
- Parameters
-
object | $grade | instance of grade_grade class |
integer | $gradedisplayconst | grade display type constant. |
- Return values
-
◆ get_export_params()
grade_export::get_export_params |
( |
| ) |
|
|
inherited |
Returns array of parameters used by dump.php and export.php.
- Return values
-
Reimplemented in grade_export_txt.
◆ get_export_url()
grade_export::get_export_url |
( |
| ) |
|
|
inherited |
Generate the export url.
Get submitted form data and create the url to be used on the grade publish feature.
- Return values
-
◆ get_grade_publishing_url()
grade_export::get_grade_publishing_url |
( |
| ) |
|
|
inherited |
Create the html code of the grade publishing feature.
- Return values
-
string::$output | html code of the grade publishing. |
◆ print_continue()
grade_export::print_continue |
( |
| ) |
|
|
inherited |
Either prints a "Export" box, which will redirect the user to the download page, or prints the URL for the published data.
- Deprecated:
- since 2.8 MDL-46548. Call get_export_url and set the action of the grade_export_form instead.
- Return values
-
◆ print_grades()
grade_export_xls::print_grades |
( |
| ) |
|
To be implemented by child classes.
Reimplemented from grade_export.
◆ process_form()
grade_export::process_form |
( |
|
$formdata | ) |
|
|
inherited |
Init object based using data from form.
- Parameters
-
◆ track_exports()
grade_export::track_exports |
( |
| ) |
|
|
inherited |
Update exported field in grade_grades table.
- Return values
-
◆ $displaytype
$displaytype grade_export::$displaytype |
|
inherited |
Grade display type (real, percentages or letter).
This attribute is an integer for XML file export. Otherwise is an array for all other formats (ODS, XLS and TXT).
Grade display type constant (1, 2 or 3) or an array of display types where the key is the name and the value is the grade display type constant or 0 for unchecked display types.
◆ $previewrows
$previewrows grade_export::$previewrows |
|
inherited |
The documentation for this class was generated from the following file: