From aad23ad0952fb308093a1e588b2b7610785aa741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Perales?= Date: Fri, 10 Jan 2014 12:08:28 -0500 Subject: [PATCH] using filter without refreshing the page --- main/mySpace/index.php | 89 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 80 insertions(+), 9 deletions(-) diff --git a/main/mySpace/index.php b/main/mySpace/index.php index 97bbb7c468..9e4f7237f3 100644 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -607,8 +607,11 @@ if ($is_platform_admin && in_array($view, array('admin')) && $display != 'yourst echo '

'; if ($is_platform_admin && $view == 'admin' && in_array($display, array('accessoverview','lpprogressoverview', 'progressoverview', 'exerciseprogress', 'surveyoverview'))) { + //selft script $self = api_get_self(); + //ajax path $ajax_path = api_get_path(WEB_AJAX_PATH); + //script initiatizion $script = ''; //Session Filter @@ -715,14 +718,14 @@ if ($is_platform_admin && in_array($view, array('admin')) && $display != 'yourst $studentList[] = array('id' => $studentInfo['user_id'], 'text' => $studentInfo['username'] . ' (' . $studentInfo['firstname'] . ' ' . $studentInfo['lastname'] . ')'); } - $sessionFilter->addElement('select_ajax', 'student_name', get_lang('SearchStudent'), null, array('url' => $url, 'defaults' => $studentList, 'width' => '400px'), array('class' => 'pull-left')); + $sessionFilter->addElement('select_ajax', 'student_name', get_lang('SearchStudent'), null, array('url' => $url, 'defaults' => $studentList, 'width' => '400px', 'class' => 'pull-right')); $options = array( '' => get_lang('Select'), STUDENT => get_lang('Student'), COURSEMANAGER => get_lang('CourseManager'), DRH => get_lang('Drh'), ); - $sessionFilter->addElement('select', 'profile', get_lang('Profile'),$options, array('id' => 'profile')); + $sessionFilter->addElement('select', 'profile', get_lang('Profile'),$options, array('id' => 'profile', 'class' => 'pull-left')); $script = ' $("#student_name").on("change", function() { @@ -781,21 +784,59 @@ if ($is_platform_admin && in_array($view, array('admin')) && $display != 'yourst $sessionFilter->addElement('text', 'from', get_lang('From'), array('id' => 'date_from', 'value' => (!empty($_GET['date_from']) ? $_GET['date_from'] : ''), 'style' => 'width:75px' )); $sessionFilter->addElement('text', 'to', get_lang('Until'), array('id' => 'date_to', 'value' => (!empty($_GET['date_to']) ? $_GET['date_to'] : ''), 'style' => 'width:75px' )); } - //$sessionFilter->addElement('submit', '', get_lang('Generate'), 'id="generateReport"'); + $sessionFilter->addElement('submit', '', get_lang('Generate'), 'id="generateReport"'); echo '
'; echo $sessionFilter->return_form(); echo '
'; + $a = 'search_course'; + if (!empty($_GET['session_id'])) { + $a = 'search_course_by_session'; + } + $url = $ajax_path . 'course.ajax.php?a='. $a .'&session_id=' . $_GET['session_id']; echo ''; - - + } if ($display === 'useroverview') {