}
}
- function postprocess() {
+ function importpostprocess() {
/// Goes through the questionids, looking for shortanswer questions
/// and converting random groups of 4 into matching questions.
/// Importing functions
- function preprocess($category) {
+ function importpreprocess($category) {
/// Does any pre-processing that may be desired
$this->category = $category; // Important
return true;
}
- function process($filename) {
+ function importprocess($filename) {
/// Processes a given file. There's probably little need to change this
if (! $lines = $this->readdata($filename)) {
}
- function postprocess() {
+ function importpostprocess() {
/// Does any post-processing that may be desired
/// Argument is a simple array of question ids that
/// have just been added.
$format = new quiz_file_format();
- if (! $format->preprocess($category)) { // Do anything before that we need to
+ if (! $format->importpreprocess($category)) { // Do anything before that we need to
error("Error occurred during pre-processing!");
}
- if (! $format->process($newfile['tmp_name'])) { // Process the uploaded file
+ if (! $format->importprocess($newfile['tmp_name'])) { // Process the uploaded file
error("Error occurred during processing!");
}
- if (! $format->postprocess()) { // In case anything needs to be done after
+ if (! $format->importpostprocess()) { // In case anything needs to be done after
error("Error occurred during post-processing!");
}