Minor - Fix comments in code from #2757

pull/2762/head
Angel Fernando Quiroz Campos 7 years ago
parent bc552b9889
commit b271d1c9f9
  1. 3
      main/inc/lib/tracking.lib.php
  2. 2
      main/inc/lib/usermanager.lib.php
  3. 25
      main/lp/learnpath.class.php
  4. 2
      main/lp/learnpathItem.class.php
  5. 1
      main/lp/lp_controller.php
  6. 3
      main/lp/lp_list.php
  7. 8
      main/template/default/mail/content_ending_learnpath.tpl

@ -436,7 +436,6 @@ class Tracking
$score = $row['myscore'];
$time_for_total = $row['mytime'];
// ## NSR sistema de tiempos nuevo
if (api_get_configuration_value('lp_minimum_time')) {
$timeCourse = self::getCalculateTime($user_id, $course_id, $session_id);
Session::write('trackTimeCourse', $timeCourse);
@ -1900,7 +1899,7 @@ class Tracking
$courseId = $courseInfo['real_id'];
if (api_get_configuration_value('lp_minimum_time')) {
// ## NSR - Muestra la última fecha que accedió a la sesión cuando estaba activa
// Show the last date on which the user acceed the session when it was active
$where_condition = '';
$userInfo = api_get_user_info($student_id);
if ($userInfo['status'] == 5 && $session_id > 0) {

@ -5975,7 +5975,7 @@ SQL;
'tool_id' => 0,
'tool_id_detail' => 0,
'action' => '',
'info' => 'Cambia de usuario (login as)',
'info' => 'Change user (login as)',
];
Event::registerLog($logInfo);

@ -2408,16 +2408,19 @@ class learnpath
}
if (api_get_configuration_value('lp_minimum_time')) {
// ## NSR - bloquear si no supera tiempo minimo
// TL --- Tiempo minimo para superar la lección ( en minutos )
// Block if it does not exceed minimum time
// Minimum time (in minutes) to pass the learning path
$accumulateWorkTime = self::getAccumulateWorkTimePrerequisite($prerequisite, $courseInfo['real_id']);
if ($accumulateWorkTime > 0) {
// TT --- Tiempo total del curso
// Total time in course (sum of times in learning paths from course)
$accumulateWorkTimeTotal = self::getAccumulateWorkTimeTotal($courseInfo['real_id']);
// P y TC --- Conectamos con la tabla plugin_licences_course_session en la que se indica que porcentaje del tiempo se aplica
// Connect with the plugin_licences_course_session table
// which indicates what percentage of the time applies
// Minimum connection percentage
$perc = 100;
// Time from the course
$tc = $accumulateWorkTimeTotal;
if (!empty($sessionId) && $sessionId != 0) {
/*$sql = "SELECT hours, perc FROM plugin_licences_course_session WHERE session_id = $sessionId";
@ -2429,20 +2432,12 @@ class learnpath
}*/
}
// PL --- Porcentaje lección (tiempo leccion / tiempo total curso)
// Percentage of the learning paths
$pl = $accumulateWorkTime / $accumulateWorkTimeTotal;
/*
* TL: Tiempo que pone en una lección
* TT : tiempo total que pone Teresa (suma tiempos lecciones curso)
* PL: Fracción que supone una lección sobre el tiempo total = TL/TT
* TC: Tiempo que dice el cliente que tiene el curso
* P: porcentaje mínimo conexión que indica el cliente
*
* el tiempo mínimo de cada lección sería: PL x TC x P /100
*/
// Minimum time for each learning path
$accumulateWorkTime = ($pl * $tc * $perc / 100);
// Tiempo empleado hasta el momento en la leccion ( en segundos )
// Spent time (in seconds) so far in the learning path
$lpTime = Tracking::get_time_spent_in_lp(
$studentId,
$courseInfo['code'],

@ -1899,7 +1899,7 @@ class learnpathItem
return $time;
} else {
/* ## NSR - calculo de tiempo minimo y acumulado */
// Calulate minimum and accumulated time
$user_id = api_get_user_id();
$myLP = learnpath::getLpFromSession(api_get_course_id(), $this->lp_id, $user_id);
$timeLp = $myLP->getAccumulateWorkTime();

@ -412,7 +412,6 @@ if ($debug > 0) {
}
switch ($action) {
// ## NSR
case 'send_notify_teacher':
// Enviar correo al profesor
$studentInfo = api_get_user_info();

@ -398,7 +398,6 @@ foreach ($categories as $item) {
}
}
// ## NSR
if ($progress < 100) {
$ending = false;
}
@ -406,7 +405,6 @@ foreach ($categories as $item) {
$dsp_time = '';
$linkMinTime = '';
if (api_get_configuration_value('lp_minimum_time')) {
// ## NSR
// Time info
// TL --- Tiempo minimo para superar la lección ( en minutos )
$accumulateWorkTime = learnpath::getAccumulateWorkTimePrerequisite($id, api_get_course_int_id());
@ -477,7 +475,6 @@ foreach ($categories as $item) {
$time_progress_value = intval(($lpTime * 100) / ($accumulateWorkTime * 60));
}
// ## NSR
if ($time_progress_value < 100) {
$ending = false;
}

@ -1,6 +1,6 @@
<p>{{ 'Dear'|get_lang }} {{ name_teacher }},</p>
<p>El estudiante <b>{{ name_student }}</b> ha finalizado las lecciones del grupo <b>{{ course_name }}</p>
<p>{{ 'DearXComma'|get_lang|format(name_teacher) }}</p>
<p>{{ 'TheStudentXHasFinishedTheCourseYLessons'|get_lang|format(name_student, course_name) }}</p>
<p>{{ course_url }}</p>
<p>{{ 'SignatureFormula'|get_lang }}</p>
<p> {{ prefix ? prefix }}<br>
</p>
<p>{{ prefix ? prefix }}</p>
<br>

Loading…
Cancel
Save