Commit 91ef6945 authored by Francois Gannaz's avatar Francois Gannaz
Browse files

cleanup labnbook_supports()

parent 26161f1c
......@@ -35,16 +35,15 @@ define('LABNBOOK_TABLE', 'labnbook');
* @return true | null True if the feature is supported, null otherwise.
*/
function labnbook_supports($feature) {
switch ($feature) {
case FEATURE_GRADE_HAS_GRADE:
return true;
case FEATURE_MOD_INTRO:
return true;
case FEATURE_BACKUP_MOODLE2:
return true;
default:
return null;
}
$features = [
//FEATURE_BACKUP_MOODLE2,
FEATURE_GRADE_HAS_GRADE,
//FEATURE_GRADE_OUTCOMES,
FEATURE_GROUPS,
FEATURE_MOD_INTRO,
FEATURE_SHOW_DESCRIPTION,
];
return in_array($feature, $features) ? true : null;
}
/**
......@@ -201,7 +200,7 @@ function labnbook_grade_item_delete($moduleinstance) {
* @param int $userid Update grade of specific user only, 0 means all participants.
*/
function labnbook_update_grades($moduleinstance, $userid = 0) {
global $CFG, $DB;
global $CFG;
require_once($CFG->libdir.'/gradelib.php');
// Populate array of grade objects indexed by userid.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment