Mass Exam Marker Plugin
A Moodle plugin to help mark massive exams.
 All Data Structures Namespaces Files Functions Variables
MME_Exams Class Reference

Public Member Functions

 __construct ($data, $name="")
 
 get_QRcode_string ($page_number, $exam_number)
 
 generate_exam ($exam_count, $extra_pages=0)
 
 output_exam ($name="output")
 

Detailed Description

Class for handling exam generation.

Author
Jaeyoon Kim
Version
0.0.1
Since
2016-03-18

Constructor & Destructor Documentation

__construct (   $data,
  $name = "" 
)

The constuctor. The constructor takes 2 arguments, $path and the optional $name. The constructor will then setup a new pdf object based on the given arguments. This constructor will be changed to use database parameters instead at a later time.

Parameters
str$pathThe path to the exam file.
str$name,=""Optional name of the exam.

Member Function Documentation

generate_exam (   $exam_count,
  $extra_pages = 0 
)

Public method. This method takes 2 integer arguments. $exam_count and $extra_pages This method will generate a exam each with a unique QRcode placed on the top left corner.

Parameters
int$exam_countNumber of exams to be generated.
int$extra_pagesNumber of extra "emergency" pages to generate for each exam.
Returns
void
get_QRcode_string (   $page_number,
  $exam_number 
)

Public method. The method takes 2 integer arguments for the current page and exam number. The method will return a string that will be displayed under the QRcode.

Parameters
int$page_numberCurrent page number
int$exam_numberCurrent exam booklet number
Returns
str String that will be displayed under the QRcode.
output_exam (   $name = "output")

Public method. This method will output the generated .pdf file. Thus should only be called after generate_exam() method has been called. The PDF output will fail if there are any non PDF output made beforehand. An optional filename can be specified as the $name which will be used for the name in the download prompt.

Parameters
str$name,="output"Optional filename.
Returns
void

The documentation for this class was generated from the following file: