Skip to content

Commit

Permalink
Fix function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Jan 21, 2016
1 parent 62330ab commit 240fb5e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions main/webservices/lp.php
Expand Up @@ -140,13 +140,12 @@ function WSImportLP($params)

$lpName = $params['lp_name'];

$courseCode = CourseManager::get_course_id_from_original_id(
$courseId = CourseManager::get_course_id_from_original_id(
$courseIdValue,
$courseIdName
);

$courseInfo = api_get_course_info($courseCode);
$courseId = $courseInfo['real_id'];
$courseInfo = api_get_course_info_by_id($courseId);

if (empty($courseInfo)) {
if ($debug) error_log('Course not found');
Expand All @@ -171,7 +170,7 @@ function WSImportLP($params)
$maker = 'Scorm';
$maxScore = ''; //$_REQUEST['use_max_score']

$oScorm = new scorm($courseCode);
$oScorm = new scorm($courseInfo['code']);
$fileData = base64_decode($params['file_data']);

$uniqueFile = uniqid();
Expand Down Expand Up @@ -294,13 +293,12 @@ function WSGetLpList($params)
$sessionIdName = isset($params['session_id_name']) ? $params['session_id_name'] : null;
$sessionIdValue = isset($params['session_id_value']) ? $params['session_id_value'] : null;

$courseCode = CourseManager::get_course_id_from_original_id(
$courseId = CourseManager::get_course_id_from_original_id(
$courseIdValue,
$courseIdName
);

$courseInfo = api_get_course_info($courseCode);
//$courseId = $courseInfo['real_id'];
$courseInfo = api_get_course_info_by_id($courseId);

if (empty($courseInfo)) {
if ($debug) error_log("Course not found: $courseIdName : $courseIdValue");
Expand Down Expand Up @@ -398,7 +396,6 @@ function WSDeleteLp($params)

$courseInfo = api_get_course_info_by_id($courseId);


if (empty($courseInfo)) {
if ($debug) error_log("Course not found: $courseIdName : $courseIdValue");
return 'Course not found';
Expand Down

0 comments on commit 240fb5e

Please sign in to comment.