diff --git a/lang/en/expcontent.php b/lang/en/expcontent.php index 1532ba6..20cf8c4 100644 --- a/lang/en/expcontent.php +++ b/lang/en/expcontent.php @@ -3,7 +3,7 @@ defined('MOODLE_INTERNAL') || die(); $string['modulename'] = 'EXP360 Content'; -$string['modulename'] = 'EXP360 Contents'; +$string['modulenameplural'] = 'EXP360 Contents'; $string['settings'] = 'Settings'; diff --git a/lib.php b/lib.php index ed02d04..87aec35 100644 --- a/lib.php +++ b/lib.php @@ -37,4 +37,12 @@ function expcontent_delete_instance($id) { $DB->delete_records('expcontent', array('id' => $id)); return true; +} + +function expcontent_supports($feature) { + switch($feature) { + case FEATURE_COMPLETION_TRACKS_VIEWS: return true; + case FEATURE_SHOW_DESCRIPTION: return true; + default: return null; + } } \ No newline at end of file diff --git a/version.php b/version.php index 44a491e..ed6f334 100644 --- a/version.php +++ b/version.php @@ -2,7 +2,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = "2021081900"; +$plugin->version = "2021111500"; $plugin->component = 'mod_expcontent'; $plugin->maturity = MATURITY_ALPHA; $plugin->release = 'v0.0.1'; diff --git a/view.php b/view.php index b5b271e..b8d6e6b 100644 --- a/view.php +++ b/view.php @@ -1,7 +1,8 @@ dirroot.'/mod/expcontent/lib.php'); +require_once($CFG->libdir.'/completionlib.php'); $id = required_param('id', PARAM_INT); list ($course, $cm) = get_course_and_cm_from_cmid($id, 'expcontent'); @@ -10,6 +11,9 @@ $expcontent = $DB->get_record('expcontent', array('id'=> $cm->instance), '*', MU $expconfig = get_config('mod_expcontent'); $baseurl = $expconfig->baseurl; +$completion = new completion_info($course); +$completion->set_module_viewed($cm); + if ($baseurl[-1] != "/") $baseurl += "/"; ?>