]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14657 - additional check if instance-id is numeric for better compatibility to
authoragrabs <agrabs>
Sat, 3 May 2008 21:41:53 +0000 (21:41 +0000)
committeragrabs <agrabs>
Sat, 3 May 2008 21:41:53 +0000 (21:41 +0000)
 postgres

mod/feedback/mod_form.php
mod/feedback/version.php

index 6076a9f24fdedbc08f18e14932b83f3b964e50f7..af4be21ee75a2af15992dffa70e4b104618934e9 100644 (file)
@@ -59,7 +59,7 @@ class mod_feedback_mod_form extends moodleform_mod {
         $mform->setHelpButton('email_notification', array('emailnotification', get_string('email_notification', 'feedback'), 'feedback'));
         
         // check if there is existing responses to this feedback
-        if ($this->_instance and $feedback = get_record("feedback", "id", $this->_instance)) {
+        if (is_numeric($this->_instance) AND $this->_instance and $feedback = get_record("feedback", "id", $this->_instance)) {
             $completedFeedbackCount = feedback_get_completeds_group_count($feedback);
         } else {
             $completedFeedbackCount = false;
index d7af244cd087de94689e6207622f5655e763982a..4e527074b6adc7ca44e88208e663c532fe473e0e 100644 (file)
@@ -10,7 +10,7 @@
 */
 
    
-    $module->version = 2008042900; // The current module version (Date: YYYYMMDDXX)
+    $module->version = 2008042901; // The current module version (Date: YYYYMMDDXX)
     $module->requires = 2007101503;  // Requires this Moodle version
     $feedback_version_intern = 1; //this version is used for restore older backups
     $module->cron = 0; // Period for cron to check this module (secs)