Menu

#1 Can't create questions

open
nobody
8
2010-10-02
2010-10-01
Shawn Shay
No

I tried to create questions using the sample database but am unablle. I truncated the tables and started from scratch but I keep getting "Diese Frage ist bereits vorhanden!" That the quesyion already exist even when the table is empty. I will gladly translate to english if you can help me debug.

Discussion

  • Codingcave

    Codingcave - 2010-10-02

    Hello, thanks for downloading.
    We uploaded a new version just 2 seconds ago. Please try the new version and then report if the error occurs again.

     
  • Shawn Shay

    Shawn Shay - 2010-10-02

    Nope same problem happens. Diese Frage ist bereits vorhanden!. Have you tried deleting your database and then re-installing?

     
  • Shawn Shay

    Shawn Shay - 2010-10-02
    • labels: --> Install Problem (example)
    • priority: 5 --> 8
     
  • Codingcave

    Codingcave - 2010-10-02

    Okay, I can't reproduce the error. I deleted everything and reinstalled the whole script. When I just looked into the code I realised that the error message appears when inserting a new question into the database fails.
    Is there another error message which says something about your database connection? I'm quite confused. It works fine on my localhost and on two servers. Please stay in contact to help us improving our script!

     
  • Shawn Shay

    Shawn Shay - 2010-10-02

    Maybe it's a Windows 7 thing. I am using it on localhost and have tried deleting and re-installing several times. One odd thing is it will not create the database or delete the old. When I click "Alte Datenbank loschen?" and "Installiere Beispielfragen und Quiz" I get "Die Datenbank konnte nicht ausgewählt werden.". The only way I get it to work is to create the database in MYSQL first. Once that is done I can login, look at the existing questions but no existing quiz exist. I can create a quiz but when I create a question and use the pulldown to select the new quiz I get "Diese Frage ist bereits vorhanden!". There really should be a way to get back to the main menu from there. Not sure if this helps.

     
  • Codingcave

    Codingcave - 2010-10-02

    We have developed quizmaster on one windows 7, one mac and one Linux computer. Maybe you could tell us what happens after you used the install.php script? Is there a database afterwards? What we would also need to help you is the content of the vars.php in the config folder. I hope we can manage that.

     
  • Shawn Shay

    Shawn Shay - 2010-10-02

    No database. Here is the contents of the files you asked minus my passwords. It's saving to the file okay but will not create a new DB. Once I create the DB named in the vars.php file it will populate it.

    vars.php

    <?php
    /*
    * Enthält alle wichtigen Variablen des Scripts.
    */

    //Datenbankverbindung

    $dbhost = "localhost";
    $dbuser = "root";
    $dbpass = "password";
    $db = "quizs";
    $prefix = "qz_";
    ?>

     
  • Shawn Shay

    Shawn Shay - 2010-10-02

    The when I goto the index page to take the test I get this:

    Quiz-ID QuizName
    1 <a href="quizviewer.php?quiz=1&fragenzahl=10>Shawn

    The inde.php file looks like this:

    <?php
    include_once('config/dbconnect.php');
    echo '<div align="center">';
    $abfrage =mysql_query("SELECT * FROM ".$prefix."quiz");
    echo '<form action="" method="post"><table><tr><td>Quiz-ID</td><td>QuizName</td></tr>';
    while($row=mysql_fetch_array($abfrage)){
    $name=$row['name'];
    $id=$row['quiz_id'];

    echo '<tr><td>'.$id.'</td><td><a href="quizviewer.php?quiz='.$id.'&fragenzahl=10>'.$name.'</a></td></tr>';
    }
    echo '</table></form></div>';

     
  • Codingcave

    Codingcave - 2010-10-02

    Let me summarise what you did and what error occurs:

    You used the install script.
    The right configuration is written down in the vars.php.
    During the installation process it shows no error, but there
    is no database created and of course as a result of it, there
    are no quizes or questions or something you could use?

    Mmh I found the same error, we didn't fidn this bug, because we
    had a database called quiz from the very first day on. I am going to fix it this
    weekend.

     
  • Codingcave

    Codingcave - 2010-10-02

    I just fixed that bug, I'm gonna upload the new bundle, just redownload it and check whether it works at you computer too :D

     
  • Shawn Shay

    Shawn Shay - 2010-10-02

    Same thing :- ( I think it has something to do with there being no quiz installed in the sample quiz just questions.

     
  • Codingcave

    Codingcave - 2010-10-02

    did you delete your database again?
    well at least I was able to fix one bug, but I still do not exactly know what your problem is.
    do you use phpmyadmin or something? after installing everything, is there an entry in the table "quiz"? are there entries in the table "fragen"?

     
  • Shawn Shay

    Shawn Shay - 2010-10-03

    Okay here is what I do everytime I test it.
    1) drop all databases being used
    2) run install.php setting username to root access and password
    3) have it install new database and sample quiz
    4) login under user/login.php
    5) Check to see if quiz is there, no quiz exist but if I go under add questions there are questions.
    6) create new quiz
    7) add questions and use pulldown to attach to quiz created.
    8) get "Diese Frage ist bereits vorhanden!"

    I repeat this everytime I do an install.

     
  • Shawn Shay

    Shawn Shay - 2010-10-03

    Also when I first install I get the following:

    The tables have the following:
    qz_fragen

    Springfield USA Deutschland 912000
    DDR USA BRD BND gibt keine 900300
    goldener Schnitt PI Volumen eines Gramms Wasser Gewicht einer paarungswilligen Anakonda in Kilogramm 902000
    Malte Hauke Pascal Felix Lukas 910300
    woher soll ich das wissen? morgen gestern Mitternacht 910000

    The qz-quiz is empty.

     
  • Codingcave

    Codingcave - 2010-10-04

    which version of php and mysql are you using?

     
  • Shawn Shay

    Shawn Shay - 2010-10-04

    mysql 5.1 and PHP 5.2.1.4 and apache 2.2

     
  • Codingcave

    Codingcave - 2010-10-05

    I really have no clue. I'm using similar versions.
    After using install.php please try to execute config.php (same directory). It should be executed correctly after install.php, but maybe something is going wrong there.

     
  • Codingcave

    Codingcave - 2010-10-06

    If that doesn't help, try downloading simplequiz1.0a1.zip.
    We fixed our MySQL syntax (it was not wrong but unusual...) Maybe your MySQL version didn't support our code.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.