Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
3c6239ee
Commit
3c6239ee
authored
Oct 08, 2011
by
Petr Skoda
Browse files
use plugin_supports for module resource type information
closes #10
parent
b2617f0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib.php
View file @
3c6239ee
...
...
@@ -104,15 +104,6 @@ function book_delete_instance($id) {
return
true
;
}
function
book_get_types
()
{
$type
=
new
stdClass
();
$type
->
modclass
=
MOD_CLASS_RESOURCE
;
$type
->
type
=
'book'
;
$type
->
typestr
=
get_string
(
'modulename'
,
'mod_book'
);
return
array
(
$type
);
}
/**
* Return use outline
* @param object $course
...
...
@@ -218,11 +209,14 @@ function book_get_post_actions() {
*/
function
book_supports
(
$feature
)
{
switch
(
$feature
)
{
case
FEATURE_MOD_ARCHETYPE
:
return
MOD_ARCHETYPE_RESOURCE
;
case
FEATURE_GROUPS
:
return
false
;
case
FEATURE_GROUPINGS
:
return
false
;
case
FEATURE_GROUPMEMBERSONLY
:
return
true
;
case
FEATURE_MOD_INTRO
:
return
true
;
case
FEATURE_COMPLETION_TRACKS_VIEWS
:
return
true
;
case
FEATURE_GRADE_HAS_GRADE
:
return
false
;
case
FEATURE_GRADE_OUTCOMES
:
return
false
;
case
FEATURE_BACKUP_MOODLE2
:
return
true
;
default
:
return
null
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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