Changeset 95


Ignore:
Timestamp:
08/31/11 15:35:10 (14 years ago)
Author:
fpvanagthoven
Message:

Done: Default question description -> do not display in SurveyTool?. Added bug to TODO list

Location:
Dev/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/Survey.php

    r75 r95  
    11<?php
     2
    23/*
    34 * To change this template, choose Tools | Templates
     
    1617    public $description;
    1718    public $questions;
    18        
    19         public $results;
     19    public $results;
     20   
     21    const DEFAULT_DESCRIPTION = "Write a helpful description for this survey here.";
    2022
    2123    public function __construct($id, $title, $description = null) {
     
    2426        $this->description = $description;
    2527        $this->questions = array();
    26                
    27                 $this->results = null;
     28
     29        $this->results = null;
    2830    }
    29        
    30         public function addQuestion($question)
    31         {
    32                 array_push($this->questions, $question);
    33         }
    34        
    35         public function setResults($surveyResults)
    36         {
    37                 $this->results = $surveyResults;
    38         }
     31
     32    public function addQuestion($question) {
     33        array_push($this->questions, $question);
     34    }
     35
     36    public function setResults($surveyResults) {
     37        $this->results = $surveyResults;
     38    }
    3939
    4040    public static function getSurvey($info) {
     
    7070        return $survey;
    7171    }
    72        
    73         /**
    74          * TODO: Should return Results-object from reading RDF-database
    75          * @param type $surveyID
    76          */
    77         public static function getResults($surveyID)
    78         {
    79                
    80         }
     72
     73    /**
     74     * TODO: Should return Results-object from reading RDF-database
     75     * @param type $surveyID
     76     */
     77    public static function getResults($surveyID) {
     78       
     79    }
    8180
    8281}
     82
    8383?>
  • Dev/trunk/classes/SurveyTool.php

    r59 r95  
    7070
    7171    private function displayDescription() {
     72        if ($this->survey->description != Survey::DEFAULT_DESCRIPTION)
     73            $description = $this->survey->description;
     74        else
     75            $description = "";
    7276        ?>
    73         <p class='centerBoxed'><?php echo $this->survey->description; ?></p>
     77        <p class='centerBoxed'><?php echo $description; ?></p>
    7478        <?php
    7579    }
     
    97101
    98102    private function displayQuestionDescription($question) {
     103        if ($question->description != "Write a question description here.")
     104            $description = $question->description;
     105        else
     106            $description = "";
    99107        ?>
    100         <p><?php echo "<div class='questionDescription noPadding'>" . $question->description . "</div>"; ?></p>
     108        <p><?php echo "<div class='questionDescription noPadding'>" . $description . "</div>"; ?></p>
    101109        <?php
    102110    }
  • Dev/trunk/doc/DONE

    r92 r95  
    66
    77Session
    8    
     8    Application inladen in SessionCreationTool
     9    Repopulate session pipeline when "making"
    910
    1011Application
     
    1213    Load Application
    1314
    14 Survey
     15SurveyCreationTool
    1516    Title + Descriptions CRUD
    1617    New Survey
     
    1920    Questions CRUD
    2021
     22SurveyTool
     23    Default question description / leeg -> Niet displayen
  • Dev/trunk/doc/TODO

    r92 r95  
    99    Load / Edit Session
    1010    Session starten -> inlogscherm -> session start *
    11     **Application inladen in session
    1211
    1312Application
     
    2827Survey voor users
    2928    Bounds checking -> js erna van
    30     Default question description / leeg -> Niet displayen
    3129
    3230BUGS - Hoge prioriteit
     31    Question title en description worden niet geupdate
     32    Application description wordt niet geupdate
    3333
    3434BUGS - Lage prioriteit
  • Dev/trunk/surveycreation.php

    r83 r95  
    2222    $timeStamp = $_POST['timeStamp'];
    2323
    24 //    echo 'This is what gets sent:';
    25 //    var_dump($_POST);
    26 //    echo '<br/><br/>';
     24    echo 'This is what gets sent:';
     25    var_dump($_POST);
     26    echo '<br/><br/>';
    2727    $surveyDBI = new SurveyCreationDatabaseInterface($_POST['surveyID']);
    2828    $surveyDBI->setSurveyInfo($_POST,$_SESSION);
    2929    $info = $surveyDBI->getSurveyInfo();
    30 //    echo '<br/><br/>';
    31 //    echo 'This is what I get back:';
    32 //    var_dump($info);
     30    echo '<br/><br/>';
     31    echo 'This is what I get back:';
     32    var_dump($info);
    3333
    3434    $savedSurvey = Survey::getSurvey($info);
     
    4141<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    4242    <head>
    43         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     43        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    4444            <title>Survey Creation</title>
    4545            <?php new StyleSheet(); ?>
Note: See TracChangeset for help on using the changeset viewer.