]> git.mjollnir.org Git - moodle.git/commitdiff
notice() should be allowed at install/upgrade. It stops the whole
authorstronk7 <stronk7>
Sun, 3 Sep 2006 22:30:13 +0000 (22:30 +0000)
committerstronk7 <stronk7>
Sun, 3 Sep 2006 22:30:13 +0000 (22:30 +0000)
process without need to do it. Changed to notify()

mod/forum/db/mysql.php
mod/forum/db/postgres7.php

index a1d890df731d300031b8cfa1e2643352833a2cc9..821b4a364fcf1dfeee41a26f11fb315823da1fce 100644 (file)
@@ -238,19 +238,19 @@ function forum_upgrade($oldversion) {
       if ($forums = get_records('forum')) {
           
           if (!$studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
-              notice('Default student role was not found. Roles and permissions '.
+              notify('Default student role was not found. Roles and permissions '.
                      'for all your forums will have to be manually set after '.
                      'this upgrade.');
           }
           if (!$guestroles = get_roles_with_capability('moodle/legacy:guest', CAP_ALLOW)) {
-              notice('Default guest role was not found. Roles and permissions '.
+              notify('Default guest role was not found. Roles and permissions '.
                      'for teacher forums will have to be manually set after '.
                      'this upgrade.');
           }
           foreach ($forums as $forum) {
               if (!forum_convert_to_roles($forum, $forummod->id,
                         $studentroles, $guestroles)) {
-                  notice('Forum with id '.$forum->id.' was not upgraded');
+                  notify('Forum with id '.$forum->id.' was not upgraded');
               }
           }
           // We need to rebuild all the course caches to refresh the state of
@@ -282,4 +282,4 @@ function forum_upgrade($oldversion) {
 }
 
 
-?>
\ No newline at end of file
+?>
index 204d139fd11b6659ffef878ba3f775eeaa86dffa..f3f98d9e81430fbb11d276290c458199d3a5ec9f 100644 (file)
@@ -188,12 +188,12 @@ function forum_upgrade($oldversion) {
       if ($forums = get_records('forum')) {
           
           if (!$studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
-              notice('Default student role was not found. Roles and permissions '.
+              notify('Default student role was not found. Roles and permissions '.
                      'for all your forums will have to be manually set after '.
                      'this upgrade.');
           }
           if (!$guestroles = get_roles_with_capability('moodle/legacy:guest', CAP_ALLOW)) {
-              notice('Default guest role was not found. Roles and permissions '.
+              notify('Default guest role was not found. Roles and permissions '.
                      'for teacher forums will have to be manually set after '.
                      'this upgrade.');
           }
@@ -201,7 +201,7 @@ function forum_upgrade($oldversion) {
           foreach ($forums as $forum) {
               if (!forum_convert_to_roles($forum, $forummod->id,
                         $studentroles, $guestroles)) {
-                  notice('Forum with id '.$forum->id.' was not upgraded');
+                  notify('Forum with id '.$forum->id.' was not upgraded');
               }
           }
           
@@ -228,19 +228,19 @@ function forum_upgrade($oldversion) {
       if ($forums = get_records('forum')) {
 
           if (!$studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) {
-              notice('Default student role was not found. Roles and permissions '.
+              notify('Default student role was not found. Roles and permissions '.
                      'for all your forums will have to be manually set after '.
                      'this upgrade.');
           }
           if (!$guestroles = get_roles_with_capability('moodle/legacy:guest', CAP_ALLOW)) {
-              notice('Default guest role was not found. Roles and permissions '.
+              notify('Default guest role was not found. Roles and permissions '.
                      'for teacher forums will have to be manually set after '.
                      'this upgrade.');
           }
           foreach ($forums as $forum) {
               if (!forum_convert_to_roles($forum, $forummod->id,
                         $studentroles, $guestroles)) {
-                  notice('Forum with id '.$forum->id.' was not upgraded');
+                  notify('Forum with id '.$forum->id.' was not upgraded');
               }
           }
           // We need to rebuild all the course caches to refresh the state of
@@ -272,4 +272,4 @@ function forum_upgrade($oldversion) {
 }
 
 
-?>
\ No newline at end of file
+?>