if ($oldversion < 2006081700) {
table_column('data', '', 'jstemplate', 'text', '', '', '', 'not null', 'csstemplate');
}
- /*
+
if ($oldversion < 2006092000) {
// Upgrades for new roles and capabilities support.
require_once($CFG->dirroot.'/mod/data/lib.php');
modify_database('', 'ALTER TABLE prefix_data DROP COLUMN participants;');
modify_database('', 'ALTER TABLE prefix_data DROP COLUMN assesspublic;');
- modify_database('', 'ALTER TABLE prefix_data DROP COLUMN groupmode;');
}
- */
+
return true;
}
-?>
+?>
\ No newline at end of file
timeavailableto int(10) unsigned NOT NULL default '0',
timeviewfrom int(10) unsigned NOT NULL default '0',
timeviewto int(10) unsigned NOT NULL default '0',
- participants int(4) unsigned NOT NULL default '0',
requiredentries int(8) unsigned NOT NULL default '0',
requiredentriestoview int(8) unsigned NOT NULL default '0',
maxentries int(8) unsigned NOT NULL default '0',
approval tinyint(4) unsigned NOT NULL default '0',
scale int(10) NOT NULL default '0',
assessed int(10) unsigned NOT NULL default '0',
- assesspublic int(4) unsigned NOT NULL default '0',
defaultsort int(10) unsigned NOT NULL default '0',
defaultsortdir tinyint(4) unsigned NOT NULL default '0',
editany tinyint(4) unsigned NOT NULL default '0',
if ($oldversion < 2006081700) {
table_column('data', '', 'jstemplate', 'text', '', '', '', 'not null', 'csstemplate');
}
- /*
+
if ($oldversion < 2006092000) {
// Upgrades for new roles and capabilities support.
require_once($CFG->dirroot.'/mod/data/lib.php');
'this upgrade.');
}
foreach ($data as $d) {
- if (!data_convert_to_roles($d $teacherroles, $studentroles)) {
+ if (!data_convert_to_roles($d, $teacherroles, $studentroles)) {
notify('Data with id '.$d->id.' was not upgraded');
}
}
modify_database('', 'ALTER TABLE prefix_data DROP COLUMN participants;');
modify_database('', 'ALTER TABLE prefix_data DROP COLUMN assesspublic;');
- modify_database('', 'ALTER TABLE prefix_data DROP COLUMN groupmode;');
}
- */
+
return true;
}
timeavailableto integer NOT NULL default '0',
timeviewfrom integer NOT NULL default '0',
timeviewto integer NOT NULL default '0',
- participants integer NOT NULL default '0',
requiredentries integer NOT NULL default '0',
requiredentriestoview integer NOT NULL default '0',
maxentries integer NOT NULL default '0',
approval integer NOT NULL default '0',
scale integer NOT NULL default '0',
assessed integer NOT NULL default '0',
- assesspublic integer NOT NULL default '0',
defaultsort integer NOT NULL default '0',
defaultsortdir integer NOT NULL default '0',
editany integer NOT NULL default '0'
if (empty($cmid)) {
// We were not given the course_module id. Try to find it.
- if (!$cm = get_coursemodule_from_instance('forum', $forum->id)) {
- notify('Could not get the course module for the forum');
+ if (!$cm = get_coursemodule_from_instance('data', $data->id)) {
+ notify('Could not get the course module for the data');
return false;
} else {
$cmid = $cm->id;
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006091800;
+$module->version = 2006092000;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 60;