Commit 2890e4c1 authored by Petr Skoda's avatar Petr Skoda
Browse files

implement completion tracking

parent 2e9dead5
......@@ -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
......@@ -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;
......
......@@ -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);
}
// =====================================================
......
Supports Markdown
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