mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
used deprecated function modify_database changed to insert_record
This commit is contained in:
parent
4a0daed7f6
commit
62a0ae1064
1 changed files with 24 additions and 5 deletions
|
@ -168,11 +168,30 @@ function xmldb_feedback_upgrade($oldversion=0) {
|
|||
}
|
||||
|
||||
if ($result && $oldversion < 2008042801) {
|
||||
$result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'startcomplete', 'feedback', 'name');");
|
||||
$result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'submit', 'feedback', 'name');");
|
||||
$result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'delete', 'feedback', 'name');");
|
||||
$result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'view', 'feedback', 'name');");
|
||||
$result = $result && modify_database("","INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('feedback', 'view all', 'course', 'shortname');");
|
||||
$new_log_display = new object();
|
||||
$new_log_display->module = 'feedback';
|
||||
$new_log_display->action = 'startcomplete';
|
||||
$new_log_display->mtable = 'feedback';
|
||||
$new_log_display->field = 'name';
|
||||
$result = $result && insert_record('log_display', $new_log_display);
|
||||
|
||||
$new_log_display = clone($new_log_display);
|
||||
$new_log_display->action = 'submit';
|
||||
$result = $result && insert_record('log_display', $new_log_display);
|
||||
|
||||
$new_log_display = clone($new_log_display);
|
||||
$new_log_display->action = 'delete';
|
||||
$result = $result && insert_record('log_display', $new_log_display);
|
||||
|
||||
$new_log_display = clone($new_log_display);
|
||||
$new_log_display->action = 'view';
|
||||
$result = $result && insert_record('log_display', $new_log_display);
|
||||
|
||||
$new_log_display = clone($new_log_display);
|
||||
$new_log_display->action = 'view all';
|
||||
$new_log_display->mtable = 'course';
|
||||
$new_log_display->field = 'shortname';
|
||||
$result = $result && insert_record('log_display', $new_log_display);
|
||||
}
|
||||
|
||||
/// And upgrade begins here. For each one, you'll need one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue