Fix progress see BT#12999

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent e71e60ab89
commit 4eefae2a98
  1. 7
      main/auth/my_progress.php
  2. 8
      main/exercise/exercise.class.php

@ -29,13 +29,14 @@ $(function() {
$user_id = api_get_user_id();
$course_user_list = CourseManager::get_courses_list_by_user_id($user_id);
$dates = $issues = '';
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
$courseCode = isset($_GET['course']) ? Security::remove_XSS($_GET['course']) : null;
if (!empty($course_user_list)) {
$items = MySpace::get_connections_from_course_list($user_id, $course_user_list);
$items = MySpace::get_connections_from_course_list(
$user_id,
$course_user_list
);
$first = null;
$last = null;
$last_item = count($items);

@ -78,10 +78,10 @@ class Exercise
/**
* Constructor of the class
*
* @param int $courseId
* @author Olivier Brouckaert
*/
public function __construct($course_id = null)
public function __construct($courseId = 0)
{
$this->id = 0;
$this->exercise = '';
@ -110,8 +110,8 @@ class Exercise
$this->scoreTypeModel = 0;
$this->globalCategoryId = null;
if (!empty($course_id)) {
$course_info = api_get_course_info_by_id($course_id);
if (!empty($courseId)) {
$course_info = api_get_course_info_by_id($courseId);
} else {
$course_info = api_get_course_info();
}

Loading…
Cancel
Save