I am new at PHP and currently now i am working on moodle LMS tool.
I am referring view.php of scorm package and dont know why $cm->course
this is used in php.
Please help.
Thanks in Advance
I am new at PHP and currently now i am working on moodle LMS tool.
I am referring view.php of scorm package and dont know why $cm->course
this is used in php.
Please help.
Thanks in Advance
$cm is an object, and course is a variable. Here you can see brief of PHP syntax with objects: http://php.net/manual/en/language.types.object.php
PHP has two Object Operator namely -> and ::
-> is used when you are trying to call a method on an Instance and / or access an Instance property.
:: is used when you want to call a static method or call a parent class's version of a method within a child class.
Reference: https://www.codeproject.com/questions/196270/what-is-meant-by-symbol-in-php
Note: I googled your exact question and got this result!
It is "object operator" - T_OBJECT_OPERATOR. It is used to access properties and methods of class on an object.