Răsfoiți Sursa

Minor - show timer also to teachers

Julio Montoya 6 ani în urmă
părinte
comite
f4570e39d5
2 a modificat fișierele cu 13 adăugiri și 9 ștergeri
  1. 9 6
      main/lp/lp_list.php
  2. 4 3
      main/template/default/learnpath/list.tpl

+ 9 - 6
main/lp/lp_list.php

@@ -448,11 +448,14 @@ foreach ($categories as $item) {
                     // Si el tiempo empleado es menor que lo necesario mostramos un icono en la columna de acción indicando la advertencia
                     if ($lpTime < ($accumulateWorkTime * 60)) {
                         $linkMinTime = Display::return_icon(
-                                'warning.png',
-                                get_lang('LpMessageTimeMin').' - '.api_time_to_hms($lpTime).' / '.api_time_to_hms(
-                                    $accumulateWorkTime * 60
-                                )
-                            ).'<b>'.api_time_to_hms($lpTime).' / '.api_time_to_hms($accumulateWorkTime * 60).'</b>';
+                            'warning.png',
+                            get_lang('LpMessageTimeMin').' - '.api_time_to_hms($lpTime).' / '.api_time_to_hms(
+                                $accumulateWorkTime * 60
+                            )
+                        );
+                        $linkMinTime .='<b>'.api_time_to_hms($lpTime).' / '.api_time_to_hms($accumulateWorkTime * 60).'</b>';
+                    } else {
+                        $linkMinTime = sprintf(get_lang('YouHaveSpentXTime'), api_time_to_hms($lpTime));
                     }
 
                     // Calculamos el porcentaje superado del tiempo para la barra de "superacion de tiempo mínimo"
@@ -483,7 +486,7 @@ foreach ($categories as $item) {
             $actionUpdateScormFile = '';
             $actionExportToCourseBuild = '';
             // Only for "Chamilo" packages
-            $allowExportCourseFormat = $allowLpChamiloExport && $details['lp_maker'] == 'Chamilo';
+            $allowExportCourseFormat = $allowLpChamiloExport && $details['lp_maker'] === 'Chamilo';
 
             if ($is_allowed_to_edit) {
                 // EDIT LP

+ 4 - 3
main/template/default/learnpath/list.tpl

@@ -103,7 +103,9 @@
                         <table class="table table-hover table-striped">
                             <thead>
                             <tr>
-                                <th>{{ "Title"|get_lang }}</th>
+                                <th>
+                                    {{ "Title"|get_lang }}
+                                </th>
                                 {% if is_allowed_to_edit %}
                                     <th>{{ "PublicationDate"|get_lang }}</th>
                                     <th>{{ "ExpirationDate"|get_lang }}</th>
@@ -148,10 +150,9 @@
                                         {% endif %}
                                     {% endif %}
                                     <td>
-                                        {% if not is_allowed_to_edit and row.info_time_prerequisite %}
+                                        {% if row.info_time_prerequisite %}
                                             {{ row.info_time_prerequisite }}
                                         {% endif %}
-
                                         {{ row.action_build }}
                                         {{ row.action_edit }}
                                         {{ row.action_visible }}