Quiz file upload module provides a new content type to use with quiz module as a question type. It allows users to upload file as a response to quiz question.
Features
- Users can upload predefined file extensions as a response to quiz question.
- Allowed file extensions can be defined globally and overridden per question.
- Can preserve attached file along Back / Next navigation.
- Can accept only one file input per question.
- Rudimentary scoring option. Sets globally defined integer value as score to response on file upload.
- No manual scoring as in long answer and short answer. (I do welcome patches for this feature)
- Serves good for survey / personality kind of quizzes.
Credit
This module was developed by Sivaji at KnackForge - The Drupal shop based out of Chennai, India. We offer Drupal development, consultancy, hosting and support to customers worldwide. Sponsored by LogicMedia (jesse at logicmedia dot be)
Installation
Download the recommended version from project page, place the module code in folder /sites/all/modules/quiz/question_types/ and enable it from module manager page /admin/build/modules.
Patch
This module needs the below patch to quiz_question.module.
diff --git a/question_types/quiz_question/quiz_question.module b/question_types/
index 540429d..30219a9 100644
--- a/question_types/quiz_question/quiz_question.module
+++ b/question_types/quiz_question/quiz_question.module
@@ -255,6 +255,9 @@ function quiz_question_evaluate_question($question, $result_
// FIXME this use of POST array is hacky. We will try to use FAPI mor accur
$answer = $_POST['tries'];
}
+ if (empty($answer) && isset($_FILES['files']['type']['tries']) && !empty($_FILES['files']['type']['tries'])) {
+ $answer = $_FILES;
+ }
unset($_POST['tries']);
$response = _quiz_question_response_get_instance($result_id, $question, $answ
@@ -861,4 +864,4 @@ function quiz_question_report_form($question, $showpoints, $
}
After the patch the function quiz_question_evaluate_question() definition would look as in drupalbin http://drupalbin.com/18963
How to use
Installing this module would show-up a new question type in quiz, Manage questions tab, under Create new question fieldset. Otherwise it follows the same flow as other question types.
Configuration
This module can work without any initial configuration, if you prefer to change the allowed file extensions, follow the instructions below,
- Navigate to Administer › Quiz management › Quiz settings or drupal path
admin/quiz/settings/questions_settings. - Set the default allowed extensions and score (this module does nothing great in regards to score).
Downloads
Project Information
- Maintenance status: Minimally maintained
- Development status: Maintenance fixes only
- Module categories: Evaluation/Rating
- Reported installs: 13 sites currently report using this module. View usage statistics.
- Downloads: 250
- Last modified: May 11, 2012
