quiz navigation in QuizPort

quiz navigation in QuizPort

by Fritz Richter -
Number of replies: 7
Hi Gordon,

I created one QuizPort and three HotPot activities on your test site, that demonstrate the problem I am faced with.

As part of a QuizPort the HotPot quizzes are not displayed as they supposed to be, when one of the navigation options "navigation frame" or "embedded IFRAME" is selected. Both options doesn't have any effect compared to the option "navigation bar". As single HotPot quizzes however they do.

Do I get something wrong? I would be great, if you could take a quick look.

Thanks for your support,

Best R. Fritz


Average of ratings: -
In reply to Fritz Richter

Re: quiz navigation in QuizPort

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Dear Franz,
thanks very much for uploading the quizzes to my server. approve

The problem here is very simple: the "embedded IFRAME" and "navigation FRAME" options are not impemented yet in QuizPort. I do plan to put them in at some point. Probably I will have a time for it in December.

hoping you can wait a little longer smile
Gordon

In reply to Gordon Bateson

Re: quiz navigation in QuizPort

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Dear Franz,
it seems I was being a little over-cautious in my previous email. I had a look at what was involved and realized that it was basically a case of copying over some code from the HotPot module. So I did that and tidied it up and now "moodle navigation frame" and "Embedded IFRAME" work.

Actually, this functionality now works better than in QuizPort than it does in the HotPot module, so I need to go and fix up HotPot.

I think one reason I had not implemented this in QuizPort in the past, was that since the CSS (=stylesheets) are pretty well separated in QuizPort, they do not conflict with the Hot Potatoes CSS as much as they do in the HotPot module, so there is less need for the navigation frame and iframe. As I rememeber, my motivation for adding those to the HotPot module was to allow the styles to remain separate.

Anyway, QuizPort is all fixed up now so please download the latest version and enjoy!
Gordon
In reply to Gordon Bateson

Re: quiz navigation in QuizPort

by Fritz Richter -
Gordon, you are great, thanks a lot!

can you still let me know, where I can find the code in QuizPort that prints the page for the case HOTPOT_NAVIGATION_FRAME.

For normal HotPot quizzes this happens through view.php in the hotpot folder. Modifications I made there, however, does not have any effect to the display of HotPot quizzes inside a QuizPort. Am I correct and QuizPort uses its own code for the page setup?

Thanks again for your great support,

Best Fritz

In reply to Fritz Richter

Re: quiz navigation in QuizPort

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Fritz,
the pages containing the frames are printed here in the following script ...
  • mod/quizport/output/class.php
... by the following methods ...
  • print_frameset()
  • print_topframe_page()
  • print_iframe_page()
... which are called from the main print method of this class which is ...
  • generate()
Do you think your modifications would be useful to others? If you send them over to me we could think about a way to include them.

regards
Gordon

P.S. I just made a small but important change to "mod/quizport/output/class.php" so that it doesn't try to print frames when the QuizPort cron job is running. Please could you download the latest QuizPort when you have a chance.
In reply to Gordon Bateson

Re: quiz navigation in QuizPort

by Fritz Richter -
my modifications are only tiny cosmetics to the scrolling bar of the header and the border between topframe and mainframe. I found both rather ugly and don't see any reason so far to keep them:

print '<frameset rows='.$rows.',* border="0" frameborder="0" framespacing="0">'."\n";
print '<frame title="'.$title_top.'" src="'.$src_top.'" noresize scrolling="no">'."\n";
print '<frame title="'.$title_main.'" src="'.$src_main.'" noresize>'."\n";

Thanks for your support. Everthing is working well again.

Best Fritz
In reply to Fritz Richter

Re: quiz navigation in QuizPort

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Thanks for sharing the code modifications Fritz.

I have put them into QuizPort. By default they are not enabled, but if you add the following switch in your config.php, then the frames become "fixed" that is to say they lose the border, they are not resizeable and the top frame does not scroll.

Here's the switch to add to your config.php:
  • $CFG->quizport_fixedframes = true;
In due course I may add this to the QuizPort settings that can be changed via the Site administration -> Activities -> QuizPort page.

Please download the latest version QuizPort to get the new functionality:
best regards
Gordon
In reply to Gordon Bateson

Re: quiz navigation in QuizPort

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Fritz,
I went ahead and added two new QuizPort config settings for frames which you can modify via the Site administration -> Activities -> QuizPort page.
  • Frame height (default = 85)
    When a quiz is displayed within a frame, this value is the height (in pixels) of the top frame which contains the Moodle navigation bar.
  • Lock frame (default = No)
    If this setting is enabled, then the navagation frame, if used, will be locked so that it is not scrollable, not resizable and has no border
thanks again
Gordon