]> git.mjollnir.org Git - moodle.git/commitdiff
Hold the presses ... I hate doing this but after going into detail
authormoodler <moodler>
Sat, 16 Aug 2003 03:28:56 +0000 (03:28 +0000)
committermoodler <moodler>
Sat, 16 Aug 2003 03:28:56 +0000 (03:28 +0000)
changing the course creator account like this is the wrong way to
do this.

Instead, I'm going to be adding new fields to user_teachers

Stay tuned

lib/db/mysql.php

index 4e3ddf65f3c656787f5b15c4c3a2f60671556eea..9ee9564079a39c5d7f9fe004fb46a85d0c2bb13f 100644 (file)
@@ -441,24 +441,24 @@ function main_upgrade($oldversion=0) {
     }
 
     if ($oldversion < 2003081500) {
-        print_simple_box("Some important changes have been made to how course creators work.  Formerly, they could create new courses and assign teachers, and teachers could edit courses.  Now, ordinary teachers can no longer edit courses - they <b>need to be a teacher of a course AND a course creator</b>.  A new site-wide configuration variable allows you to choose whether to allow course creators to create new courses as well (by default this is off).  <p>The following update will automatically convert all your existing teachers into course creators, to maintain backward compatibility.  Make sure you look at your upgraded site carefully and understand these new changes.", "center", "50%", "$THEME->cellheading", "20", "noticebox");
+//        print_simple_box("Some important changes have been made to how course creators work.  Formerly, they could create new courses and assign teachers, and teachers could edit courses.  Now, ordinary teachers can no longer edit courses - they <b>need to be a teacher of a course AND a course creator</b>.  A new site-wide configuration variable allows you to choose whether to allow course creators to create new courses as well (by default this is off).  <p>The following update will automatically convert all your existing teachers into course creators, to maintain backward compatibility.  Make sure you look at your upgraded site carefully and understand these new changes.", "center", "50%", "$THEME->cellheading", "20", "noticebox");
         
-        $count = 0;
-        $errorcount = 0;
-        if ($teachers = get_records("user_teachers")) {
-            foreach ($teachers as $teacher) {
-                if (! record_exists("user_coursecreators", "userid", $teacher->userid)) {
-                    $creator = NULL;
-                    $creator->userid = $teacher->userid;
-                    if (!insert_record("user_coursecreators", $creator)) {
-                        $errorcount++;
-                    } else {
-                        $count++;
-                    }
-                }
-            }
-        }
-        print_simple_box("$count teachers were upgraded to course creators (with $errorcount errors)", "center", "50%", "$THEME->cellheading", "20", "noticebox");
+//        $count = 0;
+//        $errorcount = 0;
+//        if ($teachers = get_records("user_teachers")) {
+//            foreach ($teachers as $teacher) {
+//                if (! record_exists("user_coursecreators", "userid", $teacher->userid)) {
+//                    $creator = NULL;
+//                    $creator->userid = $teacher->userid;
+//                    if (!insert_record("user_coursecreators", $creator)) {
+//                        $errorcount++;
+//                    } else {
+//                        $count++;
+//                    }
+//                }
+//            }
+//        }
+//        print_simple_box("$count teachers were upgraded to course creators (with $errorcount errors)", "center", "50%", "$THEME->cellheading", "20", "noticebox");
 
     }