execute_sql("ALTER TABLE {$CFG->prefix}course_sections CHANGE sequence sequence text NULL AFTER section");
}
+
// table to keep track of course page access times, used in online participants block, and participants list
if ($oldversion < 2006091200) {
execute_sql("CREATE TABLE {$CFG->prefix}user_lastaccess (
PRIMARY KEY (`id`)
)TYPE=MYISAM COMMENT ='time user last accessed any page in a course';", true);
}
-
+
+ if ($oldversion < 2006091211) { // Reload the guest roles completely with new defaults
+ if ($guestroles = get_roles_with_capability('moodle/legacy:guest', CAP_ALLOW)) {
+ delete_records('capabilities');
+ $sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ foreach ($guestroles as $guestrole) {
+ delete_records('role_capabilities', 'roleid', $guestrole->id);
+ assign_capability('moodle/legacy:guest', CAP_ALLOW, $guestrole->id, $sitecontext->id);
+ }
+ }
+ }
+
return $result;
}
execute_sql("CREATE UNIQUE INDEX {$CFG->prefix}user_lastaccess_useridcourseid_idx ON {$CFG->prefix}user_lastaccess (userid, courseid);", true);
}
+
+ if ($oldversion < 2006091211) { // Reload the guest roles completely with new defaults
+ if ($guestroles = get_roles_with_capability('moodle/legacy:guest', CAP_ALLOW)) {
+ delete_records('capabilities');
+ $sitecontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ foreach ($guestroles as $guestrole) {
+ delete_records('role_capabilities', 'roleid', $guestrole->id);
+ assign_capability('moodle/legacy:guest', CAP_ALLOW, $guestrole->id, $sitecontext->id);
+ }
+ }
+ }
+
return $result;
}
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 60;
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900; // The (date) version of this module
+$module->version = 2006091200; // The (date) version of this module
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 300; // How often should cron check this module (seconds)?
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0;
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006081700;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 60;
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 60;
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006082700;
+$module->version = 2006091200;
$module->requires = 2006082600; // Requires this Moodle version
$module->cron = 60;
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006090400;
+$module->version = 2006091200;
$module->requires = 2006082600; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)
/// Code fragment to define the version of hotpot
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006083101; // release date of this version (see note below)
+$module->version = 2006091200; // release date of this version (see note below)
$module->release = 'v2.2.0'; // human-friendly version name (used in mod/hotpot/lib.php)
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0; // period for cron to check this module (secs)
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 60;
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2006091200; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006091100; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2006091200; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006090700; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2006091200; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006082500; // The (date) version of this module
+$module->version = 2006091200; // The (date) version of this module
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0;
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900; // The (date) version of this module
+$module->version = 2006091200; // The (date) version of this module
$module->requires = 2006080900; // The version of Moodle that is required
$module->cron = 0; // How often should cron check this module (seconds)?
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 0;
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006091003; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2006091200; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2006080900; // The current module version (Date: YYYYMMDDXX)
$module->cron = 0; // Period for cron to check this module (secs)
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006090500;
+$module->version = 2006091200;
$module->requires = 2006080900; // Requires this Moodle version
$module->cron = 60;
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2006090600; // YYYYMMDD = date
+ $version = 2006091211; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.7 dev'; // Human-friendly version name