|
|
|
|
@ -21,8 +21,8 @@ class TestTracking extends UnitTestCase { |
|
|
|
|
if(!is_null($res))$this->assertTrue(is_bool($res)); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testchat_connections_during_last_x_days_by_course() { |
|
|
|
|
global $_course; |
|
|
|
|
$course_code=$_course; |
|
|
|
|
@ -113,7 +113,7 @@ class TestTracking extends UnitTestCase { |
|
|
|
|
$student_id=$_user; |
|
|
|
|
$course_code=$_course; |
|
|
|
|
$a_course = CourseManager :: get_course_information($course_code); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$res=Tracking::count_student_messages($student_id, $course_code); |
|
|
|
|
$this->assertTrue(is_object($this->tracking)); |
|
|
|
|
if(!is_numeric($res))$this->assertTrue(is_null($res)); |
|
|
|
|
@ -212,7 +212,7 @@ class TestTracking extends UnitTestCase { |
|
|
|
|
|
|
|
|
|
function testget_inactives_students_in_course() { |
|
|
|
|
global $_course; |
|
|
|
|
$course_code = $_course; |
|
|
|
|
$course_code = $_course; |
|
|
|
|
$since='2010-10-02'; |
|
|
|
|
$session_id=''; |
|
|
|
|
$res=Tracking::get_inactives_students_in_course($course_code, $since, $session_id); |
|
|
|
|
@ -271,7 +271,7 @@ class TestTracking extends UnitTestCase { |
|
|
|
|
if(!is_null($res))$this->assertTrue(is_bool($res)); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testchat_last_connection() { |
|
|
|
|
require_once (api_get_path(LIBRARY_PATH) . 'course.lib.php'); |
|
|
|
|
global $_course; |
|
|
|
|
@ -282,7 +282,7 @@ class TestTracking extends UnitTestCase { |
|
|
|
|
$this->assertTrue(is_object($this->tracking)); |
|
|
|
|
if(!is_string($res))$this->assertTrue(is_null($res)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testget_last_connection_date() { |
|
|
|
|
$student_id=1; |
|
|
|
|
$res=Tracking::get_last_connection_date($student_id); |
|
|
|
|
@ -304,32 +304,25 @@ class TestTrackingCourseLog extends UnitTestCase { |
|
|
|
|
function testCountItemResources() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$res = TrackingCourseLog::count_item_resources(); |
|
|
|
|
$this->assertTrue(is_numeric($res)); |
|
|
|
|
$this->assertTrue(is_numeric($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function testDisplayAdditionalProfileFields() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$res = TrackingCourseLog::display_additional_profile_fields(); |
|
|
|
|
$this->assertTrue(is_string($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
function testGetAddtionalProfileInformationOfField() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$field_id=1; |
|
|
|
|
$res = TrackingCourseLog::get_addtional_profile_information_of_field($field_id); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
$this->assertTrue(is_string($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function testGetAddtionalProfileInformationOfFieldByUser() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$field_id=1; |
|
|
|
|
$users=array(1,2,3); |
|
|
|
|
$res = TrackingCourseLog::get_addtional_profile_information_of_field_by_user($field_id, $users); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -340,14 +333,14 @@ class TestTrackingCourseLog extends UnitTestCase { |
|
|
|
|
$column=1; |
|
|
|
|
$direction='ASC'; |
|
|
|
|
$res = TrackingCourseLog::get_item_resources_data($from, $number_of_items, $column, $direction); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
function testGetNumberOfUsers() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$res = TrackingCourseLog::get_number_of_users(); |
|
|
|
|
$this->assertTrue(is_numeric($res)); |
|
|
|
|
$this->assertTrue(is_numeric($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -355,7 +348,7 @@ class TestTrackingCourseLog extends UnitTestCase { |
|
|
|
|
//ob_start(); |
|
|
|
|
$tool=''; |
|
|
|
|
$res = TrackingCourseLog::get_tool_name_table($tool); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -366,32 +359,32 @@ class TestTrackingCourseLog extends UnitTestCase { |
|
|
|
|
$column=''; |
|
|
|
|
$direction=''; |
|
|
|
|
$res = TrackingCourseLog::get_user_data($from, $number_of_items, $column, $direction); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class TestTrackingUserLog extends UnitTestCase { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testDisplayDocumentTrackingInfo() { |
|
|
|
|
ob_start(); |
|
|
|
|
$view = ''; |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLog::display_document_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
function testDisplayExerciseTrackingInfo() { |
|
|
|
|
ob_start(); |
|
|
|
|
$view = ''; |
|
|
|
|
$user_id = 1; |
|
|
|
|
$courseCode = 'TEST'; |
|
|
|
|
$res = TrackingUserLog::display_exercise_tracking_info($view, $user_id, $courseCode); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -401,7 +394,7 @@ class TestTrackingUserLog extends UnitTestCase { |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLog::display_links_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -411,7 +404,7 @@ class TestTrackingUserLog extends UnitTestCase { |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLog::display_login_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -421,43 +414,43 @@ class TestTrackingUserLog extends UnitTestCase { |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLog::display_student_publications_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
$this->assertTrue(is_null($res)); |
|
|
|
|
ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class TestTrackingUserLogCSV extends UnitTestCase { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function testDisplayDocumentTrackingInfo() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$view = ''; |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLogCSV::display_document_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
function testDisplayExerciseTrackingInfo() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$view = ''; |
|
|
|
|
$user_id = 1; |
|
|
|
|
$courseCode = 'TEST'; |
|
|
|
|
$res = TrackingUserLogCSV::display_exercise_tracking_info($view, $user_id, $courseCode); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function testDisplayLinksTrackingInfo() { |
|
|
|
|
//ob_start(); |
|
|
|
|
$view = ''; |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLogCSV::display_links_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -467,7 +460,7 @@ class TestTrackingUserLogCSV extends UnitTestCase { |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLogCSV::display_login_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
@ -477,9 +470,9 @@ class TestTrackingUserLogCSV extends UnitTestCase { |
|
|
|
|
$user_id = 1; |
|
|
|
|
$course_id = 1; |
|
|
|
|
$res = TrackingUserLogCSV::display_student_publications_tracking_info($view, $user_id, $course_id); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
$this->assertTrue(is_array($res)); |
|
|
|
|
//ob_end_clean(); |
|
|
|
|
//var_dump($res); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
?> |
|
|
|
|
|