From 6d76ad0003b7676fc35b11aa7dc3d1f0aa150b1c Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 15 Dec 2014 09:23:52 -0500 Subject: [PATCH] Minor - Add PHPDoc and format code - refs BT#9087 --- main/admin/teacher_time_report.php | 4 ++-- main/inc/lib/sessionmanager.lib.php | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/main/admin/teacher_time_report.php b/main/admin/teacher_time_report.php index 4626642c05..bf69a4d2ab 100644 --- a/main/admin/teacher_time_report.php +++ b/main/admin/teacher_time_report.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'], diff --git a/main/inc/lib/sessionmanager.lib.php b/main/inc/lib/sessionmanager.lib.php index 585c5eb899..942133b481 100755 --- a/main/inc/lib/sessionmanager.lib.php +++ b/main/inc/lib/sessionmanager.lib.php @@ -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);