Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Blackboard V5 and V6 question importer.

Copyright: 2005 Michael Penney
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 221 lines (9 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 2 classes

qformat_blackboard_six_file:: (0 methods):

qformat_blackboard_six:: (3 methods):
  get_filecontent()
  readdata()
  readquestions()


Class: qformat_blackboard_six_file  - X-Ref

Class to represent a Blackboard file.

Class: qformat_blackboard_six  - X-Ref

Blackboard Six QTI file importer class.

get_filecontent($path)   X-Ref
Return the content of a file given by its path in the tempdir directory.

param: string $path path to the file inside tempdir
return: mixed contents array or false on failure

readdata($filename)   X-Ref
Return content of all files containing questions,
as an array one element for each file found,
For each file, the corresponding element is an array of lines.

param: string $filename name of file
return: mixed contents array or false on failure

readquestions($lines)   X-Ref
Parse the array of objects into an array of questions.
Each object is the content of a .dat questions file.
This *could* burn memory - but it won't happen that much
so fingers crossed!

param: array $lines array of qformat_blackboard_six_file objects for each input file.
return: array (of objects) question objects.