I can see from the code that this module could be capable of importing also multiple choise questions with feedback.
But I just can't manage to import any questions with feedback. (without feedback everything goes fine)

Documentation does not tell how to import also "feedback" with multiple choise questions using CSV.

I have tried many ways and one is like this:
guid| question| correct answer|feedback| wrong answer 1| wrong answer 2| wrong answer 3

Above is when I am trying to import a feedback of correct answer when not chosen.

Is this feedback importing enabled from the module or do I have wrongly formatted CSV?
Who could help ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jukka792’s picture

Issue summary: View changes

change

jukka792’s picture

Issue summary: View changes

spelling errors

jukka792’s picture

Issue summary: View changes

spelling errors

bisonbleu’s picture

Category: Support request » Feature request
Issue summary: View changes

I'm also looking for this functionality - my scope is narrower/simpler though: Multichoice questions; and I only need the generic Question Feedback (applies to all answers) not the individual Answer Feedback. Can someone guide me on this? I'll provide a patch when I'm done.

Thanks!

bisonbleu’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
19.83 KB

I was able to import Question Feedback with the following changes in qq_import.plugins.inc:254

/* Mapping for Question Feedback */
9 => array(
  'source' => 'feedback',
  'target' => 'feedback',
  'unique' => FALSE,
),

and in qq_import.module:84

/* Multichoice question feedback mapping target */
$targets['feedback'] = array(
  'name' => t('Question feedback'),
  'description' => t('Shows up in legend on mapping form.'),
  'callback' => 'qq_import_field_mapper',
);

I need help with one thing: how to display the Target Configuration options for setting the input Text Format like it is possible for the Question (body) field.

Target Configuration for input Text Format

bisonbleu’s picture

I think the issue with the Text format config widget not showing up is because of the way $form['feedback'] is setup in quiz_question.core.inc:144. Is there a way to update this?

Note - Select the default input format for the text fields of the nodes to be created. in the node processor settings of the importer has no effects on Question feedback Text format.

fibero’s picture

To make it work, I had to add another elseif block in function qq_import_field_mapper in qq_import.module file:

elseif ($mapping['target'] == 'feedback') {
  $entity->feedback['value'] = $value[0];
}

Plus code from #2.

Works with qq_import-7.x-1.2 and quiz-7.x-5.7