Adding course id when showing items see BT#6815

1.9.x
Julio Montoya 11 years ago
parent ecb7693e48
commit 90f6055346
  1. 4
      main/newscorm/lp_view.php
  2. 2
      main/newscorm/resourcelinker.inc.php

@ -149,11 +149,11 @@ if (!isset($src)) {
if ($prereq_check === true) {
$src = $_SESSION['oLP']->get_link('http', $lp_item_id, $get_toc_list);
//Prevents FF 3.6 + Adobe Reader 9 bug see BT#794 when calling a pdf file in a LP.
// Prevents FF 3.6 + Adobe Reader 9 bug see BT#794 when calling a pdf file in a LP.
$file_info = parse_url($src);
$file_info = pathinfo($file_info['path']);
if (api_strtolower(substr($file_info['extension'], 0, 3) == 'pdf')) {
$src = api_get_path(WEB_CODE_PATH).'newscorm/lp_view_item.php?lp_item_id='.$lp_item_id;
$src = api_get_path(WEB_CODE_PATH).'newscorm/lp_view_item.php?lp_item_id='.$lp_item_id.'&'.api_get_cidreq();
}
$_SESSION['oLP']->start_current_item(); // starts time counter manually if asset
} else {

@ -1707,7 +1707,7 @@ function rl_get_resource_link_for_learnpath($course_id, $learnpath_id, $id_in_pa
$result = Database::query($sql);
$myrow = Database::fetch_array($result);
$docurl = str_replace('%2F', '/', urlencode($myrow['path']));
$link .= $main_course_path.'document'.$docurl.'?'.api_get_cidreq();
$link .= $main_course_path.'document'.$docurl.'?cidReq'.$course_code.'&id_session='.$session_id;
$openmethod = 2;
$officedoc = false;
Session::write('openmethod',$openmethod);

Loading…
Cancel
Save