Skip to content

Commit

Permalink
custom waitlist fields remove update
Browse files Browse the repository at this point in the history
custom waitlist fields remove update
  • Loading branch information
Flottertotte committed Aug 30, 2024
1 parent 437e53d commit 62e0672
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ function xmldb_enrol_waitlist_upgrade($oldversion) {
$sql = 'CREATE TABLE mdl_waitlist_info_data (id int(10) NOT NULL AUTO_INCREMENT,course_id int(10) NOT NULL,fieldid int(10) NOT NULL,data text NOT NULL,dataformat int(2) DEFAULT NULL,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8';
$DB->execute($sql);
}

/*
if ($result && $oldversion < 2024082801) {
$DB->execute('DROP TABLE IF EXISTS mdl_user_enrol_waitlist');
$DB->execute('DROP TABLE IF EXISTS mdl_waitlist_info_data');
$DB->execute('DROP TABLE IF EXISTS mdl_waitlist_info_field');
}
*/
return $result;
}
3 changes: 2 additions & 1 deletion edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ function definition() {
// custom fields
global $DB, $CFG;

$fields = $DB->get_records('waitlist_info_field');
//$fields = $DB->get_records('waitlist_info_field');
// echo "<pre>";print_r($fields);exit;
$fields = [];
if(count($fields) > 0){
$usedFields = $DB->get_records('waitlist_info_data', array('course_id' => $instance->courseid));
$custom_data = array();
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024082801; // The current module version (Date: YYYYMMDDXX)
$plugin->version = 2024082900; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2011033005; // Requires at least this Moodle version
$plugin->maturity = MATURITY_STABLE;
$plugin->release = 'Course Enrol Waitlist Plugin Version 4.4-a';
Expand Down

0 comments on commit 62e0672

Please sign in to comment.