Skip to content

Commit

Permalink
Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Nov 18, 2016
2 parents 8588f15 + e47430e commit 4a4ede4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
7 changes: 6 additions & 1 deletion main/newscorm/openoffice_document.class.php
Expand Up @@ -188,6 +188,7 @@ private function _get_remote_ppt2lp_files($file)
'trace' => 1,
'exception' => 1,
'cache_wsdl' => WSDL_CACHE_NONE,
'keep_alive' => false,
);
$client = new SoapClient(null, $options);
$result = '';
Expand All @@ -203,7 +204,11 @@ private function _get_remote_ppt2lp_files($file)
'service_ppt2lp_size' => $service_ppt2lp_size,
);

$result = $client->__call('wsConvertPpt', array('pptData' => $params));
try {
$result = $client->__call('wsConvertPpt', array('pptData' => $params));
} catch (Exception $e) {
error_log($e->getMessage());
}

return $result;
}
Expand Down
2 changes: 1 addition & 1 deletion main/webservices/additional_webservices.php
Expand Up @@ -54,7 +54,7 @@ function wsConvertPpt($pptData)
$cmd .= ' -w 720 -h 540 -d oogie "' . $tempPath . $fullFileName.'" "' . $tempPathNewFiles . $fileName . '.html"';

$perms = api_get_permissions_for_new_files();
chmod($tempPathNewFiles . $fileName, $perms, true);
chmod($tempPathNewFiles . $fileName, $perms);

$files = array();
$return = 0;
Expand Down
2 changes: 1 addition & 1 deletion main/webservices/registration.soap.php
Expand Up @@ -6239,7 +6239,7 @@ function WSUserSubscribedInCourse($params)
* Web service to get a session list filtered by name, description or short description extra field
* @param array $params Contains the following parameters
* string $params['term'] Search term
* string $params['extra_fields'] Extrafields to include in request result
* string $params['extrafields'] Extrafields to include in request result
* string $params['secret_key'] Secret key to check
* @return array The list
*/
Expand Down
10 changes: 7 additions & 3 deletions main/webservices/soap.test.php
Expand Up @@ -25,7 +25,7 @@
$lpiid = 1; // set to your learnpath item ID

// Build the server's SOAP script address
$server = api_get_path(WEB_CODE_PATH).'webservices/soap.php?wsdl';
$server = api_get_path(WEB_CODE_PATH).'webservices/registration.soap.php?wsdl';

/**
* Call the webservice
Expand All @@ -35,10 +35,14 @@
$client = new SoapClient($server, array('cache_wsdl' => WSDL_CACHE_NONE));

// Call the function we want with the right params...
$response = $client->{'WSReport.test'}();
try {
$response = $client->{'WSSearchSession'}(array('term' => 'a', 'extrafields' => array(), 'secret_key' => $signature));
} catch (Exception $e) {
error_log(print_r($e->getMessage(), 1));
}
//$response = $client->{'WSReport.GetLearnpathStatusSingleItem'}($signature, 'chamilo_user_id', $uid, 'chamilo_course_id', $cid, $lpid, $lpiid);
//$response = $client->{'WSReport.GetLearnpathProgress'}($signature, 'chamilo_user_id', $uid, 'chamilo_course_id', $cid, $lpid);
//$response = $client->{'WSReport.GetLearnpathHighestLessonLocation'}($signature, 'chamilo_user_id', $uid, 'chamilo_course_id', $cid, $lpid);
// Print the output, or do whatever you like with it (it's the status for this item):
echo '<pre>'.$response.'</pre>';
echo '<pre>'.print_r($response, 1).'</pre>';
// This should print "complete", "incomplete" or any other active status.

0 comments on commit 4a4ede4

Please sign in to comment.