PHP Classes

Database

Recommend this page to a friend!

      QCM Class  >  All threads  >  Database  >  (Un) Subscribe thread alerts  
Subject:Database
Summary:I wish this was totally database driven
Messages:4
Author:Tarik Tutuncu
Date:2006-05-26 01:10:00
Update:2006-05-26 14:58:23
 

  1. Database   Reply   Report abuse  
Picture of Tarik Tutuncu Tarik Tutuncu - 2006-05-26 01:10:00
Hi,

I wish this was totally database driven. In this class we can use the database only for user details and grades. It would be very nice if we could create the exam online with forms and DB instead of writing text files. Have you done anything like this? Or can you help me a little on how I can make this totally database driven.

Thank You...

  2. Re: Database   Reply   Report abuse  
Picture of Pierre FAUQUE Pierre FAUQUE - 2006-05-26 02:55:42 - In reply to message 1 from Tarik Tutuncu
Hello,

Excuse me but my english isn't fluent :o( Sure, if I can help you and if your whish is clear for me, I will do.

With this class, you can save the results either in texts file or in a database (PostgreSQL or MySQL).

Can you clarify your questions and your whishes with some examples ?

If you are using a database, you can know the structure of the needed table at the end of the class file (technical comments)

You can also find the complete documentation (sorry, in french) on my web site (http://www.fr-webdev.net/index.php?p=cqcm.php)

More, you can find on this website a "whish list" and a "report bug".
I'm wating for more explanation on your whishes and your problem to help you.

Pierre.
PS: Where do you live ? :o)

  3. Re: Database   Reply   Report abuse  
Picture of Tarik Tutuncu Tarik Tutuncu - 2006-05-26 10:14:18 - In reply to message 2 from Pierre FAUQUE
Hi again,

I know that we can save the results in a database, but what I need is to make a form to create the questionnaire online and save it to a database, and call the questionnaire from a database, instead of text files. I think this would be a great addition to your class.

For example:
This is the QCM file:

/////////////////////////////////////////////////
; askfor=name,phone
askfor=none
author=Pierre FAUQUE,pierre@fauque.net
categories=Culture,Réseau,Protocoles,Logiciels
drawchart=lines
drawsheet=1
mailto=pierre@fauque.net
mintime=00:10:00
maxtime=00:20:00
org=FTF Tests
; ponderation=1
release=oct 2004
goal=opinion
; save=mysql,testsonline,resultats,fauque,mypasswd
save=none
shownum=1
showtitle=1
site=http://testsonline.free.fr/test2/
urlback=http://www.fr-webdev.net/
; smsto=0683485270
; sqlserver=sql.fr-webdev.net:3306
; starton=01/10/2004 09:00
; stopon=15/10/2004 18:00
details=short
threshold=60
title=Démo 1
; userlist=file,stagiaires.txt
userlist=none
version=1.0
.
# Catégorie: Protocoles (3). Appariement
; Vérifier si les services internet courants sont connus
3;3;2,7,9,5;1
Associez les services internet suivants avec leurs ports respectifs.
FTP,HTTP,NNTP,SMTP
7,21,22,23,25,53,80,110,119

# Catégorie: Culture (1). QCMRU
; Faux. HTML a été inventé par Tim Berners-Lee.
; Marc Andressen a inventé le premier navigateur graphique : mosaic
0;1;1;1
L'inventeur du langage HTML est Marc Andressen.
Vrai
Faux

# Catégorie: Logiciels (4). QCMRM
; SMTP: Eudora, Outlook Express, Netscape, News Xpress (NNTP+SMTP)
; Internet Explorer (HTTP), LeechFTP (FTP), mIRC (NNTP)
; MS-Mail format de messagerie propriétaire
1;4;2,3,6,7;1
Cochez ci-dessous les logiciels permettant d'envoyer du courrier SMTP
Internet Explorer
Eudora
Outlook Express
LeechFTP
mIRC
Netscape
News Xpress
MS-Mail

# Catégorie: Réseau (2). Tri
; Vérifier si les couches réseau du modèle OSI sont connues.
; Ordre: Application,Présentation,Session,Transport,Réseau,Liaison,Physique
; La couche la plus haute étant la couche Application
2;2;1,4,6,7,5,2,3;1
Classez ces couches réseau dans l'ordre (1=la plus haute)
Application,Liaison-Données,Physique,Présentation,Réseau,Session,Transport

# Catégorie: Logiciels (4). QCMRU
; Tous sont des logiciels clients sauf, Apache qui est un serveur (Web)
0;4;6;1
Cochez ci-dessous le logiciel intrus.
Internet Explorer
Outlook Express
Eudora
LeechFTP
Netscape
Apache

# Catégorie: Réseau (2). Appariement
; Vérifier si les classes de réseau sont connues.
; 147.38.25.103:B, 192.168.1.53:C, 13.128.35.206:A, ,193.248.232.178:C
3;2;2,3,1,3;1
Associez les numéros IP ci-dessous avec la classe de réseau correspondante.
147.38.25.103,192.168.1.53,13.128.35.206,193.248.232.178
Classe A,Classe B,Classe C

# Catégorie: Protocoles (3). Tri
; Vérifier si les ports sont connus
; FTP:21, SSH:22, Telnet:23, SMTP:25, HTTP:80, NNTP:119, MySQL:3306
2;3;5,1,4,3,2,6,7;1
Classez ces protocoles dans l'ordre numérique de leur port (1= le plus petit)
SSH,HTTP,SMTP,Telnet,FTP,NNTP,MySQL

# Catégorie: Culture (1). QCMRM
; TCP/IP : Paul BARRAN, Larry ROBERTS
; HTML : Tim BERNERS-LEE
; Netscape : Marc ANDRESSEN, Jim CLARK
1;1;2,5;1
Parmi ces noms quels sont ceux qui ont participé à la création de TCP/IP
Marc ANDRESSEN
Paul BARRAN
Tim BERNERS-LEE
Jim CLARK
Larry ROBERTS
//////////////////////////////////////////////////////////////

I would like to create this questionnaire in a database table. All the options and questions will be stored in a database and giving the questionnaire id I would like to create it from the values taken from the database. I hope this was clear enough. I am from Turkey. I am doing a Learning Management System for my university's finishing project. And I really need help on a questionnaire for my system.

Thank you...

  4. Re: Database   Reply   Report abuse  
Picture of Pierre FAUQUE Pierre FAUQUE - 2006-05-26 14:58:23 - In reply to message 3 from Tarik Tutuncu
OK.
I understood what you need.
This feature isn't yet available. This is a project.

In my mind :
1) the initial goal of this class was only to display and correct QCMs
2) an other application is necessary to build questionnaires.
either the teacher use notepad to write his questions himself
or the teacher use an application (to be written) to build his questionnaires
This secund point is one of my project.

BUT...
I had begun a script to do that. It is not completely finished.
You can see in use it at :
fr-webdev.net/index.php?p=qcmgen.pg ... then, click on the link "generator".
This interface is currently in french. If you want, i can (to help you) translate this script in english and sent it to you.
Currently, this script ask some questions to the author (to build the header) then ask the questions to build the qcm file (qcmXX.txt). But, of course, you can modify this script to write the qcm in a database rather than a text file. It's not a great job...

If you want, you can write me at pierre@fauque.net
See you later...
Pierre.