Fixing session course order see BT#8316

1.9.x
Julio Montoya 10 years ago
parent 22767cd915
commit 499e472548
  1. 4
      main/admin/resume_session.php
  2. 9
      main/inc/lib/sessionmanager.lib.php
  3. 3
      main/lang/english/trad4all.inc.php
  4. 4
      main/lang/spanish/gradebook.inc.php
  5. 33
      main/webservices/client_soap.php
  6. 11
      main/webservices/registration.soap.php
  7. 3
      plugin/bbb/lib/bbb_api.php

@ -325,7 +325,7 @@ if ($session['nbr_courses'] == 0) {
if (SessionManager::orderCourseIsEnabled()) {
$upIcon = 'up.png';
$urlUp = api_get_self().'?id_session='.$id_session.'&course_code='.$course['code'].'&action=move_up&list='.$list;
$urlUp = api_get_self().'?id_session='.$id_session.'&course_code='.$course['code'].'&action=move_up';
if ($count == 0) {
$upIcon = 'up_na.png';
@ -338,7 +338,7 @@ if ($session['nbr_courses'] == 0) {
);
$downIcon = 'down.png';
$downUrl = api_get_self().'?id_session='.$id_session.'&course_code='.$course['code'].'&action=move_down&list='.$list;
$downUrl = api_get_self().'?id_session='.$id_session.'&course_code='.$course['code'].'&action=move_down';
if ($count +1 == count($courses)) {
$downIcon = 'down_na.png';

@ -4569,7 +4569,7 @@ class SessionManager
* @param string $courseCode
* @return bool
*/
public function move($direction, $sessionId, $courseCode)
public static function move($direction, $sessionId, $courseCode)
{
if (!self::orderCourseIsEnabled()) {
return false;
@ -4596,6 +4596,9 @@ class SessionManager
$count++;
}
// Loading new positions.
$courseList = self::get_course_list_by_session_id($sessionId, null, 'position');
$found = false;
switch ($direction) {
@ -4636,7 +4639,7 @@ class SessionManager
* @param string $courseCode
* @return bool
*/
public function moveUp($sessionId, $courseCode)
public static function moveUp($sessionId, $courseCode)
{
return self::move('up', $sessionId, $courseCode);
}
@ -4646,7 +4649,7 @@ class SessionManager
* @param string $courseCode
* @return bool
*/
public function moveDown($sessionId, $courseCode)
public static function moveDown($sessionId, $courseCode)
{
return self::move('down', $sessionId, $courseCode);
}

@ -1597,4 +1597,5 @@ $DataTableSearch = "Search";
$HideColumn = "Hide column";
$DisplayColumn = "Show column";
$LegalAgreementAccepted = "Legal agreement accepted";
?>
$SessionDurationXDaysLeft = "%s days left";
?>

@ -86,7 +86,7 @@ $ResultAdded = "Resultado añadido";
$EvaluationStatistics = "Estadísticas de evaluación";
$ExportResult = "Exportar resultados";
$EditResult = "Editar resultados";
$GradebookWelcomeMessage = "Bienvenido a la herramienta Evaluaciones. Esta herramienta le permite evaluar las competencias de su organización. Generar informes de competencias mediante la fusión de la puntuación de las distintas actividades, como las realizadas en el aula y las actividades en línea. Este es el entorno típico de los sistemas de aprendizaje mixto.";
$GradebookWelcomeMessage = "Bienvenido a la herramienta Cuaderno de calificaciones. Esta herramienta le permite evaluar las competencias de su organización. Generar informes de competencias mediante la fusión de la puntuación de las distintas actividades, como las realizadas en el aula y las actividades en línea. Este es el entorno típico de los sistemas de aprendizaje mixto.";
$CreateAllCat = "Generar calificaciones para todos mis cursos";
$AddAllCat = "Se han añadido todas las calificaciones";
$StatsStudent = "Estadísticas de";
@ -239,4 +239,4 @@ $GradebookLockedAlert = "Esta evaluación ha sido bloqueada y no puede ser desbl
$NoStudentCertificatesAvailableYet = "Aún no están disponibles los certificados de los estudiantes. Tenga en cuenta que para generar su certificado un estudiante tiene que ir a la herramienta evaluaciones y pulsar sobre el icono certificado, el cual sólo aparecerá cuando ha él haya conseguido los objetivos del curso.";
$CertificateExistsButNotPublic = "El certificado solicitado existe pero no es público, por lo que para poderlo ver tendrá que identificarse.";
$ConfirmToUnlockElement = "Confirme el desbloqueo del elemento";
?>
?>

@ -12,7 +12,7 @@
*
*/
exit; //Uncomment this in order to execute the page
//exit; //Uncomment this in order to execute the page
require_once '../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
@ -20,10 +20,14 @@ require_once $libpath.'nusoap/nusoap.php';
// Create the client instance
$url = api_get_path(WEB_CODE_PATH)."webservices/registration.soap.php?wsdl";
$security_key = $_configuration['security_key']; // see the main/inc/configuration.php file to get this value
global $_configuration;
// see the main/inc/configuration.php file to get this value
$security_key = $_configuration['security_key'];
$client = new nusoap_client($url, true);
/*$client->xml_encoding = 'UTF-8';
$client->http_encoding = 'UTF-8';
$client->charencoding = 'UTF-8';*/
$soap_error = $client->getError();
@ -33,8 +37,9 @@ if (!empty($soap_error)) {
}
$client->debug_flag = true;
$ip_address = $_SERVER['SERVER_ADDR']; // This should be the IP address of the client
// This should be the IP address of the client
$ip_address = $_SERVER['SERVER_ADDR'];
$ip_address = "192.168.1.54";
//Secret key
$secret_key = sha1($ip_address.$security_key);// Hash of the combination of IP Address + Chamilo security key
@ -59,8 +64,11 @@ $params = array(
'official_code' => 'official',
'phone' => '00000000',
'expiration_date' => '0000-00-00',
'original_user_id_name' => $user_field, // the extra user field that will be automatically created in the user profile see: main/admin/user_fields.php
'original_user_id_value' => $random_user_id, // third party user id
/* the extra user field that will be automatically created
in the user profile see: main/admin/user_fields.php */
'original_user_id_name' => $user_field,
// third party user id
'original_user_id_value' => $random_user_id,
'secret_key' => $secret_key,
//Extra fields
'extra' => array(
@ -70,7 +78,10 @@ $params = array(
);
//1. Create user webservice
$user_id = $client->call('WSCreateUserPasswordCrypted', array('createUserPasswordCrypted' => $params));
$user_id = $client->call(
'WSCreateUserPasswordCrypted',
array('createUserPasswordCrypted' => $params)
);
if (!empty($user_id) && is_numeric($user_id)) {
@ -150,9 +161,9 @@ if (!empty($user_id) && is_numeric($user_id)) {
$params = array(
'courses' => array(
array(
'title' => 'TEST 123', //Chamilo string course code
'title' => 'PRUEBA', //Chamilo string course code
'category_code' => 'LANG',
'wanted_code' => 'TEST123',
'wanted_code' => '',
'course_language' => 'english',
'original_course_id_name' => 'course_id_test',
'original_course_id_value' => '666',
@ -254,4 +265,4 @@ if ($client->fault) {
echo '<h2>There are no errors</h2>';
var_dump($result);
}
}
}

@ -17,7 +17,7 @@ define('WS_ERROR_SECRET_KEY', 1);
function return_error($code) {
$fault = null;
switch($code) {
switch ($code) {
case WS_ERROR_SECRET_KEY:
$fault = new soap_fault('Server', '', 'Secret key is not correct or params are not correctly set');
break;
@ -25,7 +25,8 @@ function return_error($code) {
return $fault;
}
function WSHelperVerifyKey($params) {
function WSHelperVerifyKey($params)
{
global $_configuration, $debug;
if (is_array($params)) {
$secret_key = $params['secret_key'];
@ -65,9 +66,11 @@ function WSHelperVerifyKey($params) {
$security_key = $_configuration['security_key'];
} else {
$security_key = $ip.$_configuration['security_key'];
error_log($security_key);
}
$result = api_is_valid_secret_key($secret_key, $security_key);
//error_log($secret_key.'-'.$security_key);
if ($debug)
error_log('WSHelperVerifyKey result: '.intval($result));
return $result;
@ -76,7 +79,7 @@ function WSHelperVerifyKey($params) {
// Create the server instance
$server = new soap_server();
$server->soap_defencoding = 'UTF-8';
//$server->soap_defencoding = 'UTF-8';
// Initialize WSDL support
$server->configureWSDL('WSRegistration', 'urn:WSRegistration');
@ -5378,6 +5381,6 @@ if (isset($_configuration['registration.soap.php.decode_utf8'])) {
$server->decode_utf8 = false;
}
}
$server->service($HTTP_RAW_POST_DATA);

@ -247,7 +247,7 @@ class BigBlueButtonBN {
);
*/
$xml = $this->_processXmlResponse($this->getEndMeetingURL($endParams));
if($xml) {
if ($xml) {
return array(
'returncode' => $xml->returncode,
'message' => $xml->message,
@ -283,6 +283,7 @@ class BigBlueButtonBN {
$meetingId = '1234' -- REQUIRED - The unique id for the meeting
*/
$xml = $this->_processXmlResponse($this->getIsMeetingRunningUrl($meetingId));
error_log(print_r($xml, 1));
if($xml) {
return array(
'returncode' => $xml->returncode,

Loading…
Cancel
Save