ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
save_question_post_data.php
Go to the documentation of this file.
1
<?php
2
19
chdir(
"../../.."
);
20
ilInitialisation::initILIAS
();
21
include_once
"./components/ILIAS/soap/include/inc.soap_functions.php"
;
22
$results
= [];
23
foreach
(
$_POST
as $key => $value) {
24
if
(preg_match(
"/value_(\d+)_1/"
, $key, $matches)) {
25
array_push(
$results
,
$_POST
[
"value_"
. $matches[1] .
"_1"
]);
26
array_push(
$results
,
$_POST
[
"value_"
. $matches[1] .
"_2"
]);
27
array_push(
$results
,
$_POST
[
"points_"
. $matches[1]]);
28
}
29
}
30
$res
=
ilSoapFunctions::saveQuestion
(
$_POST
[
"session_id"
] .
"::"
.
$_POST
[
"client"
],
$_POST
[
"active_id"
],
$_POST
[
"question_id"
],
$_POST
[
"pass"
],
$results
);
31
if
(
$res
===
true
) {
32
global
$DIC
;
33
$lng
=
$DIC
[
'lng'
];
34
$lng
->loadLanguageModule(
"assessment"
);
35
echo
$lng
->txt(
"result_successful_saved"
);
36
}
else
{
37
global
$DIC
;
38
$lng
=
$DIC
[
'lng'
];
39
$lng
->loadLanguageModule(
"assessment"
);
40
echo
$lng
->txt(
"result_unsuccessful_saved"
);
41
}
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:1144
ilSoapFunctions\saveQuestion
static saveQuestion(string $sid, int $active_id, int $question_id, int $pass, array $solution)
Definition:
inc.soap_functions.php:419
$_POST
$_POST['cmd']
Definition:
lti.php:27
$results
$results
Definition:
save_question_post_data.php:22
$lng
$lng
Definition:
save_question_post_data.php:38
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:30
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
TestQuestionPool
save_question_post_data.php
Generated on Sat Oct 18 2025 23:04:35 for ILIAS by
1.9.4 (using
Doxyfile
)