]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19067 removed obsoleted string (never used in any STABLE branch)
authorskodak <skodak>
Tue, 5 May 2009 09:00:24 +0000 (09:00 +0000)
committerskodak <skodak>
Tue, 5 May 2009 09:00:24 +0000 (09:00 +0000)
lang/en_utf8/error.php
lang/en_utf8/lesson.php
mod/glossary/editcategories.php
mod/lesson/action/updatepage.php
mod/lesson/view.php

index 676b006614cd47a8923030b1510e14b634334704..aae3df3732108ae74ccc1751283e14601ff62779 100644 (file)
@@ -83,7 +83,6 @@ $string['cannothaveparentcate'] = 'Course category cannot have parent!';
 $string['cannotimport'] = 'Import error';
 $string['cannotimportgrade'] = 'Grade import error';
 $string['cannotimportformat'] = 'Sorry, importing this format is not yet implemented!';
-$string['cannotinsertcategory'] = 'Weird error. The category was not inserted.';
 $string['cannotinsertgrade'] = 'Cannot insert grade item without course id!';
 $string['cannotinsertrate'] = 'Could not insert a new rating ($a->id = $a->rating)';
 $string['cannotinsertrecord'] = 'Could not insert new record ID $a';
index 1f6b5a618f2d97c5db8a0bfa71f8f0a211f0efb7..55776f91798bb8b58a4745ba6c3b6ae7cd1c05c6 100644 (file)
@@ -56,7 +56,6 @@ $string['cannotdeleteattempt'] = 'Error: could not delete old attempts';
 $string['cannotdeletebranch'] = 'Error: could not delete old seen branches';
 $string['cannotinsertanswer'] = 'Cannot insert answer record';
 $string['cannotinserthighscore'] = 'Insert of new high score Failed!';
-$string['cannotinsertgrade'] = 'Cannot insert grade';
 $string['cannotinsertpage'] = 'Cannot insert new page';
 $string['cannotinserttimer'] = 'Error: could not insert row into lesson_timer table';
 $string['cannotupdateanswer'] = 'Update page: answer not updated';
index 0213c0a0a5b9351d1a7fa80b21e82e88b5ee0464..871989f221226208b2882813254ac583daa35fb4 100644 (file)
                 $cat->usedynalink = $usedynalink;
                 $cat->glossaryid = $glossary->id;
 
-                if ( ! $cat->id = $DB->insert_record("glossary_categories", $cat) ) {
-                    print_error('cannotinsertcategory');
-
-                    redirect("editcategories.php?id=$cm->id");
-                } else {
-                    add_to_log($course->id, "glossary", "add category", "editcategories.php?id=$cm->id", $cat->id,$cm->id);
-                }
+                $cat->id = $DB->insert_record("glossary_categories", $cat);
+                add_to_log($course->id, "glossary", "add category", "editcategories.php?id=$cm->id", $cat->id,$cm->id);
             }
         } else {
             echo "<p style=\"text-align:center\">" . get_string("add"). " " . get_string("category","glossary"). "</p>";
index c22a30787564676bb4b2c90f08194fc40ea3b889..5b02737544a1d915d25146f70f6b10c46b39397a 100644 (file)
@@ -66,9 +66,7 @@
         if ($answers = $DB->get_records_select("lesson_answers", "pageid = :pageid", $params)) {
             foreach ($answers as $answer) {
                 if ($answer->id != clean_param($form->answerid[0], PARAM_INT)) {
-                    if (!$DB->delete_records("lesson_answers", array("id" => $answer->id))) {
-                        print_error('cannotdeleteanswer', 'lesson');
-                    }
+                    $DB->delete_records("lesson_answers", array("id" => $answer->id));
                 }
             }
         }        
                     if ($i >= 2) {
                         if ($form->answerid[$i]) {
                             // need to delete blanked out answer
-                            if (!$DB->delete_records("lesson_answers", array("id" => clean_param($form->answerid[$i], PARAM_INT)))) {
-                                print_error('cannotdeleteanswer', 'lesson');
-                            }
+                            $DB->delete_records("lesson_answers", array("id" => clean_param($form->answerid[$i], PARAM_INT)));
                         }
                     } else {
                         $oldanswer = new stdClass;
                     }                        
                 } elseif (!empty($form->answerid[$i])) {
                     // need to delete blanked out answer
-                    if (!$DB->delete_records("lesson_answers", array("id" => clean_param($form->answerid[$i], PARAM_INT)))) {
-                        print_error('cannotdeleteanswer', 'lesson');
-                    }
+                    $DB->delete_records("lesson_answers", array("id" => clean_param($form->answerid[$i], PARAM_INT)));
                 }
             }
         }
index 6db1be901a605b29f19c019d75f34fed0cd13149..3d372394c8f89b33baa751f6a886998784d4aef2 100644 (file)
                             print_error('cannotupdategrade', 'lesson');
                         }
                     } else {
-                        if (!$newgradeid = $DB->insert_record("lesson_grades", $grade)) {
-                            print_error('cannotinsertgrade', 'lesson');
-                        }
+                        $newgradeid = $DB->insert_record("lesson_grades", $grade);
                     }
                 } else {
                     if (!$DB->delete_records("lesson_attempts", array("lessonid" => $lesson->id, "userid" => $USER->id, "retry" => $ntries))) {