Minor - Add PHPDoc and format code - refs BT#9087

1.10.x
Angel Fernando Quiroz Campos 11 years ago
parent 8b83929ec1
commit 6d76ad0003
  1. 4
      main/admin/teacher_time_report.php
  2. 9
      main/inc/lib/sessionmanager.lib.php

@ -150,7 +150,7 @@ if (!empty($selectedSession)) {
if (!empty($selectedTeacher)) {
$withFilter = true;
$coach = api_get_user_info($selectedTeacher);
$courses = SessionManager::getCoursesListByCourseCoach($selectedTeacher);
@ -167,7 +167,7 @@ if (!empty($selectedTeacher)) {
$selectedFrom,
$selectedUntil
);
$rows[] = array(
'session' => array(
'id' => $session['id'],

@ -5361,6 +5361,15 @@ class SessionManager
return '00:00:00';
}
/**
* Calc the expended time (hh::mm:ss) by a user in a course
* @param int $userId The user id
* @param string $courseCode The course id
* @param int $sessionId Optional. The session id
* @param string $from Optional. From date
* @param string $until Optional. Until date
* @return string The time
*/
public static function getUserTimeInCourse($userId, $courseCode, $sessionId = 0, $from = '', $until = '')
{
$userId = intval($userId);

Loading…
Cancel
Save