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(); $user_id = api_get_user_id();
$course_user_list = CourseManager::get_courses_list_by_user_id($user_id); $course_user_list = CourseManager::get_courses_list_by_user_id($user_id);
$dates = $issues = ''; $dates = $issues = '';
$sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0; $sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
$courseCode = isset($_GET['course']) ? Security::remove_XSS($_GET['course']) : null; $courseCode = isset($_GET['course']) ? Security::remove_XSS($_GET['course']) : null;
if (!empty($course_user_list)) { 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; $first = null;
$last = null; $last = null;
$last_item = count($items); $last_item = count($items);

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

Loading…
Cancel
Save