Removed unnecessary function
We were supporting older versions of Moodle so it was necessary if we only wanted one branch.
This commit is contained in:
parent
a61997b2aa
commit
8a55c96dab
3 changed files with 3 additions and 16 deletions
|
@ -161,7 +161,7 @@ class customcert_element_image extends customcert_element_base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customcert_perform_asort($arrfiles);
|
core_collator::asort($arrfiles);
|
||||||
$arrfiles = array_merge(array('0' => get_string('noimage', 'customcert')), $arrfiles);
|
$arrfiles = array_merge(array('0' => get_string('noimage', 'customcert')), $arrfiles);
|
||||||
|
|
||||||
return $arrfiles;
|
return $arrfiles;
|
||||||
|
|
|
@ -61,7 +61,7 @@ class customcert_element_userfield extends customcert_element_base {
|
||||||
}
|
}
|
||||||
// Combine the two.
|
// Combine the two.
|
||||||
$fields = $userfields + $customfields;
|
$fields = $userfields + $customfields;
|
||||||
customcert_perform_asort($fields);
|
core_collator::asort($fields);
|
||||||
|
|
||||||
// Create the select box where the user field is selected.
|
// Create the select box where the user field is selected.
|
||||||
$mform->addElement('select', 'userfield', get_string('userfield', 'customcertelement_userfield'), $fields);
|
$mform->addElement('select', 'userfield', get_string('userfield', 'customcertelement_userfield'), $fields);
|
||||||
|
|
15
locallib.php
15
locallib.php
|
@ -119,7 +119,7 @@ function customcert_get_elements() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customcert_perform_asort($options);
|
core_collator::asort($options);
|
||||||
return $options;
|
return $options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,16 +713,3 @@ function customcert_generate_report_file($customcert, $users, $type) {
|
||||||
// Close the workbook.
|
// Close the workbook.
|
||||||
$workbook->close();
|
$workbook->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Perform asort on a given array.
|
|
||||||
*
|
|
||||||
* @param array $fields
|
|
||||||
*/
|
|
||||||
function customcert_perform_asort(&$fields) {
|
|
||||||
if (class_exists('core_collator')) {
|
|
||||||
core_collator::asort($fields);
|
|
||||||
} else {
|
|
||||||
collatorlib::asort($fields);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue