|
|
@ -266,12 +266,12 @@ switch ($action) { |
|
|
|
case 'get_session_progress': |
|
|
|
case 'get_session_progress': |
|
|
|
//@TODO replace this for a more efficient function (not retrieving the whole data) |
|
|
|
//@TODO replace this for a more efficient function (not retrieving the whole data) |
|
|
|
$course = api_get_course_info_by_id($courseId); |
|
|
|
$course = api_get_course_info_by_id($courseId); |
|
|
|
$users = CourseManager::get_student_list_from_course_code($course['code'], true, intval($_GET['session_id']), $_GET['date_from'], $_GET['date_to']); |
|
|
|
$users = CourseManager::get_student_list_from_course_code($course['code'], true, $_GET['session_id'], $_GET['date_from'], $_GET['date_to']); |
|
|
|
$count = count($users); |
|
|
|
$count = count($users); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'get_exercise_progress': |
|
|
|
case 'get_exercise_progress': |
|
|
|
//@TODO replace this for a more efficient function (not retrieving the whole data) |
|
|
|
//@TODO replace this for a more efficient function (not retrieving the whole data) |
|
|
|
$records = Tracking::get_exercise_progress(intval($_GET['session_id']), intval($_GET['course_id']), intval($_GET['exercise_id']), $_GET['date_from'], $_GET['date_to']); |
|
|
|
$records = Tracking::get_exercise_progress($_GET['session_id'], $_GET['course_id'], $_GET['exercise_id'], $_GET['date_from'], $_GET['date_to']); |
|
|
|
$count = count($records); |
|
|
|
$count = count($records); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'get_session_access_overview': |
|
|
|
case 'get_session_access_overview': |
|
|
@ -281,7 +281,7 @@ switch ($action) { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'get_survey_overview': |
|
|
|
case 'get_survey_overview': |
|
|
|
//@TODO replace this for a more efficient function (not retrieving the whole data) |
|
|
|
//@TODO replace this for a more efficient function (not retrieving the whole data) |
|
|
|
$records = SessionManager::get_survey_overview(intval($_GET['session_id']), intval($_GET['course_id']), intval($_GET['survey_id']), $_GET['date_from'], $_GET['date_to'], $options); |
|
|
|
$records = SessionManager::get_survey_overview($_GET['session_id'], $_GET['course_id'], $_GET['survey_id'], $_GET['date_from'], $_GET['date_to'], $options); |
|
|
|
$count = count($records); |
|
|
|
$count = count($records); |
|
|
|
break; |
|
|
|
break; |
|
|
|
/*case 'get_extra_fields': |
|
|
|
/*case 'get_extra_fields': |
|
|
@ -656,9 +656,9 @@ switch ($action) { |
|
|
|
$sessionId = 0; |
|
|
|
$sessionId = 0; |
|
|
|
if (!empty($_GET['course_id'])) |
|
|
|
if (!empty($_GET['course_id'])) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$sessionId = intval($_GET['session_id']); |
|
|
|
$sessionId = intval($_GET['session_id']); |
|
|
|
$courseId = intval($_GET['course_id']); |
|
|
|
$courseId = intval($_GET['course_id']); |
|
|
|
$course = api_get_course_info_by_id($courseId); |
|
|
|
$course = api_get_course_info_by_id($courseId); |
|
|
|
$date_from = $_GET['date_from']; |
|
|
|
$date_from = $_GET['date_from']; |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
} |
|
|
|
} |
|
|
@ -691,9 +691,9 @@ switch ($action) { |
|
|
|
$sessionId = 0; |
|
|
|
$sessionId = 0; |
|
|
|
if (!empty($_GET['course_id']) && !empty($_GET['survey_id'])) |
|
|
|
if (!empty($_GET['course_id']) && !empty($_GET['survey_id'])) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$sessionId = intval($_GET['session_id']); |
|
|
|
$sessionId = intval($_GET['session_id']); |
|
|
|
$courseId = intval($_GET['course_id']); |
|
|
|
$courseId = intval($_GET['course_id']); |
|
|
|
$surveyId = intval($_GET['survey_id']); |
|
|
|
$surveyId = intval($_GET['survey_id']); |
|
|
|
$date_from = $_GET['date_from']; |
|
|
|
$date_from = $_GET['date_from']; |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
//$course = api_get_course_info_by_id($courseId); |
|
|
|
//$course = api_get_course_info_by_id($courseId); |
|
|
@ -771,8 +771,8 @@ switch ($action) { |
|
|
|
$sessionId = 0; |
|
|
|
$sessionId = 0; |
|
|
|
if (!empty($_GET['course_id'])) |
|
|
|
if (!empty($_GET['course_id'])) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$sessionId = intval($_GET['session_id']); |
|
|
|
$sessionId = intval($_GET['session_id']); |
|
|
|
$courseId = intval($_GET['course_id']); |
|
|
|
$courseId = intval($_GET['course_id']); |
|
|
|
$date_from = $_GET['date_from']; |
|
|
|
$date_from = $_GET['date_from']; |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
} |
|
|
|
} |
|
|
@ -805,7 +805,7 @@ switch ($action) { |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
$date_to = $_GET['date_to']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$result = SessionManager::get_user_data_access_tracking_overview(intval($sessionId), intval($courseId), intval($studentId), intval($profile), $date_from, $date_to, |
|
|
|
$result = SessionManager::get_user_data_access_tracking_overview($sessionId, $courseId, $studentId, $profile, $date_from, $date_to, |
|
|
|
array( |
|
|
|
array( |
|
|
|
'where' => $where_condition, |
|
|
|
'where' => $where_condition, |
|
|
|
'order' => "$sidx $sord", |
|
|
|
'order' => "$sidx $sord", |
|
|
|