Exemplo n.º 1
0
            if ($myrights == 75) {
                $isgrpadmin = true;
            }
        }
    }
}
$now = time();
$editmsg = '';
if (isset($_POST['text'])) {
    if (!isset($_GET['id'])) {
        $id = 'new';
    } else {
        $id = $_GET['id'];
    }
    $_POST = stripslashes_deep($_POST);
    $qtext = stripsmartquotes($_POST['text']);
    $nparts = intval($_POST['nparts']);
    $qtypes = array();
    $qparts = array();
    $questions = array();
    $feedback = array();
    $feedbacktxtdef = array();
    $feedbacktxtessay = array();
    $answerboxsize = array();
    $scoremethod = array();
    $useeditor = array();
    $answer = array();
    $partial = array();
    $qtol = array();
    for ($n = 0; $n < $nparts; $n++) {
        $qtypes[$n] = $_POST['qtype' . $n];
Exemplo n.º 2
0
    }
}
if (isset($_GET['frompot'])) {
    $frompot = 1;
} else {
    $frompot = 0;
}
$outputmsg = '';
$errmsg = '';
if (isset($_POST['qtext'])) {
    require "../includes/filehandler.php";
    $now = time();
    $_POST['qtext'] = stripsmartquotes(stripslashes($_POST['qtext']));
    $_POST['control'] = addslashes(stripsmartquotes(stripslashes($_POST['control'])));
    $_POST['qcontrol'] = addslashes(stripsmartquotes(stripslashes($_POST['qcontrol'])));
    $_POST['solution'] = stripsmartquotes(stripslashes($_POST['solution']));
    $_POST['qtext'] = preg_replace('/<span\\s+class="AM"[^>]*>(.*?)<\\/span>/sm', '$1', $_POST['qtext']);
    $_POST['solution'] = preg_replace('/<span\\s+class="AM"[^>]*>(.*?)<\\/span>/sm', '$1', $_POST['solution']);
    if (trim($_POST['solution']) == '<p></p>') {
        $_POST['solution'] = '';
    }
    if (strpos($_POST['qtext'], 'data:image') !== false) {
        require "../includes/htmLawed.php";
        $_POST['qtext'] = convertdatauris($_POST['qtext']);
    }
    $_POST['qtext'] = addslashes($_POST['qtext']);
    $_POST['solution'] = addslashes($_POST['solution']);
    //handle help references
    if (isset($_GET['id']) || isset($_GET['templateid'])) {
        if (isset($_GET['id'])) {
            $query = "SELECT extref FROM imas_questionset WHERE id='{$_GET['id']}'";