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
2890e4c1
Commit
2890e4c1
authored
Jan 16, 2011
by
Petr Skoda
Browse files
implement completion tracking
parent
2e9dead5
Changes
3
Hide whitespace changes
Inline
Side-by-side
README
View file @
2890e4c1
...
...
@@ -109,12 +109,12 @@ CHANGELOG:
== 2.0dev ============================================================
* Moodle 2.0 conversion
* removed "Disable printing" option, please use capabilities instead
* completion tracking supported
Known issues, please do not file tracker reports:
* upgrade imscp export code (disabled for now)
* upgrade import code (disabled for now)
* open print links in new windows (needs fix in navlib)
* completion tracking
* upgrade imscp export code (disabled for now)
* upgrade import code (disabled for now)
* open print links in new windows (needs fix in navlib)
Petr
lib.php
View file @
2890e4c1
...
...
@@ -222,7 +222,7 @@ function book_supports($feature) {
case
FEATURE_GROUPINGS
:
return
false
;
case
FEATURE_GROUPMEMBERSONLY
:
return
true
;
case
FEATURE_MOD_INTRO
:
return
true
;
case
FEATURE_COMPLETION_TRACKS_VIEWS
:
return
false
;
//TODO
case
FEATURE_COMPLETION_TRACKS_VIEWS
:
return
true
;
case
FEATURE_BACKUP_MOODLE2
:
return
true
;
default
:
return
null
;
...
...
view.php
View file @
2890e4c1
...
...
@@ -25,6 +25,7 @@
require
(
'../../config.php'
);
require_once
(
$CFG
->
dirroot
.
'/mod/book/locallib.php'
);
require_once
(
$CFG
->
libdir
.
'/completionlib.php'
);
$id
=
optional_param
(
'id'
,
0
,
PARAM_INT
);
// Course Module ID
$bid
=
optional_param
(
'b'
,
0
,
PARAM_INT
);
// Book id
...
...
@@ -158,6 +159,10 @@ if ($nextid) {
$sec
=
$section
->
section
;
}
$chnavigation
.
=
'<a title="'
.
get_string
(
'navexit'
,
'book'
)
.
'" href="../../course/view.php?id='
.
$course
->
id
.
'#section-'
.
$sec
.
'"><img src="'
.
$OUTPUT
->
pix_url
(
'nav_exit'
,
'mod_book'
)
.
'" class="bigicon" alt="'
.
get_string
(
'navexit'
,
'book'
)
.
'" /></a>'
;
// we are cheating a bit here, viewing the last page means user has viewed the whole book
$completion
=
new
completion_info
(
$course
);
$completion
->
set_module_viewed
(
$cm
);
}
// =====================================================
...
...
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