Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LabNbook
LabNbook-Moodle
Commits
91ef6945
Commit
91ef6945
authored
Feb 26, 2019
by
Francois Gannaz
Browse files
cleanup labnbook_supports()
parent
26161f1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib.php
View file @
91ef6945
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment