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