/**
 * Saves the data of a new response recorded using the plugin
 * @param int $exerciseId
 * 		An exercise identificator
 * @param int $exerciseDuration
 * 		The duration of the exercise in seconds
 * @param int $subtitleId
 * 		The identificator of the subtitles that were used on the recording process
 * @param string $recordedRole
 * 		The character name that was impersonated in the recording process 
 * @param String $responseName
 * 		The hash name of the recording file
 * @return mixed $responseData
 * 		Array with information about the newly saved response, or false on error
 */
function babelium_save_response_data($exerciseId, $exerciseDuration, $subtitleId, $recordedRole, $responseName)
{
    $g = new babelium_gateway();
    $parameters = array("exerciseId" => $exerciseId, "duration" => $exerciseDuration, "subtitleId" => $subtitleId, "characterName" => $recordedRole, "fileIdentifier" => $responseName);
    return $responsedata = $g->newServiceCall('admSaveResponse', $parameters);
}
Esempio n. 2
0
<?php

require_once "babelium_gateway.php";
require_once "UserLanguageVO.php";
$CFG = new Config();
$g = new babelium_gateway();
$user = $_POST['userName'];
$email = $_POST['email'];
$password = $_POST['password'];
$realName = $_POST['realName'];
$realLastName = $_POST['realLastName'];
$languagesAux = json_decode($_POST['languages']);
$languages = array();
$params = array();
$params['username'] = $user;
$params['email'] = $email;
$params['password'] = $password;
$params['firstname'] = $realName;
$params['lastname'] = $realLastName;
$params['languages'] = array();
foreach ($languagesAux as $language) {
    $lang = new UserLanguageVO();
    $lang->id = 0;
    $lang->language = $language->language;
    $lang->level = $language->level;
    $lang->purpose = $language->purpose;
    array_push($params['languages'], $lang);
}
$g->serviceCall('http', 'register', $params);
Esempio n. 3
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$id = $_POST['id'];
$params = array();
$params['exerciseId'] = $id;
$g->serviceCall('http', 'getExerciseRoles', $params);
//$g->serviceCall('http','getRecordableExercises');
Esempio n. 4
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$name = $_POST['name'];
$params = array();
$params['responseName'] = $name;
$g->serviceCall('http', 'admGetResponseByName', $params);
Esempio n. 5
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$id = $_POST['id'];
$lang = $_POST['lang'];
$params = array();
$params['exerciseId'] = $id;
$params['language'] = $lang;
$g->serviceCall('http', 'getSubtitleLines', $params);
//$g->serviceCall('http','getRecordableExercises');
Esempio n. 6
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$session = $g->serviceCall('http', 'endSession');
print_r($session);
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$response = $g->serviceCall('http', 'getResponseVideos');
print_r($response);
Esempio n. 8
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$user = $_POST['user'];
$pass = $_POST['pass'];
$params = array();
$params['username'] = $user;
$params['password'] = sha1($pass);
$login = $g->serviceCall('http', 'processLogin', $params);
print_r($login);
Esempio n. 9
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$name = $_POST['name'];
$params = array();
$params['name'] = $name;
$g->serviceCall('http', 'getExerciseByName', $params);
//$g->serviceCall('http','getRecordableExercises');
Esempio n. 10
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$session = $g->serviceCall('http', 'getSessionData');
print_r($session);
Esempio n. 11
0
<?php

require_once "babelium_gateway.php";
$CFG = new Config();
$g = new babelium_gateway();
$response = $g->serviceCall('http', 'getRecordableExercises');
print_r($response);