Minor - format code

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent 202be410fe
commit bf1236259c
  1. 4
      main/lp/download.php
  2. 6
      main/lp/learnpathItem.class.php

@ -24,14 +24,14 @@ $doc_url = str_replace(' ', '+', $doc_url);
$doc_url = str_replace(array('../', '\\..', '\\0', '..\\'), array('', '', '', ''), $doc_url); //echo $doc_url;
if (strpos($doc_url,'../') OR strpos($doc_url,'/..')) {
if (strpos($doc_url,'../') || strpos($doc_url,'/..')) {
$doc_url = '';
}
$sys_course_path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/scorm';
$user_id = api_get_user_id();
if ($_SESSION['oLP']) {
$lp_id = $_SESSION['oLP']->get_id();
$lp_id = $_SESSION['oLP']->get_id();
$lp_item_id = $_SESSION['oLP']->current;
$lp_item_info = new learnpathItem($lp_item_id);
if (!empty($lp_item_info)) {

@ -1037,7 +1037,7 @@ class learnpathItem
$type = $this->get_type();
switch ($type) {
case TOOL_DOCUMENT :
case TOOL_DOCUMENT:
case TOOL_QUIZ:
case 'sco':
// Get the document and, if HTML, open it.
@ -3380,9 +3380,7 @@ class learnpathItem
global $charset;
$course_id = api_get_course_int_id();
$lp_item = Database::get_course_table(TABLE_LP_ITEM);
require_once api_get_path(
LIBRARY_PATH
) . 'search/ChamiloIndexer.class.php';
require_once api_get_path(LIBRARY_PATH) . 'search/ChamiloIndexer.class.php';
$a_terms = preg_split('/,/', $terms);
$i_terms = preg_split('/,/', $this->get_terms());
foreach ($i_terms as $term) {

Loading…
Cancel
Save