MantisBT - ATutor
View Issue Details
0005072ATutorContentpublic2012-09-14 20:002013-02-11 12:03
greg 
greg 
normalminorhave not tried
closedfixed 
2.0.3 
2.12.1.1 
SVN
 638a0ff..8c7084e master -> master
0005072: Glossary paging code

The code used to display the glossary paging on the glossary tools page (/mods/_core/glossary/tools/index.php) is different than the code used for the manage glossary page (mods/_core/glossary/index.php). Since the functionality is the same it seems to me that the code and hence the HTML formatting should be the same. Here’s the code I’m talking about:

/mods/_core/glossary/tools/index.php:
if($num_pages > 1) {
echo _AT('page').': ';
for ($i=1; $i<=$num_pages; $i++) {
if ($i == $page) {
echo ''.$i.'';
} else {
echo ' | '.$_SERVER['PHP_SELF'].'?p='.$i.'#list';
}
}
}

mods/_core/glossary/index.php:
<?php
if($num_pages > 1):
?>
<div class="paging">

    <?php for ($i=1; $i<=$num_pages; $i++): ?>

  • <?php if ($i == $page) : ?>
    <a class="current" href="<?php echo url_rewrite('mods/_core/glossary/index.php?p='.$i.'#list'); ?>"><?php echo $i; ?></a>
    <?php else: ?>
    <a href="<?php echo url_rewrite('mods/_core/glossary/index.php?p='.$i.'#list'); ?>"><?php echo $i; ?></a>
    <?php endif; ?>

  • <?php endfor; ?>

</div>
<?php endif; ?>

Here’s the code I wrote to make it consistent on my site:
if($num_pages > 1) {
echo '<div class="paging">';
echo ''._AT('page').':
    ';
    for ($i=1; $i<=$num_pages; $i++) {
    echo '
  • ';
    if ($i == $page) {
    echo ''.$_SERVER['PHP_SELF'].'?p='.$i.'#list
  • ';
    }
    echo '
</div>';
}
http://atutor.ca/view/3/23551/1.html [^]
No tags attached.
Issue History
2012-09-14 20:00gregNew Issue
2012-09-14 20:00gregStatusnew => assigned
2012-09-14 20:00gregAssigned To => greg
2013-02-05 14:53gregSVN Revision# => 638a0ff..8c7084e master -> master
2013-02-05 14:53gregNote Added: 0005962
2013-02-05 14:53gregStatusassigned => resolved
2013-02-05 14:53gregFixed in Version => 2.1.1
2013-02-05 14:53gregResolutionopen => fixed
2013-02-11 12:03gregNote Added: 0005991
2013-02-11 12:03gregStatusresolved => closed

Notes
(0005962)
greg   
2013-02-05 14:53   
adjust pager to match the one students see
(0005991)
greg   
2013-02-11 12:03   
Closed for 2.1.1