PHP Classes

TeXML: Create and evaluate online questionnaire tests

Recommend this page to a friend!
  Info   View files Example   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 367 All time: 6,841 This week: 555Up
Version License PHP version Categories
texml 1.0.1GNU General Publi...5PHP 5, E-Learning
Description 

Author

This class can create and evaluate online questionnaire tests.

It create a questionnaire of a given subject and add questions to it with multiple possible answers.

The questions and answers are stored in files in the JSON format.

It can also initialize the test of student by resetting the score and questions taken and storing the test values in session variables.

The class can also display the questions in a page, process the answers and compute the final results when all questions in the test were answered.

Picture of Samuel Adeshina
  Performance   Level  
Name: Samuel Adeshina is available for providing paid consulting. Contact Samuel Adeshina .
Classes: 19 packages by
Country: Nigeria Nigeria
Age: 25
All time rank: 5252 in Nigeria Nigeria
Week rank: 416 Up8 in Nigeria Nigeria Down
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Recommendations

Examination and skills assessment
Examination and skills assessment solution

Example

<?php
   
require_once("../src/TeXML.php");


   
$texml = new TeXML();

   
$texml->Subject("PHP");

   
$question1 = array(
           
"PHP",
           
"How is a variable declared in PHP?",
            array(
"Using the + sign", "The double dollar sign is used", "The $ sign is used", "I dont know"),
           
5, 3
       
);
   
$question2 = array(
           
"PHP",
           
"Is PHP Object Oriented",
            array(
"Yes, I guess so", "No", "Probably", "Yes! Im very sure"),
           
5, 4
       
);
   
$question3 = array(
           
"PHP",
           
"Does PHP Support Object Encapsulation",
            array(
"No", "Yes", "I don't know", "The language isn't object oriented"),
           
10, 1
       
);
   
$question4 = array(
           
"PHP",
           
"Is it possible to write a PHP program that runs on a console based computer system",
            array(
"Very well", "Obviously!", "This question is confusing", "No, thats not possible"),
           
10, 1
       
);
   
$question5 = array(
           
"PHP",
           
"Pick the odd one out",
            array(
"CakePHP", "Symfony", "GTK+", "Zend"),
           
10, 3
       
);
   
$question_array = array($question1, $question2, $question3, $question4, $question5);
    foreach (
$question_array as $value) {
       
$texml->NewQuestion($value[0], $value[1], $value[2], $value[3], $value[4]);
    }

    echo
"Done!";
   
header("Location: start.php");
?>


Details

TeXML

This class helps to make the process of taking online tests, surveys, questionnaires very easy. It handles everything from creating the questions down to randomly assigning the questions to candidates and finally calculating the scores. The best thing about this class is it stores the questions in json format (in a json file) in form of subjects. This means you can handle enjoy everything if you prefer to use javascript or jQuery depending on your taste. To fully understand how this class works you need to go through the files in the example directory from both your browser and text editor (the comments are more useful, I think)


  Files folder image Files  
File Role Description
Files folder imageexample (5 files, 1 directory)
Files folder imageFileManager (2 files)
Files folder imagesrc (2 files)
Accessible without login Plain text file help.txt Data An How-To Guide
Accessible without login Plain text file LICENSE Lic. Merge branch 'master' of https://github.com/Samshal/TeXML
Accessible without login Plain text file README.md Data Merge branch 'master' of https://github.com/Samshal/TeXML

  Files folder image Files  /  example  
File Role Description
Files folder imageSubjects (1 file)
  Accessible without login Plain text file accept.php Example A test file
  Accessible without login Plain text file gen.php Example A test file
  Accessible without login Plain text file index.php Example A test file
  Accessible without login Plain text file start.php Example A test file
  Accessible without login Plain text file test.php Example A test file

  Files folder image Files  /  example  /  Subjects  
File Role Description
  Accessible without login Plain text file example_subject.json Data just to show how th questions are stored

  Files folder image Files  /  FileManager  
File Role Description
  Plain text file file_manager.php Class Contains The FileManager Class
  Accessible without login Plain text file help.txt Doc. just an help doc. for working with this class

  Files folder image Files  /  src  
File Role Description
  Plain text file AbstractTeXML.php Class This file contains an abstract class called AbstractTeXML which defines how the main class TeXMl should be structured and what methods it must implement
  Plain text file TeXML.php Class Merge branch 'master' of https://github.com/Samshal/TeXML

 Version Control Unique User Downloads Download Rankings  
 100%
Total:367
This week:0
All time:6,841
This week:555Up