/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to DuggaSys/quizAjax/getQuizObject.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-04-24 13:11:16 UTC
  • mto: This revision was merged to the branch mainline in revision 131.
  • Revision ID: gustav.hartvigsson@gmail.com-20130424131116-0p4uibacf98ck2j1
Made a few changes to the licensing stuff, there needs to be a discussion with Gush about the details in regards to Media Files and other stuff.:w

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
        //header('Content-type: application/json');
14
14
        header('Content-type: application/json; charset=utf-8'); 
15
15
 
16
 
        include "dbconnect.php";
 
16
        include "../../php/dbconnect.php";
17
17
 
18
18
        //Check if the student is a praticipant of the course
19
19
        $queryString="SELECT COUNT(*) 
28
28
        $stmt->bindParam(':COCCASION', $_POST['courseOccasion']);
29
29
        $stmt->execute();
30
30
 
31
 
        if($stmt->fetchColumn()==1){ //Student is registered for the course - COUNT result read from the first column of the next unread row (i.e. the first row) 
 
31
        if($stmt->fetchColumn()==1) { //Student is registered for the course - COUNT result read from the first column of the next unread row (i.e. the first row) 
32
32
                
33
33
                //Check if quiz is open
34
34
                $queryString="SELECT Quiz.opening, Quiz.closing
87
87
 
88
88
                $quizVariantObject=$stmt->fetch(PDO::FETCH_ASSOC);
89
89
 
90
 
                if(count($quizVariantObject)>0){
 
90
                if(count($quizVariantObject)>0) {
91
91
                        $quizVariantObject['objectData']=htmlspecialchars_decode($quizVariantObject['objectData']);
92
92
                        echo json_encode($quizVariantObject);
93
93
                        exit();