Exemplo n.º 1
0
             $questionsInfo[$id] = array('text' => $questionInfo['general']['reduced_text'], 'complete_text' => trim(strip_tags($questionInfo['general']['text'])), 'type' => $questionInfo['general']['type'], 'difficulty' => $questionInfo['general']['difficulty'], 'times_done' => $questionInfo['done']['times_done'], 'avg_score' => round($questionInfo['done']['avg_score'], 2));
         }
         $smarty->assign("T_QUESTIONS_INFORMATION", $questionsInfo);
     }
 } catch (Exception $e) {
     $smarty->assign("T_EXCEPTION_TRACE", $e->getTraceAsString());
     $message = $e->getMessage() . ' (' . $e->getCode() . ') &nbsp;<a href = "javascript:void(0)" onclick = "eF_js_showDivPopup(event, \'' . _ERRORDETAILS . '\', 2, \'error_details\')">' . _MOREINFO . '</a>';
     $message_type = 'failure';
 }
 /*
  *      Lesson's projects
  */
 try {
     $lessonProjects = $infoLesson->getProjects(true, false, false);
     if (sizeof($lessonProjects) > 0) {
         $projectsInfo = EfrontStats::getProjectInfo(array_keys($lessonProjects));
         foreach ($projectsInfo as $key => $project) {
             foreach ($project['done'] as $k => $value) {
                 if (!in_array($value['users_LOGIN'], $statsFiltersUsersKeys)) {
                     unset($projectsInfo[$key]['done'][$k]);
                 }
             }
         }
         $smarty->assign("T_PROJECTS_INFORMATION", $projectsInfo);
     }
 } catch (Exception $e) {
     $smarty->assign("T_EXCEPTION_TRACE", $e->getTraceAsString());
     $message = $e->getMessage() . ' (' . $e->getCode() . ') &nbsp;<a href = "javascript:void(0)" onclick = "eF_js_showDivPopup(event, \'' . _ERRORDETAILS . '\', 2, \'error_details\')">' . _MOREINFO . '</a>';
     $message_type = 'failure';
 }
 /*