0

I have installed the Quiz module. Using the quiz module you can see the results of all the persons who have taken the quiz under node/*/results. Right now it shows shows the username of person in the table.

In the database I have a table that is called "profile_value" and there are some columns in it, "fid", "uid", "value".

Now I want to show the "value" of this where "fid" is equal to "1" and the user id is equal to "uid" instead of user-name in the result of the quizes.

I think I should be able to do this by changing the file theme/quiz-results-browser-body.tpl.php.

Am I right? How should I change it?

1 Answer 1

1

Generally speaking when you need to alter the output of a module, you need to override the theme function which is responsible for formatting the data you'd like to alter.

You can do this either by overriding the theme function within template.php within your theme (can get messy quite quickly with a lot of overrides), or by overriding the theme function within a custom module (I would rather recommend doing it this way).

There's plenty of reading material on the subject out there to get you started. Just remember never to hack away at the core or contrib module's theme functions!! :)

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.