glossary MDL-23373 made glossary save rating settings properly when its first created
authorAndrew Davis <andrew@affinitysoftware.net>
Tue, 20 Jul 2010 02:04:11 +0000 (02:04 +0000)
committerAndrew Davis <andrew@affinitysoftware.net>
Tue, 20 Jul 2010 02:04:11 +0000 (02:04 +0000)
mod/glossary/lib.php

index 5cba538..4097e81 100644 (file)
@@ -51,10 +51,6 @@ function glossary_add_instance($glossary) {
 /// will create a new instance and return the id number
 /// of the new instance.
 
 /// will create a new instance and return the id number
 /// of the new instance.
 
-    if (empty($glossary->userating)) {
-        $glossary->assessed = 0;
-    }
-
     if (empty($glossary->ratingtime) or empty($glossary->assessed)) {
         $glossary->assesstimestart  = 0;
         $glossary->assesstimefinish = 0;
     if (empty($glossary->ratingtime) or empty($glossary->assessed)) {
         $glossary->assesstimestart  = 0;
         $glossary->assesstimefinish = 0;
@@ -109,10 +105,6 @@ function glossary_update_instance($glossary) {
     $glossary->timemodified = time();
     $glossary->id           = $glossary->instance;
 
     $glossary->timemodified = time();
     $glossary->id           = $glossary->instance;
 
-    //if (empty($glossary->userating)) {
-//        $glossary->assessed = 0;
-  //  }
-
     if (empty($glossary->ratingtime) or empty($glossary->assessed)) {
         $glossary->assesstimestart  = 0;
         $glossary->assesstimefinish = 0;
     if (empty($glossary->ratingtime) or empty($glossary->assessed)) {
         $glossary->assesstimestart  = 0;
         $glossary->assesstimefinish = 0;