Avoiding warning message

skala
Julio Montoya 14 years ago
parent 2fd489360f
commit 9d1385d7c2
  1. 27
      main/inc/ajax/course_home.ajax.php
  2. 9
      main/inc/ajax/exercise.ajax.php
  3. 4
      main/inc/ajax/install.ajax.php
  4. 5
      main/inc/ajax/message.ajax.php
  5. 7
      main/inc/ajax/model.ajax.php
  6. 3
      main/inc/ajax/social.ajax.php
  7. 5
      main/inc/ajax/user_manager.ajax.php

@ -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

@ -4,6 +4,10 @@
* Responses to AJAX calls
*/
require_once '../global.inc.php';
if (api_is_anonymous()) {
exit;
}
$action = $_REQUEST['a'];
switch ($action) {
@ -12,7 +16,7 @@ switch ($action) {
$TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
$counter = 1;
foreach ($new_question_list as $new_order_id) {
Database::update($TBL_QUESTIONS, array('question_order'=>$counter), array('question_id = ? '=>$new_order_id));
Database::update($TBL_QUESTIONS, array('question_order'=>$counter), array('question_id = ? '=>intval($new_order_id)));
$counter++;
}
Display::display_confirmation_message(get_lang('Saved'));
@ -21,5 +25,4 @@ switch ($action) {
echo '';
}
exit;
?>
exit;

@ -65,6 +65,4 @@ switch ($action) {
default:
echo '';
}
exit;
?>
exit;

@ -53,11 +53,8 @@ switch ($action) {
}
echo json_encode($return);
break;
default:
echo '';
}
exit;
?>
exit;

@ -2,14 +2,15 @@
/* For licensing terms, see /license.txt */
//@todo this could be integrated in the inc/lib/model.lib.php + try to clean this file, is not very well tested yet!
$action = $_GET['a'];
require_once '../global.inc.php';
if (api_is_anonymous()) {
exit;
}
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'array.lib.php';
// 1. Setting variables needed by jqgrid
$action= $_GET['a'];
$page = intval($_REQUEST['page']); //page
$limit = intval($_REQUEST['rows']); //quantity of rows
$sidx = $_REQUEST['sidx']; //index to filter

@ -231,5 +231,4 @@ switch ($action) {
default:
echo '';
}
exit;
?>
exit;

@ -67,10 +67,7 @@ switch ($action) {
echo '';
}
break;
default:
echo '';
}
exit;
?>
exit;
Loading…
Cancel
Save