Fixed invalid syntax for PHP 5.6.x
This commit is contained in:
parent
cab793fb1d
commit
10630a6967
6 changed files with 6 additions and 6 deletions
|
@ -389,7 +389,7 @@ class element_helper {
|
|||
* @param int $elementid The element id
|
||||
* @return \context The context
|
||||
*/
|
||||
public static function get_context(int $elementid) : \context {
|
||||
public static function get_context($elementid) {
|
||||
global $DB;
|
||||
|
||||
$sql = "SELECT ct.contextid
|
||||
|
|
|
@ -63,7 +63,7 @@ class element extends \mod_customcert\element {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_category_name() : string {
|
||||
protected function get_category_name() {
|
||||
global $DB, $SITE;
|
||||
|
||||
$courseid = \mod_customcert\element_helper::get_courseid($this->get_id());
|
||||
|
|
|
@ -63,7 +63,7 @@ class element extends \mod_customcert\element {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_course_name() : string {
|
||||
protected function get_course_name() {
|
||||
$courseid = \mod_customcert\element_helper::get_courseid($this->get_id());
|
||||
$course = get_course($courseid);
|
||||
$context = \mod_customcert\element_helper::get_context($this->get_id());
|
||||
|
|
|
@ -114,7 +114,7 @@ class element extends \mod_customcert\element {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_grade_item_name() : string {
|
||||
protected function get_grade_item_name() {
|
||||
global $DB;
|
||||
|
||||
// Get the course module information.
|
||||
|
|
|
@ -100,7 +100,7 @@ class element extends \mod_customcert\element {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_text() : string {
|
||||
protected function get_text() {
|
||||
$context = \mod_customcert\element_helper::get_context($this->get_id());
|
||||
return format_text($this->get_data(), FORMAT_HTML, ['context' => $context]);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ class element extends \mod_customcert\element {
|
|||
* @param bool $preview Is this a preview?
|
||||
* @return string
|
||||
*/
|
||||
protected function get_user_field_value(\stdClass $user, bool $preview) : string {
|
||||
protected function get_user_field_value(\stdClass $user, $preview) {
|
||||
global $CFG, $DB;
|
||||
|
||||
// The user field to display.
|
||||
|
|
Loading…
Reference in a new issue