code method is incorrect

tonyp
tonyp
  • tonyp
  • 6 months ago

So in;

/default/response/pagination.php

for the jumpto select you are using:

 

<option value="<?php echo $page->id?>"<?php echo $pagination->getActivePageId() == $page->id ? ' selected="selected"' : '';?>>

which uses:  $pagination->getActivePageId()  and this gets the DB inserted page id which is incremental, so in my case it is 5, great. But you don't start the quiz pages at five, you start at 0 so the above comparison fails as is never marked as selected. 

As a simple test on the foreach loop for the options I fired in some data- attributes to check the values and this is what we get:

data-page-id="5" data-page-active-id="0"

 

I've checked it twice and you should be using:

 

$pagination->getActivePageId() == $i


Access to viewing replies is restricted.
Showing 3 of 3 replies
You do not have permissions for replying to this topic.
Loading...
Confirm delete? This action is irreversible and the data will be deleted permanently. Do you want to continue? Confirm Add New Delete Unpublish Cancel Import Uninstall The selected item successfully deleted.
Shondalai