Hi,

I've been using the Quiz module to develop an e-learning module. I realise that this is not what Quiz is meant for, but Quiz seems to be the best tool for doing this in Drupal at the moment (I really like it by the way!).

I would like to request the possibility of changing text strings displayed such as "Start quiz" to custom strings.

I see there is the setting within Quiz to change what a "Quiz" is called, but that only seems to be relevant for administrating content.

It would be great if the Quiz module had a feature to replace text strings such as "quiz" (e.g. on the "Start quiz" button) with a custom string (so the button could read "Start training module")

Also, the string "Question Results" that appears on every page is slightly odd, especially when using a lot of Quiz Directions. Is it possible to control how this is displayed? I still want feedback displayed after every QUESTION but not after every DIRECTION.

At the moment I'm going to try and cheat it with css.

Thanks for a great module !

Comments

lejon’s picture

Just to be specific if more helpful, the main strings are:

In quiz.module
Line 845: '#value' => l(t('Start quiz'), 'node/'. $node->nid .'/take') ,
Line 877: '#value' => t('Start quiz'),

It would be nice to be able to have a custom string for "Start quiz"

And in quiz.pages
Line 428: $output .= t('Question !x of @y', array('!x' => $current_question, '@y' => $num_of_question));

It would be nice to have a custom string for "Question" so it could read "Page 5 of 20" or something similar.

artusamak’s picture

You can change the text of the Start quiz button by implementing the hook_form_alter().
Change the form with the id 'quiz_start_quiz_button_form' and change the #value of the button.
Something like that:

/**
 * Implements hook_form_alter().
 */
function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'quiz_start_quiz_button_form') {
    $form['button']['#value'] = t('Start the exercice');
  }
}

For the output of question !x on !y you have to override the theming template to be able to change that. Use the hook_theme() for that.

lejon’s picture

But is there anyway to achieve the first issue without hacking the Quiz module itself?

I guess this is something which would need to be offered as a new feature in 6.5

Theming we might be able to manage to deal with the second issue - thanks!

artusamak’s picture

The first issue is solved by creating a small module just implementing the code snippet i gave you, you just copy / paste it and replace "mymodule" by the name of the module you created in the function name. (If you don't know how to create module here is a link to start, it's really easy you just have two small files to create: http://drupal.org/node/206754).
Good luck.

cyigitemmy’s picture

Title: Using quiz as a learning or training tool - request to be able to modify text strings such as "start quiz" » How to Integrate CKEditor with Quiz so as to Format and Insert Pictures as part of the Questions
Version: 6.x-4.1 » 6.x-4.4
Component: Miscellaneous » Code - Quiz core
Category: feature » support
Priority: Normal » Critical

Dear All,

I quite appreciate this module so much!

But is there a way of integrating CKEditor with the module so that one can easily insert pictures into the questions and even format the questions.

Thanks.

djdevin’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)