ILIAS  release_8 Revision v8.24
save_question_post_data.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5chdir("../..");
6require_once "./include/inc.header.php";
7include_once "./webservice/soap/include/inc.soap_functions.php";
8$results = array();
9foreach ($_POST as $key => $value) {
10 if (preg_match("/value_(\d+)_1/", $key, $matches)) {
11 array_push($results, $_POST["value_" . $matches[1] . "_1"]);
12 array_push($results, $_POST["value_" . $matches[1] . "_2"]);
13 array_push($results, $_POST["points_" . $matches[1]]);
14 }
15}
16$res = ilSoapFunctions::saveQuestion($_POST["session_id"] . "::" . $_POST["client"], $_POST["active_id"], $_POST["question_id"], $_POST["pass"], $results);
17if ($res === true) {
18 global $DIC;
19 $lng = $DIC['lng'];
20 $lng->loadLanguageModule("assessment");
21 echo $lng->txt("result_successful_saved");
22} else {
23 global $DIC;
24 $lng = $DIC['lng'];
25 $lng->loadLanguageModule("assessment");
26 echo $lng->txt("result_unsuccessful_saved");
27}
static saveQuestion(string $sid, int $active_id, int $question_id, int $pass, array $solution)
global $DIC
Definition: feed.php:28
string $key
Consumer key/client ID value.
Definition: System.php:193
$results
$lng
foreach($_POST as $key=> $value) $res