Browse Source

Fixing LP visibility after migration see BT#2895

Julio Montoya 14 years ago
parent
commit
10f58ba114
2 changed files with 10 additions and 10 deletions
  1. 1 1
      main/newscorm/lp_controller.php
  2. 9 9
      main/newscorm/lp_list.php

+ 1 - 1
main/newscorm/lp_controller.php

@@ -646,7 +646,7 @@ switch ($action) {
                     }
                 }        
             }
-            require 'lp_list.php';
+            require 'lp_build.php';
         }
         break;
 

+ 9 - 9
main/newscorm/lp_list.php

@@ -179,15 +179,17 @@ if (is_array($flat_list)) {
         
         if (!$is_allowed_to_edit) {
             
-            $time_limits = false;                  
-            if ($details['expired_on'] != '' && $details['expired_on'] != '0000-00-00 00:00:00') {
-                $time_limits = true;  
-            }
+            $time_limits = false;
             
-            //This is an old LP (from a migration) so we do nothing
+            //This is an old LP (from a migration 1.8.7) so we do nothing
             if ( (empty($details['created_on']) ||  $details['created_on'] == '0000-00-00 00:00:00') && (empty($details['modified_on']) || $details['modified_on'] == '0000-00-00 00:00:00')) {
                 $time_limits = false;
             }
+            
+            //Checking if expired_on is ON
+            if ($details['expired_on'] != '' && $details['expired_on'] != '0000-00-00 00:00:00') {
+                $time_limits = true;  
+            }
      
             if ($time_limits) {
                 // check if start time
@@ -206,10 +208,8 @@ if (is_array($flat_list)) {
                     	continue;
                     }                
                 }
-            }
-            
-        }
-        
+            }            
+        }        
 
         $counter++;
         if (($counter % 2) == 0) { $oddclass = 'row_odd'; } else { $oddclass = 'row_even'; }