How do i remove quiz summary from front page?

Events happening in the community are now at Drupal community events on www.drupal.org.
parsonsdigital's picture

The quiz module creates a summary on the index page of the quiz.

It looks something like:
Questions: 16
Attempts allowed: Unlimited
Available: Always
Pass rate: 75 %
Backwards navigation: Forbidden

How do I remove it?

Txs.

Comments

Override theme function

vegardjo's picture

There's no UI / configuration for doing this, but you can do it with overriding a theme function. The function you need to override is theme_quiz_view_stats which you find in quiz.pages.inc, line 567.

You can read more about overriding theme functions here: http://drupal.org/node/457740

Found it!

parsonsdigital's picture

Thanks.

Found line 567 "function theme_quiz_view_stats($node) {"

But what do I actually edit/change?

Sorry for dragging this out.

Mike

Override it

vegardjo's picture

First you would need to copy the entire function to your theme, and place it somewhere in your template.php file (located in the theme folder). Then you would have to rename the function to reflect your theme name, so if your theme is named "parsons" you would change theme_quiz_view_stats to parson_quiz_view_stats - now your theme controls what that function does, and not the quiz module.

Then there are several ways to manipulate the data in it, depending on php skills. The easiest way would be to uncomment / delete everything in the function and just add return ""; in the end, so the function would returns no data at all.

Thank You Vegardjo

Whoyas's picture

Much appreciation for you drupal ninjas!!

Drupal quiz front page table

jukka792's picture

Is there still easier way to remove that table? Maybe in UI ? Don't want to make custom modifications

Quiz

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week