|
|
|
@ -3,7 +3,6 @@ |
|
|
|
|
/** |
|
|
|
|
* Responses to AJAX calls |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
$action = $_GET['a']; |
|
|
|
|
switch ($action) { |
|
|
|
|
case 'set_visibility': |
|
|
|
@ -59,21 +58,25 @@ switch ($action) { |
|
|
|
|
|
|
|
|
|
$language_file = array ('course_description'); |
|
|
|
|
require_once '../global.inc.php'; |
|
|
|
|
if (api_is_anonymous()) { |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php' ; |
|
|
|
|
|
|
|
|
|
// Get the name of the database course. |
|
|
|
|
$database_course = CourseManager::get_name_database_course($_GET['code']); |
|
|
|
|
$tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION, $database_course); |
|
|
|
|
$tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION, $database_course); |
|
|
|
|
|
|
|
|
|
$sql = "SELECT * FROM $tbl_course_description WHERE session_id=0 ORDER BY id"; |
|
|
|
|
$result = Database::query($sql); |
|
|
|
|
while ($description = Database::fetch_object($result)) { |
|
|
|
|
$descriptions[$description->id] = $description; |
|
|
|
|
} |
|
|
|
|
// Function that displays the details of the course description in html. |
|
|
|
|
echo CourseManager::get_details_course_description_html($descriptions, api_get_system_encoding(), false); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
if (Database::num_rows($result) > 0 ) { |
|
|
|
|
while ($description = Database::fetch_object($result)) { |
|
|
|
|
$descriptions[$description->id] = $description; |
|
|
|
|
} |
|
|
|
|
// Function that displays the details of the course description in html. |
|
|
|
|
echo CourseManager::get_details_course_description_html($descriptions, api_get_system_encoding(), false); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
/** |
|
|
|
|
* @todo this functions need to belong to a class or a special wrapper to process the AJAX petitions from the jqgrid |
|
|
|
|
*/ |
|
|
|
@ -187,8 +190,7 @@ switch ($action) { |
|
|
|
|
require_once $libpath.'usermanager.lib.php'; |
|
|
|
|
require_once $libpath.'tracking.lib.php'; |
|
|
|
|
require_once $libpath.'sessionmanager.lib.php'; |
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php'; |
|
|
|
|
|
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php'; |
|
|
|
|
|
|
|
|
|
$page = intval($_REQUEST['page']); //page |
|
|
|
|
$limit = intval($_REQUEST['rows']); // quantity of rows |
|
|
|
@ -290,8 +292,7 @@ switch ($action) { |
|
|
|
|
require_once $libpath.'usermanager.lib.php'; |
|
|
|
|
require_once $libpath.'tracking.lib.php'; |
|
|
|
|
require_once $libpath.'sessionmanager.lib.php'; |
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php'; |
|
|
|
|
|
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php'; |
|
|
|
|
|
|
|
|
|
$page = intval($_REQUEST['page']); //page |
|
|
|
|
$limit = intval($_REQUEST['rows']); // quantity of rows |
|
|
|
|