http://www.atutor.ca/atutor/mantis/view.php?id=4458
authorCindy Li <cli@ocad.ca>
Tue, 10 Aug 2010 18:08:47 +0000 (18:08 -0000)
committerCindy Li <cli@ocad.ca>
Tue, 10 Aug 2010 18:08:47 +0000 (18:08 -0000)
docs/home/classes/ContentManager.class.php
docs/include/header.inc.php

index f36afd8..f98e828 100644 (file)
@@ -566,15 +566,10 @@ class ContentManager
                
                $first = $this->getNextContent(0); // get first
                
-               // if the given content id is invalid, use the content id of the first page
-               if (intval($cid) == 0 || !($row = $this->getContentPage($cid))) {
-                       $cid = $first['content_id'];
-               }
                if ($_SESSION['prefs']['PREF_NUMBERING'] && $first) {
                        $first['title'] = $this->getNumbering($first['content_id']).' '.$first['title'];
                }
                if ($first) {
-//                     $first['url'] = $_base_path.url_rewrite('content.php?cid='.$first['content_id']);
                        $first['url'] = $_base_path.'home/course/content.php?_cid='.$first['content_id'];
                        $sequence_links['first'] = $first;
                }
@@ -586,7 +581,6 @@ class ContentManager
                                $resume['title'] = $this->getNumbering($_SESSION['s_cid']).' ' . $resume['title'];
                        }
 
-//                     $resume['url'] = $_base_path.url_rewrite('content.php?cid='.$_SESSION['s_cid']);
                        $resume['url'] = $_base_path.'home/course/content.php?_cid='.$_SESSION['s_cid'];
                        
                        $sequence_links['resume'] = $resume;
@@ -601,10 +595,8 @@ class ContentManager
                                $next['title'] = $this->getNumbering($next['content_id']).' '.$next['title'];
                        }
 
-//                     $next['url'] = $_base_path.url_rewrite('content.php?cid='.$next['content_id']);
                        $next['url'] = $_base_path.'home/course/content.php?_cid='.$next['content_id'];
                        if (isset($previous['content_id'])) {
-//                             $previous['url'] = $_base_path.url_rewrite('content.php?cid='.$previous['content_id']);
                                $previous['url'] = $_base_path.'home/course/content.php?_cid='.$previous['content_id'];
                        }
                        
index 4a8d51f..9d33dcb 100644 (file)
@@ -74,7 +74,7 @@ if (isset($_pages[$current_page]['title'])) {
 $savant->assign('page_title', htmlspecialchars($_page_title, ENT_COMPAT, "UTF-8"));
 
 if ($_course_id > 0) {
-       $sequence_links = $contentManager->generateSequenceCrumbs($cid);
+       $sequence_links = $contentManager->generateSequenceCrumbs($_content_id);
        $savant->assign('sequence_links', $sequence_links);
 }