Sfoglia il codice sorgente

fixed UserTestStats unactual info

Piotr Labudda 8 anni fa
parent
commit
ff356dfabf
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5 4
      SE/se-lib/Schema/UserTestStatsStorageAcl.php

+ 5 - 4
SE/se-lib/Schema/UserTestStatsStorageAcl.php

@@ -78,7 +78,7 @@ class Schema_UserTestStatsStorageAcl extends Core_AclSimpleSchemaBase {
         group by t.ID_PROCES_INIT
       )
     ", 'ID_PROCES_INIT');
-    DBG::_('DBG', '>0', "\$wynikiTeoret", $wynikiTeoret, __CLASS__, __FUNCTION__, __LINE__);
+    DBG::log($wynikiTeoret, 'array', "\$wynikiTeoret");
     $wynikiPraktyczne = DB::getPDO()->fetchAllByKey("
       select test.ID
         ,  test.ID_PROCES_INIT
@@ -96,7 +96,7 @@ class Schema_UserTestStatsStorageAcl extends Core_AclSimpleSchemaBase {
         group by t.ID_PROCES_INIT
       )
     ", 'ID_PROCES_INIT');
-    DBG::_('DBG', '>0', "\$wynikiPraktyczne", $wynikiPraktyczne, __CLASS__, __FUNCTION__, __LINE__);
+    DBG::log($wynikiPraktyczne, 'array', "\$wynikiPraktyczne");
 
     $limit = V::get('limit', 0, $params);
     $limit = ($limit < 0) ? 0 : $limit;
@@ -112,7 +112,8 @@ class Schema_UserTestStatsStorageAcl extends Core_AclSimpleSchemaBase {
       where i.idx_PROCES_INIT_ID in (" . implode(",", array_keys($items)) . ")
       group by i.idx_PROCES_INIT_ID
     ", 'ID');
-    DBG::_('DBG', '>0', "\$testyLastUpdate", $testyLastUpdate, __CLASS__, __FUNCTION__, __LINE__);
+    DBG::log($testyLastUpdate, 'array', "\$testyLastUpdate");
+    DBG::log($items, 'array', "\$items...");
 
     array_walk($items, function(&$item, $key) use ($wynikiTeoret, $wynikiPraktyczne, $testyLastUpdate) {
       $item['link_uruchom_test_teoretyczny'] = Request::getPathUri() . "procesy5.php?task=CRM_TESTY__ADD_TEST&test_type=TEORETYCZNY&proces_id={$item['ID']}";
@@ -141,7 +142,7 @@ class Schema_UserTestStatsStorageAcl extends Core_AclSimpleSchemaBase {
         ");
         if ($item['last_update_date']) {
           $max_update_date = substr($item['last_update_date'], 0, 10);
-          $test_end = substr($item['TEST_END'], 0, 10);
+          $test_end = substr($item['last_test_end'], 0, 10);
           if ($max_update_date > $test_end) {
             $item['wynik_unactual'] = $max_update_date;
             $item['wynik_unactual_id'] = $test['ID'];