Differences Between: [Versions 310 and 311] [Versions 39 and 311]
Web CT question importer.
Copyright: | 2004 ASP Consulting http://www.asp-consulting.net |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 875 lines (39 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
qformat_webct:: (9 methods):
provide_import()
can_import_file()
mime_type()
validate_file()
store_file_for_text_field()
text_field()
importpostprocess()
readdata()
readquestions()
Class: qformat_webct - X-Ref
Web CT question importer.provide_import() X-Ref |
This plugin provide import return: bool true |
can_import_file($file) X-Ref |
No description |
mime_type() X-Ref |
No description |
validate_file(stored_file $file) X-Ref |
Validate the given file. For more expensive or detailed integrity checks. param: stored_file $file the file to check return: string the error message that occurred while validating the given file |
store_file_for_text_field(&$text, $tempdir, $filepathinsidetempdir, $filename) X-Ref |
Store an image file in a draft filearea param: array $text, if itemid element don't exists it will be created param: string tempdir path to root of image tree param: string filepathinsidetempdir path to image in the tree param: string filename image's name return: string new name of the image as it was stored |
text_field($text) X-Ref |
Given an HTML text with references to images files, store all images in a draft filearea, and return an array with all urls in text recoded, format set to FORMAT_HTML, and itemid set to filearea itemid param: string text text to parse and recode return: array with keys text, format, itemid. |
importpostprocess() X-Ref |
Does any post-processing that may be desired Clean the temporary directory if a zip file was imported return: bool success |
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 |
No description |
unhtmlentities($string) X-Ref |
Manipulate HTML editites in a string. Used by WebCT import. param: string $string return: string |
qformat_webct_convert_formula($formula) X-Ref |
Helper function for WebCT import. param: unknown_type $formula |