Minor - preventing PHP warning/notices

skala
Julio Montoya 13 years ago
parent 4523d7c6e5
commit b3202bbfab
  1. 17
      main/course_home/course_home.php
  2. 3
      main/dropbox/dropbox_init.inc.php
  3. 6
      main/inc/lib/thematic.lib.php

@ -36,8 +36,8 @@ use \ChamiloSession as Session;
$language_file = array('course_home','courses');
$use_anonymous = true;
// Inlcuding the global initialization file.
require dirname(__FILE__).'/../inc/global.inc.php';
// Including the global initialization file.
require_once dirname(__FILE__).'/../inc/global.inc.php';
// Delete LP sessions - commented out after seeing that normal
// users in their first learnpath step (1st SCO of a SCORM)
@ -129,7 +129,7 @@ define('TOOL_STUDENT_VIEW', 'toolstudentview');
define('TOOL_ADMIN_VISIBLE', 'tooladminvisible');
$user_id = api_get_user_id();
$course_code = api_get_course_id();
//$course_code = api_get_course_id();
$show_message = '';
//Deleting group session
@ -254,9 +254,10 @@ if (api_get_setting('homepage_view') == 'activity' || api_get_setting('homepage_
require 'vertical_activity.php';
}
$content = '<div id="course_tools">'.$content.'</div>';
$tpl = new Template(null);
$tpl->assign('message', $show_message);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
//$tpl = new Template(null);
//$tpl->assign('message', $show_message);
//$tpl->assign('content', $content);
//$tpl->display_one_col_template();
Session::erase('_gid');
return array('content' => $content, 'message' => $show_message);

@ -51,7 +51,6 @@ require_once 'dropbox_functions.inc.php';
// protecting the script
api_protect_course_script();
/* Libraries */
// including the library for the dropbox
@ -223,7 +222,7 @@ if (($_POST['action'] == 'download_received' || $_POST['action'] == 'download_se
* Prevents access of all users that are not course members
*/
if ((!$is_allowed_in_course || !$is_course_member) && !api_is_allowed_to_edit(null, true)) {
if ((!$is_course_member) && !api_is_allowed_to_edit(null, true)) {
if ($origin != 'learnpath') {
api_not_allowed(true);//print headers/footers
} else {

@ -1033,8 +1033,11 @@ class Thematic
* @return int Last done thematic advance id
*/
public function get_last_done_thematic_advance() {
$courseCode = api_get_course_id();
if (!empty($courseCode)) {
$thematic_data = $this->get_thematic_list();
$thematic_advance_data = $this->get_thematic_advance_list(null, api_get_course_id(), true);
$thematic_advance_data = $this->get_thematic_advance_list(null, $courseCode, true);
$a_thematic_advance_ids = array();
$last_done_advance_id = 0;
@ -1056,6 +1059,7 @@ class Thematic
}
return $last_done_advance_id;
}
}
/**
* Get next thematic advance not done from thematic details interface

Loading…
Cancel
Save