Bring up to speed
This commit is contained in:
parent
299f9a9647
commit
5e5f731f74
4 changed files with 20 additions and 6 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['modulename'] = 'EXP360 Content';
|
||||
$string['modulename'] = 'EXP360 Contents';
|
||||
$string['modulename'] = '360° Content';
|
||||
$string['modulename'] = '360° Content';
|
||||
|
||||
$string['settings'] = 'Settings';
|
||||
|
||||
|
@ -11,4 +11,4 @@ $string['baseurl'] = 'Base URL';
|
|||
$string['baseurl_help'] = 'Base URL of the EXP360 Content Server';
|
||||
|
||||
$string['name'] = 'Name';
|
||||
$string['contentid'] = 'Content ID';
|
||||
$string['contentid'] = 'Content ID';
|
||||
|
|
10
lib.php
10
lib.php
|
@ -36,4 +36,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 FEATRUE_SHOW_COMPLETION: return true;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,12 @@ class mod_expcontent_mod_form extends moodleform_mod {
|
|||
$mform->addElement('text', 'contentid', get_string('contentid', 'expcontent'), array('size'=>'64'));
|
||||
$mform->setType('contentid', PARAM_TEXT);
|
||||
$mform->addRule('contentid', null, 'required', null, 'client');
|
||||
|
||||
$this->standard_intro_elements();
|
||||
|
||||
$this->standard_coursemodule_elements();
|
||||
|
||||
$this->add_action_buttons();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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