From 0cb93a7e459356bf80ea0d50f32f8feff1081047 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 29 Jan 2009 19:58:47 +0000 Subject: [PATCH] MDL-17427 another round of refactoring of upgrade related functions - this should be final now I hope ;-) --- admin/cliupgrade.php | 6 ++--- admin/index.php | 10 ++++---- admin/report/unittest/test_tables.php | 2 +- lib/adminlib.php | 18 +++++++------- lib/blocklib.php | 4 +-- lib/db/install.php | 36 +++++++++++++-------------- lib/locallib.php | 4 +-- mod/assignment/db/install.php | 10 ++++---- mod/chat/db/install.php | 10 ++++---- mod/choice/db/install.php | 12 ++++----- mod/data/db/install.php | 16 ++++++------ mod/feedback/db/install.php | 10 ++++---- mod/forum/db/install.php | 24 +++++++++--------- mod/glossary/db/install.php | 28 ++++++++++----------- mod/label/db/install.php | 4 +-- mod/lesson/db/install.php | 6 ++--- mod/quiz/db/install.php | 24 +++++++++--------- mod/resource/db/install.php | 6 ++--- mod/scorm/db/install.php | 8 +++--- mod/survey/db/install.php | 14 +++++------ 20 files changed, 126 insertions(+), 126 deletions(-) diff --git a/admin/cliupgrade.php b/admin/cliupgrade.php index 3f63c10e94b..64767744f2e 100644 --- a/admin/cliupgrade.php +++ b/admin/cliupgrade.php @@ -804,7 +804,7 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) { /// return to original debugging level $CFG->debug = $origdebug; error_reporting($CFG->debug); - upgrade_log_start(); + upgrade_started(); /// Both old .sql files and new install.xml are supported /// But we prioritise install.xml (XMLDB) if present @@ -930,7 +930,7 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) { /// return to original debugging level $CFG->debug = $origdebug; error_reporting($CFG->debug); - upgrade_log_start(); + upgrade_started(); /// Upgrade current language pack if we can upgrade_language_pack(); @@ -1050,7 +1050,7 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) { /// just make sure upgrade logging is properly terminated - upgrade_log_finish(); + upgrade_finished(); /// Set up the site if (! $site = get_site()) { diff --git a/admin/index.php b/admin/index.php index 2ad600b5fa9..27b74138116 100644 --- a/admin/index.php +++ b/admin/index.php @@ -146,10 +146,10 @@ } } - upgrade_log_start(true); // does not store ugprade runnign flag + upgrade_started(true); // does not store ugprade runnign flag print_heading('coresystem'); $DB->get_manager()->install_from_xmldb_file("$CFG->libdir/db/install.xml"); - upgrade_log_start(); // we want the flag to be stored in config table ;-) + upgrade_started(); // we want the flag to be stored in config table ;-) /// set all core default records and default settings require_once("$CFG->libdir/db/install.php"); @@ -263,7 +263,7 @@ /// return to original debugging level $CFG->debug = $origdebug; error_reporting($CFG->debug); - upgrade_log_start(); + upgrade_started(); /// Upgrade current language pack if we can if (empty($CFG->skiplangupgrade)) { @@ -331,7 +331,7 @@ $sessionstarted = optional_param('sessionstarted', 0, PARAM_BOOL); if (!$sessionstarted) { // we neeed this redirect to setup proper session - upgrade_log_finish("index.php?sessionstarted=1&lang=$CFG->lang"); + upgrade_finished("index.php?sessionstarted=1&lang=$CFG->lang"); } $adminuser = create_admin_user(); $adminuser->newadminuser = 1; @@ -340,7 +340,7 @@ } else { /// just make sure upgrade logging is properly terminated - upgrade_log_finish('upgradesettings.php'); + upgrade_finished('upgradesettings.php'); } // Turn xmlstrictheaders back on now. diff --git a/admin/report/unittest/test_tables.php b/admin/report/unittest/test_tables.php index ffa358e2b0e..6cbaaaa8ea9 100644 --- a/admin/report/unittest/test_tables.php +++ b/admin/report/unittest/test_tables.php @@ -101,7 +101,7 @@ die;die;die; upgrade_local_db($return_url); // Return here afterwards /// just make sure upgrade logging is properly terminated - upgrade_log_finish(); + upgrade_finished(); /// make sure admin user is created - this is the last step because we need /// session to be working properly in order to edit admin account diff --git a/lib/adminlib.php b/lib/adminlib.php index 3b8768293ae..c0f8401f013 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -28,7 +28,7 @@ define('INSECURE_DATAROOT_ERROR', 2); * @return void * */ -function upgrade_log_display_entry($module, $action, $mtable, $field) { +function update_log_display_entry($module, $action, $mtable, $field) { global $DB; if ($type = $DB->get_record('log_display', array('module'=>$module, 'action'=>$action))) { @@ -424,7 +424,7 @@ function upgrade_plugins($type, $dir) { $info->pluginversion = $plugin->version; $info->currentmoodle = $CFG->version; $info->requiremoodle = $plugin->requires; - upgrade_log_start(); + upgrade_started(); notify(get_string('pluginrequirementsnotmet', 'error', $info)); $updated_plugins = true; continue; @@ -444,7 +444,7 @@ function upgrade_plugins($type, $dir) { // do nothing } else if ($installedversion < $plugin->version) { $updated_plugins = true; - upgrade_log_start(); + upgrade_started(); print_heading($dir.'/'. $plugin->name .' plugin needs upgrading'); @set_time_limit(0); // To allow slow databases to complete the long SQL @@ -565,7 +565,7 @@ function upgrade_activity_modules() { $info->moduleversion = $module->version; $info->currentmoodle = $CFG->version; $info->requiremoodle = $module->requires; - upgrade_log_start(); + upgrade_started(); notify(get_string('modulerequirementsnotmet', 'error', $info)); continue; } @@ -584,7 +584,7 @@ function upgrade_activity_modules() { notify('Upgrade file ' . $mod . ': ' . $fullmod . '/db/upgrade.php is not readable'); continue; } - upgrade_log_start(); + upgrade_started(); print_heading($module->name .' module needs upgrading'); @@ -625,7 +625,7 @@ function upgrade_activity_modules() { } } else { // module not installed yet, so install it - upgrade_log_start(); + upgrade_started(); print_heading($module->name); /// Execute install.xml (XMLDB) - must be present @@ -852,7 +852,7 @@ function create_admin_user($user_input=NULL) { * Marks start of upgrade, blocks any other access to site. * The upgrade is finished at the end of script or after timeout. */ -function upgrade_log_start($preinstall=false) { +function upgrade_started($preinstall=false) { global $CFG, $DB; static $started = false; @@ -885,7 +885,7 @@ function upgrade_log_start($preinstall=false) { * Internal function - executed if upgrade interruped. */ function upgrade_finished_handler() { - upgrade_log_finish(); + upgrade_finished(); } /** @@ -893,7 +893,7 @@ function upgrade_finished_handler() { * * This function may be called repeatedly. */ -function upgrade_log_finish($continueurl=null) { +function upgrade_finished($continueurl=null) { global $CFG, $DB; if (!empty($CFG->upgraderunning)) { diff --git a/lib/blocklib.php b/lib/blocklib.php index 4727e40fc61..eaf4015b434 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -1172,7 +1172,7 @@ function upgrade_blocks_plugins() { // do nothing } else if ($currblock->version < $block->version) { $updated_blocks = true; - upgrade_log_start(); + upgrade_started(); print_heading('New version of '.$blocktitle.' ('.$block->name.') exists'); @set_time_limit(0); // To allow slow databases to complete the long SQL @@ -1239,7 +1239,7 @@ function upgrade_blocks_plugins() { print_error('blocknameconflict', '', '', (object)array('name'=>$block->name, 'conflict'=>$conflictblock)); } $updated_blocks = true; - upgrade_log_start(); + upgrade_started(); print_heading($block->name); @set_time_limit(0); // To allow slow databases to complete the long SQL diff --git a/lib/db/install.php b/lib/db/install.php index e34b938a7a1..270d37c2759 100644 --- a/lib/db/install.php +++ b/lib/db/install.php @@ -106,24 +106,24 @@ function xmldb_main_install() { $DB->insert_record('mnet_application', $mnet_app); /// insert log entries - replaces statements section in install.xml - upgrade_log_display_entry('user', 'view', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('course', 'user report', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('course', 'view', 'course', 'fullname'); - upgrade_log_display_entry('course', 'update', 'course', 'fullname'); - upgrade_log_display_entry('course', 'enrol', 'course', 'fullname'); - upgrade_log_display_entry('course', 'unenrol', 'course', 'fullname'); - upgrade_log_display_entry('course', 'report log', 'course', 'fullname'); - upgrade_log_display_entry('course', 'report live', 'course', 'fullname'); - upgrade_log_display_entry('course', 'report outline', 'course', 'fullname'); - upgrade_log_display_entry('course', 'report participation', 'course', 'fullname'); - upgrade_log_display_entry('course', 'report stats', 'course', 'fullname'); - upgrade_log_display_entry('message', 'write', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('message', 'read', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('message', 'add contact', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('message', 'remove contact', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('message', 'block contact', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('message', 'unblock contact', 'user', 'CONCAT(firstname,\' \',lastname)'); - upgrade_log_display_entry('group', 'view', 'groups', 'name'); + update_log_display_entry('user', 'view', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('course', 'user report', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('course', 'view', 'course', 'fullname'); + update_log_display_entry('course', 'update', 'course', 'fullname'); + update_log_display_entry('course', 'enrol', 'course', 'fullname'); + update_log_display_entry('course', 'unenrol', 'course', 'fullname'); + update_log_display_entry('course', 'report log', 'course', 'fullname'); + update_log_display_entry('course', 'report live', 'course', 'fullname'); + update_log_display_entry('course', 'report outline', 'course', 'fullname'); + update_log_display_entry('course', 'report participation', 'course', 'fullname'); + update_log_display_entry('course', 'report stats', 'course', 'fullname'); + update_log_display_entry('message', 'write', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('message', 'read', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('message', 'add contact', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('message', 'remove contact', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('message', 'block contact', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('message', 'unblock contact', 'user', 'CONCAT(firstname,\' \',lastname)'); + update_log_display_entry('group', 'view', 'groups', 'name'); /// Create guest record diff --git a/lib/locallib.php b/lib/locallib.php index 0ca54faf9f2..798f2f1bde0 100644 --- a/lib/locallib.php +++ b/lib/locallib.php @@ -127,7 +127,7 @@ function upgrade_local_db() { require($CFG->dirroot.'/local/version.php'); // Get code versions if (empty($CFG->local_version)) { // install - upgrade_log_start(); + upgrade_started(); if (file_exists($CFG->dirroot.'/local/db/install.php')) { require_once($CFG->dirroot.'/local/db/install.php'); xmldb_local_install(); @@ -142,7 +142,7 @@ function upgrade_local_db() { return true; } else if ($local_version > $CFG->local_version) { // upgrade! - upgrade_log_start(); + upgrade_started(); if (file_exists($CFG->dirroot.'/local/db/upgrade.php')) { require_once($CFG->dirroot.'/local/db/upgrade.php'); xmldb_local_upgrade($CFG->local_version); diff --git a/mod/assignment/db/install.php b/mod/assignment/db/install.php index 540c9e70167..eaefbd8b405 100644 --- a/mod/assignment/db/install.php +++ b/mod/assignment/db/install.php @@ -9,10 +9,10 @@ function xmldb_assignment_install() { global $DB; /// Install logging support - upgrade_log_display_entry('assignment', 'view', 'assignment', 'name'); - upgrade_log_display_entry('assignment', 'add', 'assignment', 'name'); - upgrade_log_display_entry('assignment', 'update', 'assignment', 'name'); - upgrade_log_display_entry('assignment', 'view submission', 'assignment', 'name'); - upgrade_log_display_entry('assignment', 'upload', 'assignment', 'name'); + update_log_display_entry('assignment', 'view', 'assignment', 'name'); + update_log_display_entry('assignment', 'add', 'assignment', 'name'); + update_log_display_entry('assignment', 'update', 'assignment', 'name'); + update_log_display_entry('assignment', 'view submission', 'assignment', 'name'); + update_log_display_entry('assignment', 'upload', 'assignment', 'name'); } diff --git a/mod/chat/db/install.php b/mod/chat/db/install.php index 6b355a41736..212e1d741b0 100644 --- a/mod/chat/db/install.php +++ b/mod/chat/db/install.php @@ -9,9 +9,9 @@ function xmldb_chat_install() { global $DB; /// Install logging support - upgrade_log_display_entry('chat', 'view', 'chat', 'name'); - upgrade_log_display_entry('chat', 'add', 'chat', 'name'); - upgrade_log_display_entry('chat', 'update', 'chat', 'name'); - upgrade_log_display_entry('chat', 'report', 'chat', 'name'); - upgrade_log_display_entry('chat', 'talk', 'chat', 'name'); + update_log_display_entry('chat', 'view', 'chat', 'name'); + update_log_display_entry('chat', 'add', 'chat', 'name'); + update_log_display_entry('chat', 'update', 'chat', 'name'); + update_log_display_entry('chat', 'report', 'chat', 'name'); + update_log_display_entry('chat', 'talk', 'chat', 'name'); } diff --git a/mod/choice/db/install.php b/mod/choice/db/install.php index e572adb2c9a..c34218a04dc 100644 --- a/mod/choice/db/install.php +++ b/mod/choice/db/install.php @@ -9,11 +9,11 @@ function xmldb_choice_install() { global $DB; /// Install logging support - upgrade_log_display_entry('choice', 'view', 'choice', 'name'); - upgrade_log_display_entry('choice', 'update', 'choice', 'name'); - upgrade_log_display_entry('choice', 'add', 'choice', 'name'); - upgrade_log_display_entry('choice', 'report', 'choice', 'name'); - upgrade_log_display_entry('choice', 'choose', 'choice', 'name'); - upgrade_log_display_entry('choice', 'choose again', 'choice', 'name'); + update_log_display_entry('choice', 'view', 'choice', 'name'); + update_log_display_entry('choice', 'update', 'choice', 'name'); + update_log_display_entry('choice', 'add', 'choice', 'name'); + update_log_display_entry('choice', 'report', 'choice', 'name'); + update_log_display_entry('choice', 'choose', 'choice', 'name'); + update_log_display_entry('choice', 'choose again', 'choice', 'name'); } diff --git a/mod/data/db/install.php b/mod/data/db/install.php index 51405635f16..31c5cf4d7de 100644 --- a/mod/data/db/install.php +++ b/mod/data/db/install.php @@ -9,13 +9,13 @@ function xmldb_data_install() { global $DB; /// Install logging support - upgrade_log_display_entry('data', 'view', 'data', 'name'); - upgrade_log_display_entry('data', 'add', 'data', 'name'); - upgrade_log_display_entry('data', 'update', 'data', 'name'); - upgrade_log_display_entry('data', 'record delete', 'data', 'name'); - upgrade_log_display_entry('data', 'fields add', 'data_fields', 'name'); - upgrade_log_display_entry('data', 'fields update', 'data_fields', 'name'); - upgrade_log_display_entry('data', 'templates saved', 'data', 'name'); - upgrade_log_display_entry('data', 'templates def', 'data', 'name'); + update_log_display_entry('data', 'view', 'data', 'name'); + update_log_display_entry('data', 'add', 'data', 'name'); + update_log_display_entry('data', 'update', 'data', 'name'); + update_log_display_entry('data', 'record delete', 'data', 'name'); + update_log_display_entry('data', 'fields add', 'data_fields', 'name'); + update_log_display_entry('data', 'fields update', 'data_fields', 'name'); + update_log_display_entry('data', 'templates saved', 'data', 'name'); + update_log_display_entry('data', 'templates def', 'data', 'name'); } diff --git a/mod/feedback/db/install.php b/mod/feedback/db/install.php index 2042406e646..e7968129e99 100644 --- a/mod/feedback/db/install.php +++ b/mod/feedback/db/install.php @@ -9,10 +9,10 @@ function xmldb_feedback_install() { global $DB; /// Install logging support - upgrade_log_display_entry('feedback', 'startcomplete', 'feedback', 'name'); - upgrade_log_display_entry('feedback', 'submit', 'feedback', 'name'); - upgrade_log_display_entry('feedback', 'delete', 'feedback', 'name'); - upgrade_log_display_entry('feedback', 'view', 'feedback', 'name'); - upgrade_log_display_entry('feedback', 'view all', 'course', 'shortname'); + update_log_display_entry('feedback', 'startcomplete', 'feedback', 'name'); + update_log_display_entry('feedback', 'submit', 'feedback', 'name'); + update_log_display_entry('feedback', 'delete', 'feedback', 'name'); + update_log_display_entry('feedback', 'view', 'feedback', 'name'); + update_log_display_entry('feedback', 'view all', 'course', 'shortname'); } diff --git a/mod/forum/db/install.php b/mod/forum/db/install.php index e4b4fdbc6fc..eb8ab485acf 100644 --- a/mod/forum/db/install.php +++ b/mod/forum/db/install.php @@ -9,17 +9,17 @@ function xmldb_forum_install() { global $DB; /// Install logging support - upgrade_log_display_entry('forum', 'add', 'forum', 'name'); - upgrade_log_display_entry('forum', 'update', 'forum', 'name'); - upgrade_log_display_entry('forum', 'add discussion', 'forum_discussions', 'name'); - upgrade_log_display_entry('forum', 'add post', 'forum_posts', 'subject'); - upgrade_log_display_entry('forum', 'update post', 'forum_posts', 'subject'); - upgrade_log_display_entry('forum', 'user report', 'user', 'CONCAT(firstname," ",lastname)'); - upgrade_log_display_entry('forum', 'move discussion', 'forum_discussions', 'name'); - upgrade_log_display_entry('forum', 'view subscribers', 'forum', 'name'); - upgrade_log_display_entry('forum', 'view discussion', 'forum_discussions', 'name'); - upgrade_log_display_entry('forum', 'view forum', 'forum', 'name'); - upgrade_log_display_entry('forum', 'subscribe', 'forum', 'name'); - upgrade_log_display_entry('forum', 'unsubscribe', 'forum', 'name'); + update_log_display_entry('forum', 'add', 'forum', 'name'); + update_log_display_entry('forum', 'update', 'forum', 'name'); + update_log_display_entry('forum', 'add discussion', 'forum_discussions', 'name'); + update_log_display_entry('forum', 'add post', 'forum_posts', 'subject'); + update_log_display_entry('forum', 'update post', 'forum_posts', 'subject'); + update_log_display_entry('forum', 'user report', 'user', 'CONCAT(firstname," ",lastname)'); + update_log_display_entry('forum', 'move discussion', 'forum_discussions', 'name'); + update_log_display_entry('forum', 'view subscribers', 'forum', 'name'); + update_log_display_entry('forum', 'view discussion', 'forum_discussions', 'name'); + update_log_display_entry('forum', 'view forum', 'forum', 'name'); + update_log_display_entry('forum', 'subscribe', 'forum', 'name'); + update_log_display_entry('forum', 'unsubscribe', 'forum', 'name'); } diff --git a/mod/glossary/db/install.php b/mod/glossary/db/install.php index 3d20ba47f22..bdedf3e4ea9 100644 --- a/mod/glossary/db/install.php +++ b/mod/glossary/db/install.php @@ -9,19 +9,19 @@ function xmldb_glossary_install() { global $DB; /// Install logging support - upgrade_log_display_entry('glossary', 'add', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'update', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'view', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'view all', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'add entry', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'update entry', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'add category', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'update category', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'delete category', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'add comment', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'update comment', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'delete comment', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'approve entry', 'glossary', 'name'); - upgrade_log_display_entry('glossary', 'view entry', 'glossary_entries', 'concept'); + update_log_display_entry('glossary', 'add', 'glossary', 'name'); + update_log_display_entry('glossary', 'update', 'glossary', 'name'); + update_log_display_entry('glossary', 'view', 'glossary', 'name'); + update_log_display_entry('glossary', 'view all', 'glossary', 'name'); + update_log_display_entry('glossary', 'add entry', 'glossary', 'name'); + update_log_display_entry('glossary', 'update entry', 'glossary', 'name'); + update_log_display_entry('glossary', 'add category', 'glossary', 'name'); + update_log_display_entry('glossary', 'update category', 'glossary', 'name'); + update_log_display_entry('glossary', 'delete category', 'glossary', 'name'); + update_log_display_entry('glossary', 'add comment', 'glossary', 'name'); + update_log_display_entry('glossary', 'update comment', 'glossary', 'name'); + update_log_display_entry('glossary', 'delete comment', 'glossary', 'name'); + update_log_display_entry('glossary', 'approve entry', 'glossary', 'name'); + update_log_display_entry('glossary', 'view entry', 'glossary_entries', 'concept'); } diff --git a/mod/label/db/install.php b/mod/label/db/install.php index 2ccae89b675..8228a8e74c9 100644 --- a/mod/label/db/install.php +++ b/mod/label/db/install.php @@ -9,7 +9,7 @@ function xmldb_label_install() { global $DB; /// Install logging support - upgrade_log_display_entry('label', 'add', 'label', 'name'); - upgrade_log_display_entry('label', 'update', 'label', 'name'); + update_log_display_entry('label', 'add', 'label', 'name'); + update_log_display_entry('label', 'update', 'label', 'name'); } diff --git a/mod/lesson/db/install.php b/mod/lesson/db/install.php index a3845947113..5cbf2e377d4 100644 --- a/mod/lesson/db/install.php +++ b/mod/lesson/db/install.php @@ -9,8 +9,8 @@ function xmldb_lesson_install() { global $DB; /// Install logging support - upgrade_log_display_entry('lesson', 'start', 'lesson', 'name'); - upgrade_log_display_entry('lesson', 'end', 'lesson', 'name'); - upgrade_log_display_entry('lesson', 'view', 'lesson_pages', 'title'); + update_log_display_entry('lesson', 'start', 'lesson', 'name'); + update_log_display_entry('lesson', 'end', 'lesson', 'name'); + update_log_display_entry('lesson', 'view', 'lesson_pages', 'title'); } diff --git a/mod/quiz/db/install.php b/mod/quiz/db/install.php index 260354499cf..5dab01213ff 100644 --- a/mod/quiz/db/install.php +++ b/mod/quiz/db/install.php @@ -9,18 +9,18 @@ function xmldb_quiz_install() { global $DB; /// Install logging support - upgrade_log_display_entry('quiz', 'add', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'update', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'view', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'report', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'attempt', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'submit', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'review', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'editquestions', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'preview', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'start attempt', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'close attempt', 'quiz', 'name'); - upgrade_log_display_entry('quiz', 'continue attempt', 'quiz', 'name'); + update_log_display_entry('quiz', 'add', 'quiz', 'name'); + update_log_display_entry('quiz', 'update', 'quiz', 'name'); + update_log_display_entry('quiz', 'view', 'quiz', 'name'); + update_log_display_entry('quiz', 'report', 'quiz', 'name'); + update_log_display_entry('quiz', 'attempt', 'quiz', 'name'); + update_log_display_entry('quiz', 'submit', 'quiz', 'name'); + update_log_display_entry('quiz', 'review', 'quiz', 'name'); + update_log_display_entry('quiz', 'editquestions', 'quiz', 'name'); + update_log_display_entry('quiz', 'preview', 'quiz', 'name'); + update_log_display_entry('quiz', 'start attempt', 'quiz', 'name'); + update_log_display_entry('quiz', 'close attempt', 'quiz', 'name'); + update_log_display_entry('quiz', 'continue attempt', 'quiz', 'name'); $record = new object(); $record->name = 'overview'; diff --git a/mod/resource/db/install.php b/mod/resource/db/install.php index 27689f198f4..4a0abb1f5c8 100644 --- a/mod/resource/db/install.php +++ b/mod/resource/db/install.php @@ -10,8 +10,8 @@ function xmldb_resource_install() { /// Install logging support - upgrade_log_display_entry('resource', 'view', 'resource', 'name'); - upgrade_log_display_entry('resource', 'update', 'resource', 'name'); - upgrade_log_display_entry('resource', 'add', 'resource', 'name'); + update_log_display_entry('resource', 'view', 'resource', 'name'); + update_log_display_entry('resource', 'update', 'resource', 'name'); + update_log_display_entry('resource', 'add', 'resource', 'name'); } diff --git a/mod/scorm/db/install.php b/mod/scorm/db/install.php index 1b6807938c5..f7b5ca95171 100644 --- a/mod/scorm/db/install.php +++ b/mod/scorm/db/install.php @@ -9,9 +9,9 @@ function xmldb_scorm_install() { global $DB; /// Install logging support - upgrade_log_display_entry('scorm', 'view', 'scorm', 'name'); - upgrade_log_display_entry('scorm', 'review', 'scorm', 'name'); - upgrade_log_display_entry('scorm', 'update', 'scorm', 'name'); - upgrade_log_display_entry('scorm', 'add', 'scorm', 'name'); + update_log_display_entry('scorm', 'view', 'scorm', 'name'); + update_log_display_entry('scorm', 'review', 'scorm', 'name'); + update_log_display_entry('scorm', 'update', 'scorm', 'name'); + update_log_display_entry('scorm', 'add', 'scorm', 'name'); } diff --git a/mod/survey/db/install.php b/mod/survey/db/install.php index e1d8e2a0518..a3d75a0b865 100644 --- a/mod/survey/db/install.php +++ b/mod/survey/db/install.php @@ -9,13 +9,13 @@ function xmldb_survey_install() { global $DB; /// Install logging support - upgrade_log_display_entry('survey', 'add', 'survey', 'name'); - upgrade_log_display_entry('survey', 'update', 'survey', 'name'); - upgrade_log_display_entry('survey', 'download', 'survey', 'name'); - upgrade_log_display_entry('survey', 'view form', 'survey', 'name'); - upgrade_log_display_entry('survey', 'view graph', 'survey', 'name'); - upgrade_log_display_entry('survey', 'view report', 'survey', 'name'); - upgrade_log_display_entry('survey', 'submit', 'survey', 'name'); + update_log_display_entry('survey', 'add', 'survey', 'name'); + update_log_display_entry('survey', 'update', 'survey', 'name'); + update_log_display_entry('survey', 'download', 'survey', 'name'); + update_log_display_entry('survey', 'view form', 'survey', 'name'); + update_log_display_entry('survey', 'view graph', 'survey', 'name'); + update_log_display_entry('survey', 'view report', 'survey', 'name'); + update_log_display_entry('survey', 'submit', 'survey', 'name'); /// insert survey data