source: Dev/trunk/returnQuestionDisplay.php @ 185

Last change on this file since 185 was 182, checked in by fpvanagthoven, 13 years ago

Verder gewerkt aan alle scripts. Met uitzondering van:

  • savePipeline().js loopt nog vast
  • loadSession->updateSequencer->updateDividers() gaat niet goed als er geen steps in de pipeline zitten (bijvoorbeeld bij het maken van een nieuwe sessie). Nog check toevoegen of er ook echt wel steps zijn voordat de functie verder gaat naar het maken van een requestString en AJAX calls.
File size: 1.7 KB
Line 
1<?php
2
3/*
4 * To change this template, choose Tools | Templates
5 * and open the template in the editor.
6 */
7
8if (!isset($_POST['uids']) || empty($_POST['uids'])) {
9    return;
10}
11
12$uids = explode(",", $_POST['uids']);
13$dbi = new DatabaseInterface();
14$output = "";
15foreach ($uids as $uid) {
16    $results = $dbi->get("Question", array("uid" => $uid));
17    (is_array($results)) ? $result = $results[0] : $result = $results;  //ternary operation!
18    $output += '
19<div id="questionUID" class="smallFrame">
20                    <div class="smallTitle"><div class="listNumber">1</div>#QUESTION-IDENT-NO</div>
21                    <div class="content">
22                        <p class="questionBody">
23                            This is the question body text. This is what the user will read when he/she is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.This is the question body text. This is what the user will read when he is answering the survey.
24                        </p>
25                        <div class="questionParamsView">
26                            PARAMETERS GO HERE, probably in one line (Only answer type and identifier?) Tags?
27                        </div>
28                    </div>
29                    <div id="questionDisplayControls" class="controls">
30                        <input type="button" value="Edit" onClick="javascript:alert(\'editing not yet supported\');" class =" smallButton"/>
31                        <input type="button" value="Remove" onClick="javascript:alert(\'removing not yet supported\');" class =" smallButton"/>
32                    </div>
33                </div>
34';
35}
36
37echo $output;
38?>
Note: See TracBrowser for help on using the repository browser.