clip: { autoPlay: false }, \r
plugins: { \r
controls: { \r
- all: false, \r
+ buttons:true, \r
play: true, \r
scrubber: true \r
} \r
* For instance: http://www.youtube.com/watch?v=a0ryB0m0MiM\r
* Otherwise, return the original send-in parameter.\r
*/\r
- function convertYoutubePlayURLToWatchURL($youtube_playURL) {\r
+ public function convertYoutubePlayURLToWatchURL($youtube_playURL) {\r
return preg_replace("/(http:\/\/[a-z0-9\.]*)?youtube.com\/v\/(.*)/",\r
"\\1youtube.com/watch?v=\\2", $youtube_playURL);\r
}\r
* For instance, http://www.youtube.com/v/a0ryB0m0MiM\r
* Otherwise, return the original send-in parameter.\r
*/\r
- function convertYoutubeWatchURLToPlayURL($youtube_watchURL) {\r
+ public function convertYoutubeWatchURLToPlayURL($youtube_watchURL) {\r
return preg_replace("/(http:\/\/[a-z0-9\.]*)?youtube.com\/watch\?v=(.*)/",\r
"\\1youtube.com/v/\\2", $youtube_watchURL);\r
}\r
$sql .= " AND srt.type_id=".$only_on_secondary_type;\r
}\r
$sql .= " ORDER BY pr.primary_resource_id, prt.type_id";\r
- \r
+ \r
$rows = $dao->execute($sql);\r
\r
if (!is_array($rows)) {\r
if (isset($top_num) && $top_num != (int) $top_num) {
$top_num = substr($top_num, 0, strpos($top_num, '.'));
}
-/*
-$shortcuts = array();
-if (((!$content_row['content_parent_id'] && ($_SESSION['packaging'] == 'top'))
- || ($_SESSION['packaging'] == 'all'))
- || (isset($_current_user) && $_current_user->isAuthor($_course_id))) {
- $shortcuts[] = array('title' => _AT('export_content'), 'url' => $_base_href . 'tools/ims/ims_export.php?cid='.$cid);
-}
-
-if (isset($_current_user) && $_current_user->isAuthor($_course_id)) {
- $shortcuts[] = array('title' => _AT('edit_this_page'), 'url' => $_base_href . 'home/editor/edit_content.php?_cid='.$cid);
-// $shortcuts[] = array('title' => _AT('add_top_folder'), 'url' => $_base_href . 'home/editor/edit_content_folder.php?_course_id='.$_course_id);
-
- if ($contentManager->_menu_info[$cid]['content_parent_id']) {
- $shortcuts[] = array('title' => _AT('add_sibling_folder'), 'url' => $_base_href .
- 'home/editor/edit_content_folder.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id);
- }
-// $shortcuts[] = array('title' => _AT('add_top_page'), 'url' => $_base_href . 'home/editor/edit_content.php?_course_id='.$_course_id);
- if ($contentManager->_menu_info[$cid]['content_parent_id']) {
- $shortcuts[] = array('title' => _AT('add_sibling_page'), 'url' => $_base_href .
- 'home/editor/edit_content.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id);
- }
- $shortcuts[] = array('title' => _AT('delete_this_page'), 'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$cid);
-}
-$savant->assign('shortcuts', $shortcuts);
-*/
-
-/*if (((!$content_row['content_parent_id'] && ($_SESSION['packaging'] == 'top'))
- || ($_SESSION['packaging'] == 'all'))
- || (isset($_current_user) && $_current_user->isAuthor($_course_id))) {
-
- $_tool_shortcuts[] = array(
- 'title' => _AT('export_content'),
- 'url' => $_base_href . 'home/imscc/ims_export.php?_cid='.$cid,
- 'icon' => $_base_href . 'images/download.png');
-}
-
-if (isset($_current_user) && $_current_user->isAuthor($_course_id)) {
- $_tool_shortcuts[] = array(
- 'title' => _AT('edit_this_page'),
- 'url' => $_base_href . 'home/editor/edit_content.php?_cid='.$cid,
- 'icon' => $_base_href . 'images/medit.gif');
-
- if ($contentManager->_menu_info[$cid]['content_parent_id']) {
- $_tool_shortcuts[] = array(
- 'title' => _AT('add_sibling_folder'),
- 'url' => $_base_href .
- 'home/editor/edit_content_folder.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id,
- 'icon' => $_base_href . 'images/folder_new_sibling.gif');
- }
- if ($contentManager->_menu_info[$cid]['content_parent_id']) {
- $_tool_shortcuts[] = array(
- 'title' => _AT('add_sibling_page'),
- 'url' => $_base_href .
- 'home/editor/edit_content.php?pid='.$contentManager->_menu_info[$cid]['content_parent_id'].SEP.'_course_id='.$_course_id,
- 'icon' => $_base_href . 'images/page_add_sibling.gif');
- }
- $_tool_shortcuts[] = array(
- 'title' => _AT('delete_this_page'),
- 'url' => $_base_href . 'home/editor/delete_content.php?_cid='.$cid,
- 'icon' => $_base_href . 'images/page_delete.gif');
-}*/
$_tool_shortcuts = ContentUtility::getToolShortcuts($content_row);
//if it has test and forum associated with it, still display it even if the content is empty
paste_from_file(body_text);
} else if (isset($_POST['submit']) && ($_POST['submit'] != 'submit1')) {
/* we're saving. redirects if successful. */
+ debug('here');exit;
save_changes(true, $current_tab);
}
if (isset($_POST['submit'])) {
/* we're saving. redirects if successful. */
+ debug('here');
save_changes(true, $current_tab);
}
$content_base_href = 'content/' . $_SESSION['course_id'] . '/';
}
}
-
+debug($content_base_href);exit;
if (($current_tab == 0) || ($current_tab == 2)) {
if ($_POST['formatting'] == null){
// this is a fresh load from just logged in
include_once(TR_INCLUDE_PATH.'classes/XML/XML_HTMLSax/XML_HTMLSax.php'); /* for XML_HTMLSax */
include_once(TR_INCLUDE_PATH.'classes/ContentOutputParser.class.php'); /* for parser */
- $body = ContentUtility::formatContent($content, $formatting,array());
+ $body = ContentUtility::formatContent($content, $formatting);
$handler = new ContentOutputParser();
$parser = new XML_HTMLSax();
// insert the new resources
foreach($resources as $primary_resource)
{
- if (!$a4a->getPrimaryResourceByName($primary_resource)){
+ if (!is_array($a4a->getPrimaryResourceByName($primary_resource))){
$a4a->setPrimaryResource($cid, $primary_resource, $_SESSION['lang']);
}
}