Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
enrol_lti\local\ltiadvantage\viewobject\published_resource Class Reference

Public Member Functions

 __construct (string $name, string $coursefullname, int $courseid, int $contextid, int $id, string $uuid, bool $supportsgrades, ?float $grademax, bool $iscourse)
 The published_resource constructor.
 
 get_contextid ()
 Get the id of the context for this published resource.
 
 get_coursefullname ()
 Get the full name of the course owning this published resource.
 
 get_courseid ()
 Get the id of the course owning this published resource.
 
 get_grademax ()
 Get the max grade for this published resource, if its a graded resource.
 
 get_id ()
 Get the id of this published resource.
 
 get_name ()
 Get the name of this published resource.
 
 get_uuid ()
 Get the uuid for this published resource.
 
 is_course ()
 Check whether this published resource is a course itself.
 
 supports_grades ()
 Check whether this resource supports grades or not.
 

Constructor & Destructor Documentation

◆ __construct()

enrol_lti\local\ltiadvantage\viewobject\published_resource::__construct ( string $name,
string $coursefullname,
int $courseid,
int $contextid,
int $id,
string $uuid,
bool $supportsgrades,
?float $grademax,
bool $iscourse )

The published_resource constructor.

Parameters
string$namethe name of this resource.
string$coursefullnamefull name of the course to which this published resource belongs.
int$courseidid of the course to which this published resource belongs.
int$contextidid of the context.
int$idid of the enrol_lti_tools instance (i.e. the id of the 'published resource').
string$uuida v4 uuid identifier for this published resource.
bool$supportsgradeswhether or not this resource supports grades.
float | null$grademaxthe max grade or null if this is not a graded resource.
bool$iscoursewhether or not this resource is itself a course.

Member Function Documentation

◆ get_contextid()

enrol_lti\local\ltiadvantage\viewobject\published_resource::get_contextid ( )

Get the id of the context for this published resource.

Return values
intthe context id.

◆ get_coursefullname()

enrol_lti\local\ltiadvantage\viewobject\published_resource::get_coursefullname ( )

Get the full name of the course owning this published resource.

Return values
stringthe localised course full name.

◆ get_courseid()

enrol_lti\local\ltiadvantage\viewobject\published_resource::get_courseid ( )

Get the id of the course owning this published resource.

Return values
intthe course id.

◆ get_grademax()

enrol_lti\local\ltiadvantage\viewobject\published_resource::get_grademax ( )

Get the max grade for this published resource, if its a graded resource.

Return values
float|nullthe grade max, if grades are supported, else null.

◆ get_id()

enrol_lti\local\ltiadvantage\viewobject\published_resource::get_id ( )

Get the id of this published resource.

Return values
intthe id.

◆ get_name()

enrol_lti\local\ltiadvantage\viewobject\published_resource::get_name ( )

Get the name of this published resource.

Return values
stringthe localised name.

◆ get_uuid()

enrol_lti\local\ltiadvantage\viewobject\published_resource::get_uuid ( )

Get the uuid for this published resource.

Return values
stringv4 uuid.

◆ is_course()

enrol_lti\local\ltiadvantage\viewobject\published_resource::is_course ( )

Check whether this published resource is a course itself.

Return values
booltrue if it's a course, false otherwise.

◆ supports_grades()

enrol_lti\local\ltiadvantage\viewobject\published_resource::supports_grades ( )

Check whether this resource supports grades or not.

Return values
booltrue if supported, false otherwise.

The documentation for this class was generated from the following file: