Bug fixes
This commit is contained in:
parent
877b5e764f
commit
0bae26309b
4 changed files with 15 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['modulename'] = 'EXP360 Content';
|
||||
$string['modulename'] = 'EXP360 Contents';
|
||||
$string['modulenameplural'] = 'EXP360 Contents';
|
||||
|
||||
$string['settings'] = 'Settings';
|
||||
|
||||
|
|
8
lib.php
8
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;
|
||||
}
|
||||
}
|
|
@ -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';
|
||||
|
|
6
view.php
6
view.php
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
require('../../config.php');
|
||||
require_once('lib.php');
|
||||
require_once($CFG->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 += "/";
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue