Exemple #1
0
        $strErrormessage = 'ErrorMess~Question already added';
        echo $strErrormessage . "~2~" . $_GET["qqid"];
        exit;
    }
    if ($_SESSION["InTlAsTiD"]) {
        $qqqid = $_SESSION["InTlAsTiD"];
    } else {
        $qqqid = $_GET["qtid"];
    }
    $strTab = $hldGlobal->fnFetchQuestionQuiz($qqqid, $_GET["eid"]);
    $strResposeText = "EditQuestion~" . $strTab . "~2~" . $_GET["qqid"];
    echo $strResposeText;
} else {
    //This will add the question
    if (!$_SESSION["InTlAsTiD"] && !$_POST["editid"]) {
        $intLastId = $hldGlobal->fnInsTemp($_POST["cid"], $_POST["qtitle"]);
    } else {
        if ($_POST["editid"]) {
            $intLastId = $_POST["editid"];
        } else {
            $intLastId = $_SESSION["InTlAsTiD"];
        }
    }
    $strErrormessage = '';
    if ($_POST["module_id"] == "--") {
        echo "Please select module name<br>";
        exit;
    }
    if ($_POST["question"] == "") {
        echo "Please enter question<br>";
        exit;