Bug #63
Disable Backbutton,Submit button not working in
| Status: | New | Start: | 03/18/2010 | |
| Priority: | High | Due date: | 03/19/2010 | |
| Assigned to: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.3.0 beta | Estimated time: | 4.00 hours | |
Description
How to clear the following problems
1.How to disable Backbutton,
2.'Submit answers' button not working in Quiz page.
Can anyone give an better reply??
History
Updated by lamine kacimi 147 days ago
Well the only way i am aware of when it comes to the backbutton or link, is to change the source. In your jquarks folder, go to views >quiz>tmpl->default.php.
Open the file default.php with any editor, go to line n°352, you will find the following comment
// adding the back next link if multi-pages
Well basically, you have three ifs. the first one deals with the first page of youe quiz and shows a next link in your page. so dont do anything with it (lines from 358 to 364).
The second if starts from line number 365 and ends in line number 369. This one deals with the last page of your quiz
here is the code:
echo '<span class="jquarks_qprog"><p align="center"><font size="+1"><a id="jquarksPage_' . $pNum . 'back" href="#">' . JText::_('BACK') . '</a></font></p>'. '<p align="center"><font size="+1">' . JText::_("PAGE") . ' ' . $pNum . ' / ' . $nbrPage .'</font></p>' .'</span></div>' ;
You wont find the same code in your installation since i changed mine a little bit to suit my needs. but all what you have to do is to change your code by the following:
echo'<span class="jquarks_qprog"><p align="center"><font size="+1">' . JText::_("PAGE") . ' ' . $pNum . ' / ' . $nbrPage .'</font></p>' .'</span></div>' ;//Now, the back button wont show up!
Now, lets go to the third 'if' which deals with the other pages of your quiz(not the first nor the last) but the pages in between. starting from line number 370.
As we did with the second if, We just have to change the code in this "if" by the following to make the back link disappear!
echo '<span class="jquarks_qprog"> <p align="center"> <font size="+1"><a id="jquarksPage_' . $pNum . 'next" href="#">' . JText::_('NEXT') . '</a></font></p>'. '<p align="center"><font size="+1">' . JText::_("PAGE") . ' ' . $pNum . ' / ' . $nbrPage .'</font></p>'.'</span></div>' ;
To center the BACK/NEXT link I added the font tag which is not XHTML compatible. but it's okay it worked fine for me.