$sql = "UPDATE ".TABLE_PREFIX."content SET ordering=ordering-1 WHERE ordering>=$ordering AND content_parent_id=$content_parent_id AND course_id=$_course_id";
$this->contentDAO->execute($sql);
+ // unset last-visited content id
+ require_once(TR_INCLUDE_PATH.'classes/DAO/UserCoursesDAO.class.php');
+ $userCoursesDAO = new UserCoursesDAO();
+ $userCoursesDAO->UpdateLastCid($_SESSION['user_id'], $_course_id, 0);
+
+ unset($_SESSION['s_cid']);
+ unset($_SESSION['from_cid']);
+
/* delete this content page */
// $sql = "DELETE FROM ".TABLE_PREFIX."content WHERE content_id=$content_id AND course_id=$_SESSION[course_id]";
// $result = mysql_query($sql, $this->db);
'home/editor/edit_content.php?pid='.$contentManager->_menu_info[$content_row['content_id']]['content_parent_id'].SEP.'_course_id='.$_course_id,\r
'icon' => $_base_href . 'images/add_sibling_page.gif');\r
\r
- if ($content_row['content_type'] == CONTENT_TYPE_CONTENT) {\r
+ if ($content_row['content_type'] == CONTENT_TYPE_CONTENT || $content_row['content_type'] == CONTENT_TYPE_WEBLINK) {\r
$tool_shortcuts[] = array(\r
'title' => _AT('delete_this_page'), \r
'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$content_row['content_id'],\r
$result = $contentManager->deleteContent($cid);
- unset($_SESSION['s_cid']);
- unset($_SESSION['from_cid']);
-
$msg->addFeedback('CONTENT_DELETED');
header('Location: '.TR_BASE_HREF.'home/course/index.php?_course_id='.$_course_id);
exit;