mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Merge branch 'MDL-75738-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
0c7243af38
@ -105,24 +105,6 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
|
||||
// Automatically generated Moodle v3.9.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2021052501) {
|
||||
|
||||
// Find out if there are users with MoodleNet profiles set.
|
||||
$sql = "SELECT u.*
|
||||
FROM {user} u
|
||||
WHERE u.moodlenetprofile IS NOT NULL";
|
||||
|
||||
$records = $DB->get_records_sql($sql);
|
||||
|
||||
foreach ($records as $record) {
|
||||
// Force clean user value just incase there is something malicious.
|
||||
$record->moodlenetprofile = clean_text($record->moodlenetprofile, PARAM_NOTAGS);
|
||||
$DB->update_record('user', $record);
|
||||
}
|
||||
|
||||
upgrade_plugin_savepoint(true, 2021052501, 'tool', 'moodlenet');
|
||||
}
|
||||
|
||||
if ($oldversion < 2022021600) {
|
||||
// This is a special case for if MoodleNet integration has never been enabled,
|
||||
// or if defaultmoodlenet is not set for whatever reason.
|
||||
|
Loading…
x
Reference in New Issue
Block a user