MDL-43656 mod_feedback: availablity date logic incorrect
authorTomasz Muras <tm@enovation.ie>
Mon, 3 Mar 2014 03:23:44 +0000 (11:23 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 3 Mar 2014 03:23:44 +0000 (11:23 +0800)
mod/feedback/complete.php
mod/feedback/complete_guest.php

index 3956167..189410e 100644 (file)
@@ -176,8 +176,8 @@ if ((empty($cm->visible) AND
 
 //check, if the feedback is open (timeopen, timeclose)
 $checktime = time();
 
 //check, if the feedback is open (timeopen, timeclose)
 $checktime = time();
-$feedback_is_closed = ($feedback->timeopen > $checktime) OR
-                      ($feedback->timeclose < $checktime AND
+$feedback_is_closed = ($feedback->timeopen > $checktime) ||
+                      ($feedback->timeclose < $checktime &&
                             $feedback->timeclose > 0);
 
 if ($feedback_is_closed) {
                             $feedback->timeclose > 0);
 
 if ($feedback_is_closed) {
index ebc0ad8..407d63e 100644 (file)
@@ -177,8 +177,8 @@ if ((empty($cm->visible) AND
 //check, if the feedback is open (timeopen, timeclose)
 $checktime = time();
 
 //check, if the feedback is open (timeopen, timeclose)
 $checktime = time();
 
-$feedback_is_closed = ($feedback->timeopen > $checktime) OR
-                      ($feedback->timeclose < $checktime AND
+$feedback_is_closed = ($feedback->timeopen > $checktime) ||
+                      ($feedback->timeclose < $checktime &&
                             $feedback->timeclose > 0);
 
 if ($feedback_is_closed) {
                             $feedback->timeclose > 0);
 
 if ($feedback_is_closed) {