Class for exporting a course summary from an stdClass.
More...
|
| __construct ($data, $related=array()) |
| Constructor - saves the persistent object, and the related objects.
|
|
|
static | coursecolor ($courseid) |
| Get the course color.
|
|
static | define_other_properties () |
|
static | define_properties () |
|
static | get_course_image ($course) |
| Get the course image if added to course.
|
|
static | get_course_pattern ($course) |
| Get the course pattern datauri.
|
|
static | get_course_progress ($course) |
| Get the course progress percentage.
|
|
Class for exporting a course summary from an stdClass.
- Copyright
- 2015 Damyon Wiese
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_course\external\course_summary_exporter::__construct |
( |
| $data, |
|
|
| $related = array() ) |
Constructor - saves the persistent object, and the related objects.
- Parameters
-
mixed | $data | - Either an stdClass or an array of values. |
array | $related | - An optional list of pre-loaded objects related to this object. |
◆ coursecolor()
static core_course\external\course_summary_exporter::coursecolor |
( |
| $courseid | ) |
|
|
static |
Get the course color.
- Parameters
-
- Return values
-
- Deprecated
- 3.7
◆ get_course_image()
static core_course\external\course_summary_exporter::get_course_image |
( |
| $course | ) |
|
|
static |
Get the course image if added to course.
- Parameters
-
- Return values
-
string|false | url of course image or false if it's not exist. |
◆ get_course_pattern()
static core_course\external\course_summary_exporter::get_course_pattern |
( |
| $course | ) |
|
|
static |
Get the course pattern datauri.
The datauri is an encoded svg that can be passed as a url.
- Parameters
-
- Return values
-
- Deprecated
- 3.7
◆ get_course_progress()
static core_course\external\course_summary_exporter::get_course_progress |
( |
| $course | ) |
|
|
static |
Get the course progress percentage.
- Parameters
-
- Return values
-
◆ get_format_parameters_for_summary()
core_course\external\course_summary_exporter::get_format_parameters_for_summary |
( |
| ) |
|
|
protected |
Get the formatting parameters for the summary.
- Return values
-
The documentation for this class was generated from the following file:
- course/classes/external/course_summary_exporter.php