Skip to content

Commit

Permalink
Fixes class name LearnpathList
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 13, 2015
1 parent 57eeea7 commit 1ede08e
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 88 deletions.
1 change: 0 additions & 1 deletion main/admin/user_move_stats.php
Expand Up @@ -12,7 +12,6 @@
$this_section=SECTION_PLATFORM_ADMIN;

api_protect_admin_script();
require_once '../newscorm/learnpathList.class.php';

$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$debug = 0;
Expand Down
2 changes: 1 addition & 1 deletion main/exercice/exercise.lib.php
Expand Up @@ -1404,7 +1404,7 @@ function get_exam_results_data(
}
}

$lp_list_obj = new learnpathList(api_get_user_id());
$lp_list_obj = new LearnpathList(api_get_user_id());
$lp_list = $lp_list_obj->get_flat_list();

if (is_array($results)) {
Expand Down
1 change: 0 additions & 1 deletion main/exercice/exercise_submit_modal.php
Expand Up @@ -487,7 +487,6 @@
// the link to theory (a learning path)
if (!empty($lp)) {
$lp_url= api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp;
require_once('../newscorm/learnpathList.class.php');
$list = new LearnpathList(api_get_user_id());
$flat_list = $list->get_flat_list();
$links.= Display :: return_icon('theory.gif', '', array ('style' => 'padding-left:0px;padding-right:5px;')).'<a target="_blank" href="'.$lp_url.'">'.get_lang('SeeTheory').'</a><br />';
Expand Down
3 changes: 1 addition & 2 deletions main/exercice/hotspot_admin.inc.php
Expand Up @@ -566,7 +566,7 @@

</tr>
<?php
require_once '../newscorm/learnpathList.class.php';

$list = new LearnpathList(api_get_user_id());
$flat_list = $list->get_flat_list(); //loading list of LPs

Expand Down Expand Up @@ -874,7 +874,6 @@
</tr>
<?php
}
require_once '../newscorm/learnpathList.class.php';
$list = new LearnpathList(api_get_user_id());
$flat_list = $list->get_flat_list();
$select_lp_id = array();
Expand Down
2 changes: 0 additions & 2 deletions main/exercice/unique_answer.class.php
Expand Up @@ -106,8 +106,6 @@ public function createAnswersForm($form)
$question_list = $obj_ex->selectQuestionList();
$select_question = array();
$select_question[0] = get_lang('SelectTargetQuestion');

require_once '../newscorm/learnpathList.class.php';
if (is_array($question_list)) {
foreach ($question_list as $key => $questionid) {
//To avoid warning messages
Expand Down
3 changes: 0 additions & 3 deletions main/inc/ajax/course_home.ajax.php
Expand Up @@ -106,7 +106,6 @@
*/

require_once '../global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
$now = time();
$page = intval($_REQUEST['page']); //page
$limit = intval($_REQUEST['rows']); // quantity of rows
Expand Down Expand Up @@ -231,7 +230,6 @@
break;
case 'session_courses_lp_by_week':
require_once '../global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
$now = time();

$page = intval($_REQUEST['page']); //page
Expand Down Expand Up @@ -357,7 +355,6 @@
break;
case 'session_courses_lp_by_course':
require_once '../global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
$now = time();
$page = intval($_REQUEST['page']); //page
$limit = intval($_REQUEST['rows']); // quantity of rows
Expand Down
1 change: 0 additions & 1 deletion main/inc/ajax/model.ajax.php
Expand Up @@ -852,7 +852,6 @@ function getWhereClause($col, $oper, $val)
'firstname',
'lastname',
);
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
$lessons = LearnpathList::get_course_lessons($course['code'], $sessionId);
foreach ($lessons as $lesson_id => $lesson) {
$columns[] = $lesson_id;
Expand Down
1 change: 0 additions & 1 deletion main/inc/lib/myspace.lib.php
Expand Up @@ -514,7 +514,6 @@ public static function display_tracking_lp_progress_overview($sessionId = '', $c
get_lang('LastName'),
);
//add lessons of course
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
$lessons = LearnpathList::get_course_lessons($course['code'], $sessionId);

//create columns array
Expand Down
4 changes: 1 addition & 3 deletions main/inc/lib/sessionmanager.lib.php
Expand Up @@ -626,7 +626,6 @@ public static function get_session_lp_progress($sessionId = 0, $courseId = 0, $d
}

//Get lessons
require_once api_get_path(SYS_CODE_PATH) . 'newscorm/learnpathList.class.php';
$lessons = LearnpathList::get_course_lessons($course['code'], $sessionId);

$table = array();
Expand Down Expand Up @@ -3443,7 +3442,6 @@ public static function copy_session($id, $copy_courses = true, $copy_users = tru
if ($course_info) {
//By default new elements are invisible
if ($set_exercises_lp_invisible) {
require_once api_get_path(SYS_CODE_PATH) . 'newscorm/learnpathList.class.php';
$list = new LearnpathList('', $course_info['code'], $sid);
$flat_list = $list->get_flat_list();
if (!empty($flat_list)) {
Expand Down Expand Up @@ -5379,7 +5377,7 @@ public static function getAllCourseCoaches()
}

/**
* Calculate the total user time in the platform
* Calculate the total user time in the platform
* @param int $userId The user id
* @param string $from Optional. From date
* @param string $until Optional. Until date
Expand Down
4 changes: 2 additions & 2 deletions main/newscorm/learnpathList.class.php
Expand Up @@ -2,15 +2,15 @@
/* For licensing terms, see /license.txt */

/**
* Class learnpathList
* Class LearnpathList
* This class is only a learning path list container with several practical methods for sorting the list and
* provide links to specific paths
* @uses Database.lib.php to use the database
* @uses learnpath.class.php to generate learnpath objects to get in the list
* @author Yannick Warnier <ywarnier@beeznest.org>
*
*/
class learnpathList
class LearnpathList
{
// Holds a flat list of learnpaths data from the database.
public $list = array();
Expand Down
2 changes: 1 addition & 1 deletion main/tracking/course_session_report.php
Expand Up @@ -94,7 +94,7 @@
$attempt_result = array();

//Getting LP list
$list = new learnpathList('', $current_course['code'], $session_id);
$list = new LearnpathList('', $current_course['code'], $session_id);
$lp_list = $list->get_flat_list();

// Looping LPs
Expand Down

0 comments on commit 1ede08e

Please sign in to comment.