} } $contentType_alt = selectAlt($module['contentType']); // eikonidio pou deixnei an perasame h oxi to sygkekrimeno module unset($imagePassed); if ($module['credit'] == 'CREDIT' || $module['lesson_status'] == 'COMPLETED' || $module['lesson_status'] == 'PASSED') { if ($module['contentType'] == CTSCORM_ || $module['contentType'] == CTSCORMASSET_) { $moduleImg = 'tick'; } else { $imagePassed = icon_old_style('tick', $module['lesson_status']); } } if (($module['contentType'] == CTSCORM_ || $module['contentType'] == CTSCORMASSET_) && $module['lesson_status'] == 'FAILED') { $moduleImg = 'lp_failed'; } echo "<li style=\"margin-left: " . $marginIndent . "px;\">" . icon_old_style($moduleImg, ''); // emphasize currently displayed module or not if ($_SESSION['lp_module_id'] == $module['module_id']) { echo "<em>" . htmlspecialchars($module['name']) . "</em>"; } else { echo "<a href='navigation/viewModule.php?course={$course_code}&viewModule_id={$module['module_id']}'" . $style . " target='scoFrame'>" . htmlspecialchars($module['name']) . "</a>"; } if (isset($imagePassed)) { echo " " . $imagePassed; } echo "</li>"; if ($module['lock'] == 'CLOSE' && ($module['credit'] != 'CREDIT' || $module['lesson_status'] != 'COMPLETED' && $module['lesson_status'] != 'PASSED')) { $is_blocked = true; } } }
$departments = $course->getDepartmentIds($logs->id); $i = 1; $dep = ''; foreach ($departments as $department) { $br = $i < count($departments) ? '<br/>' : ''; $dep .= $tree->getFullPath($department) . $br; $i++; } // Add links to course users, delete course and course edit $icon_content = icon('fa-user', $langUsers, "listusers.php?c={$logs->id}") . " "; if (!isDepartmentAdmin()) { $icon_content .= icon('fa-list', $langUsersLog, "../usage/displaylog.php?c={$logs->id}&from_admin=TRUE") . " "; } $icon_content .= icon('fa-edit', $langEdit, "editcours.php?c={$logs->code}") . " "; $icon_content .= icon('fa-times', $langDelete, "delcours.php?c={$logs->id}"); $data['aaData'][] = array('0' => $course_title, '1' => icon_old_style($icon, $title), '2' => $dep, '3' => $icon_content); } echo json_encode($data); exit; } load_js('tools.js'); load_js('datatables'); load_js('datatables_filtering_delay'); $head_content .= "<script type='text/javascript'>\n \$(document).ready(function() {\n \$('#course_results_table').dataTable ({\n 'bProcessing': true,\n 'bServerSide': true,\n 'sAjaxSource': '{$_SERVER['REQUEST_URI']}',\n 'aLengthMenu': [\n [10, 15, 20 , -1],\n [10, 15, 20, '{$langAllOfThem}'] // change per page values here\n ],\n 'sPaginationType': 'full_numbers',\n 'bAutoWidth': false,\n 'aoColumns': [\n {'bSortable' : true, 'sWidth': '50%' },\n {'bSortable' : false, 'sClass': 'center' },\n {'bSortable' : false, 'sWidth': '25%' },\n {'bSortable' : false },\n ],\n 'oLanguage': {\n 'sLengthMenu': '{$langDisplay} _MENU_ {$langResults2}',\n 'sZeroRecords': '" . $langNoResult . "',\n 'sInfo': '{$langDisplayed} _START_ {$langTill} _END_ {$langFrom2} _TOTAL_ {$langTotalResults}',\n 'sInfoEmpty': '{$langDisplayed} 0 {$langTill} 0 {$langFrom2} 0 {$langResults2}',\n 'sInfoFiltered': '',\n 'sInfoPostFix': '',\n 'sSearch': '" . $langSearch . "',\n 'sUrl': '',\n 'oPaginate': {\n 'sFirst': '«',\n 'sPrevious': '‹',\n 'sNext': '›',\n 'sLast': '»'\n }\n }\n }).fnSetFilteringDelay(1000);\n \$('.dataTables_filter input').attr('placeholder', '{$langTitle}, {$langTeacher}');\n });\n </script>"; $navigation[] = array('url' => 'index.php', 'name' => $langAdmin); $navigation[] = array('url' => 'searchcours.php', 'name' => $langSearchCourses); $toolName = $langListCours; // Display Actions Toolbar $tool_content .= action_bar(array(array('title' => $langAllCourses, 'url' => "{$_SERVER['SCRIPT_NAME']}?formsearchtitle=&formsearchcode=&formsearchtype=-1&reg_flag=1&date=&formsearchfaculte=0&search_submit={$langSearch}", 'icon' => 'fa-search', 'level' => 'primary-label'), array('title' => $langReturnSearch, 'url' => "searchcours.php", 'icon' => 'fa-reply', 'level' => 'primary'))); $width = !isDepartmentAdmin() ? 100 : 80; // Construct course list table
), array( 'title' => $langUsersLog, 'icon' => 'fa-list', 'url' => "../usage/displaylog.php?c=$logs->id&from_admin=TRUE", 'show' => !isDepartmentAdmin() ), array( 'title' => $langDelete, 'icon' => 'fa-times', 'url' => "delcours.php?c=$logs->id" ) )); $data['aaData'][] = array( '0' => $course_title, '1' => icon_old_style($icon, $title), '2' => $dep, '3' => $icon_content ); } echo json_encode($data); exit(); } load_js('tools.js'); load_js('datatables'); load_js('datatables_filtering_delay'); $head_content .= "<script type='text/javascript'> $(document).ready(function() { $('#course_results_table').dataTable ({ ".(($is_editor)?"'aoColumnDefs':[{'sClass':'option-btn-cell', 'aTargets':[-1]}],":"")."