if (!defined('TR_INCLUDE_PATH')) { exit; }
require_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
-global $_course_id, $MaxCourseSize;
+global $_course_id, $MaxCourseSize, $_content_id;
+
$editable_file_types = array('txt', 'html', 'htm', 'xml', 'css', 'asc', 'csv', 'sql');
$_SESSION['prefs']['PREF_CONTENT_EDITOR'] = 1;
$framed = intval($_GET['framed']);
$popup = intval($_GET['popup']);
$cp = $_GET['cp'];
-$cid = intval($_GET['cid']); // content id, used at "adapted content" page, => add/edit alternatives
+$cid = $_content_id; // content id, used at "adapted content" page, => add/edit alternatives
$pid = intval($_GET['pid']); // primary resource id, used at "adapted content" page, => add/edit alternatives
$a_type = intval($_GET['a_type']); // alternative_type, used at "adapted content" page, => add/edit alternatives
echo '<p>'._AT('current_path').' ';
if (isset($pathext) && $pathext != '') {
- echo '<a href="'.$_SERVER['PHP_SELF'].'?popup=' . $popup . SEP . 'framed=' . $framed.SEP . 'cp=' . $cp.SEP . 'cid=' . $cid.SEP . 'pid=' . $pid.SEP . 'a_type=' . $a_type.SEP.'_course_id='.$_course_id.'">'._AT('home').'</a> ';
+ echo '<a href="'.$_SERVER['PHP_SELF'].'?popup=' . $popup . SEP . 'framed=' . $framed.SEP . 'cp=' . $cp.SEP . '_cid=' . $cid.SEP . 'pid=' . $pid.SEP . 'a_type=' . $a_type.SEP.'_course_id='.$_course_id.'">'._AT('home').'</a> ';
}
else {
$pathext = '';
if ($bit_path == $pathext) {
echo $bit;
} else {
- echo '<a href="'.$_SERVER['PHP_SELF'].'?pathext=' . urlencode($bit_path) . SEP . 'popup=' . $popup . SEP . 'framed=' . $framed . SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'">' . $bit . '</a>';
+ echo '<a href="'.$_SERVER['PHP_SELF'].'?pathext=' . urlencode($bit_path) . SEP . 'popup=' . $popup . SEP . 'framed=' . $framed . SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'_cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'">' . $bit . '</a>';
}
}
}
// make new directory
echo '<div class="input-form"><fieldset class="group_form"><legend class="group_form">'._AT('add_file_folder').'</legend>'."\n";
echo ' <div class="row">'."\n";
- echo ' <form name="form1" method="post" action="'.$_SERVER['PHP_SELF'].'?'.(($pathext != '') ? 'pathext='.urlencode($pathext).SEP : ''). 'popup='.$popup.SEP.'cp='.SEP.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'">'."\n";
+ echo ' <form name="form1" method="post" action="'.$_SERVER['PHP_SELF'].'?'.(($pathext != '') ? 'pathext='.urlencode($pathext).SEP : ''). 'popup='.$popup.SEP.'cp='.SEP.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'_cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'">'."\n";
if( $MakeDirOn ) {
if ($depth < $MaxDirDepth) {
echo ' <label for="dirname">'._AT('create_folder_here').'</label><br />'."\n";
echo ' <input type="text" name="dirname" id="dirname" size="20" /> '."\n";
echo ' <input type="hidden" name="mkdir_value" value="true" /> '."\n";
echo ' <input type="hidden" name="_course_id" value="'.$_course_id.'" /> '."\n";
+ if ($cid > 0) echo ' <input type="hidden" name="_cid" value="'.$cid.'" /> '."\n";
echo ' <input type="submit" name="mkdir" value="'._AT('create_folder').'" class="button" />'."\n";
} else {
echo _AT('depth_reached')."\n";
}
// Simple single file uploader
- echo '<form onsubmit="openWindow(\''.TR_BASE_HREF.'home/prog.php\');" class="fl-ProgEnhance-basic" name="form1" method="post" action="file_manager/upload.php?popup='.$popup.SEP. 'framed='.$framed.SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'" enctype="multipart/form-data">';
+ echo '<form onsubmit="openWindow(\''.TR_BASE_HREF.'home/prog.php\');" class="fl-ProgEnhance-basic" name="form1" method="post" action="file_manager/upload.php?popup='.$popup.SEP. 'framed='.$framed.SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'_cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'" enctype="multipart/form-data">';
echo '<input type="hidden" name="MAX_FILE_SIZE" value="'.$my_MaxFileSize.'" />';
echo '<label for="uploadedfile">'._AT('upload_files').'</label>'."\n";
echo '<input type="file" name="uploadedfile" id="uploadedfile" class="formfield" size="20" /> ';
}
// Directory and File listing
-echo '<form name="checkform" action="'.$_SERVER['PHP_SELF'].'?'.(($pathext!='') ? 'pathext='.urlencode($pathext).SEP : '').'popup='.$popup .SEP. 'framed='.$framed.SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'cid='.$cid.SEP.'a_type='.$a_type.'" method="post">';
+echo '<form name="checkform" action="'.$_SERVER['PHP_SELF'].'?'.(($pathext!='') ? 'pathext='.urlencode($pathext).SEP : '').'popup='.$popup .SEP. 'framed='.$framed.SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'_cid='.$cid.SEP.'a_type='.$a_type.'" method="post">';
echo '<input type="hidden" name="pathext" value ="'.$pathext.'" />';
echo '<input type="hidden" name="_course_id" value ="'.$_course_id.'" />';
+if ($cid > 0) echo '<input type="hidden" name="_cid" value ="'.$cid.'" />';
?>
<table class="data static" summary="" border="0" rules="groups" style="width: 90%">
<thead>
if($pathext) : ?>
<tr>
- <td colspan="5"><a href="<?php echo $_SERVER['PHP_SELF'].'?back=1'.SEP.'pathext='.$pathext.SEP. 'popup=' . $popup .SEP. 'framed=' . $framed .SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'cid='.$cid.SEP.'a_type='.$a_type; ?>"><img src="images/arrowicon.gif" border="0" height="11" width="10" alt="" /> <?php echo _AT('back'); ?></a></td>
+ <td colspan="5"><a href="<?php echo $_SERVER['PHP_SELF'].'?back=1'.SEP.'pathext='.$pathext.SEP. 'popup=' . $popup .SEP. 'framed=' . $framed .SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'_cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id; ?>"><img src="images/arrowicon.gif" border="0" height="11" width="10" alt="" /> <?php echo _AT('back'); ?></a></td>
</tr>
<?php endif; ?>
<?php
if(is_dir($current_path.$pathext.$file)) {
$size = FileUtility::dirsize($current_path.$pathext.$file.'/');
$totalBytes += $size;
- $filename = '<a href="'.$_SERVER['PHP_SELF'].'?pathext='.urlencode($pathext.$file.'/'). SEP . 'popup=' . $popup . SEP . 'framed='. $framed . SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'">'.$file.'</a>';
+ $filename = '<a href="'.$_SERVER['PHP_SELF'].'?pathext='.urlencode($pathext.$file.'/'). SEP . 'popup=' . $popup . SEP . 'framed='. $framed . SEP.'cp='.$_GET['cp'].SEP.'pid='.$_GET['pid'].SEP.'_cid='.$cid.SEP.'a_type='.$a_type.SEP.'_course_id='.$_course_id.'">'.$file.'</a>';
$fileicon = ' ';
$fileicon .= '<img src="images/folder.gif" alt="'._AT('folder').':'.$file.'" height="18" width="20" class="img-size-fm1" />';
$fileicon .= ' ';
if (ext == "gif" || ext == "jpg" || ext == "jpeg" || ext == "png") {
var info = "<?php echo _AT('alternate_text'); ?>";
var html = '<img src="' + pathTo+fileName + '" border="0" alt="' + info + '" />';
- } else if (ext == "mpg" || ext == "avi" || ext == "wmv" || ext == "mov" || ext == "swf" || ext == "mp3" || ext == "wav" || ext == "ogg" || ext == "mid") {
+ } else if (ext == "mpg" || ext == "avi" || ext == "wmv" || ext == "mov" || ext == "swf" || ext == "mp3" || ext == "wav" || ext == "ogg" || ext == "mid" ||ext == "flv"|| ext == "mp4") {
var html = '[media]'+ pathTo + fileName + '[/media]';
} else {
var info = "<?php echo _AT('put_link'); ?>";
// 2. set the according field in opener window to the selected file
// 3. close file manager itself
function setAlternative(file, file_preview_link, cid, pid, a_type) {
- jQuery.post("<?php echo TR_BASE_HREF; ?>home/course/save_alternative.php",
- {"pid":pid, "a_type":a_type, "alternative":file, "course_id":$_course_id},
+ jQuery.post("<?php echo TR_BASE_HREF; ?>home/editor/save_alternative.php",
+ {"pid":pid, "a_type":a_type, "alternative":file},
function(data) {});
link_html = '\
<a href="'+file_preview_link+'" title="<?php echo _AT('new_window'); ?>" target="_new">'+file+'</a><br /> \
- <a href="#" onclick="trans.utility.poptastic(\\\'<?php echo TR_BASE_HREF; ?>file_manager/index.php?framed=1<?php echo SEP; ?>popup=1<?php echo SEP; ?>cp=<?php echo $cp.SEP; ?>cid='+cid+'<?php echo SEP; ?>pid='+pid+'<?php echo SEP; ?>a_type='+a_type+'<?php echo SEP; ?>_course_id=<?php echo $_course_id; ?>\\\');return false;" title="<?php echo _AT('new_window'); ?>"> \
- <img src="<?php echo TR_BASE_HREF; ?>images/home-tests_sm.png" border="0" title="<?php echo _AT('alter'); ?>" alt="<?php echo _AT('alter'); ?>" /> \
+ <a href="#" onclick="trans.utility.poptastic(\\\'<?php echo TR_BASE_HREF; ?>file_manager/index.php?framed=1<?php echo SEP; ?>popup=1<?php echo SEP; ?>cp=<?php echo $cp.SEP; ?>_cid='+cid+'<?php echo SEP; ?>pid='+pid+'<?php echo SEP; ?>a_type='+a_type+'\\\');return false;" title="<?php echo _AT('new_window'); ?>"> \
+ <img src="<?php echo TR_BASE_HREF; ?>images/alter.png" border="0" title="<?php echo _AT('alter'); ?>" alt="<?php echo _AT('alter'); ?>" /> \
</a> \
<a href="#" onclick="removeAlternative(\\\'<?php echo $cp; ?>\\\', '+cid+','+pid+','+a_type+');return false;"> \
- <img src="<?php echo TR_BASE_HREF; ?>images/icon_delete.gif" border="0" title="<?php echo _AT('remove'); ?>" alt="<?php echo _AT('remove'); ?>" /> \
+ <img src="<?php echo TR_BASE_HREF; ?>images/remove.gif" border="0" title="<?php echo _AT('remove'); ?>" alt="<?php echo _AT('remove'); ?>" /> \
</a> \
</div> \
';
// and close "file manager" once the upload is successful
if ($a_type > 0 && isset($_GET['uploadfile']) && $_GET['uploadfile'] <> '') { ?>
function setAlternativeAndClose() {
- setAlternative('<?php echo get_relative_path($_GET['cp'], $pathext).$_GET['uploadfile']; ?>', '<?php echo TR_BASE_HREF.$get_file.$pathext.urlencode($_GET['uploadfile']); ?>', '<?php echo $cid; ?>', '<?php echo $pid; ?>', '<?php echo $a_type; ?>');
+ setAlternative('<?php echo get_relative_path($_GET['cp'], $pathext).$_GET['uploadfile']; ?>', '<?php echo TR_BASE_HREF.$get_file.$pathext.urlencode($_GET['uploadfile']); ?>', '<?php echo $_content_id; ?>', '<?php echo $pid; ?>', '<?php echo $a_type; ?>');
window.close();
}
* @access public\r
* @param $cid: content id.\r
* @param $content: the original content page ($content_row['text'], from content.php).\r
+ * @param $info_only: when "true", return the array of info (has_text_alternative, has_audio_alternative, has_visual_alternative, has_sign_lang_alternative)\r
+ * @param $only_on_secondary_type: \r
* @return string $content: the content page with the appropriated resources.\r
* @see $db from include/vitals.inc.php\r
* @author Cindy Qi Li\r
*/\r
- public static function applyAlternatives($cid, $content){\r
+ public static function applyAlternatives($cid, $content, $info_only = false, $only_on_secondary_type = 0){\r
global $db, $_course_id;\r
\r
include_once(TR_INCLUDE_PATH.'classes/DAO/DAO.class.php');\r
$dao = new DAO();\r
\r
- $vidoe_exts = array("mpg", "avi", "wmv", "mov", "swf", "mp3", "wav", "ogg", "mid");\r
+ $video_exts = array("mpg", "avi", "wmv", "mov", "swf", "mp3", "wav", "ogg", "mid", "mp4", "flv");\r
$txt_exts = array("txt", "html", "htm");\r
- \r
- if (($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_TEXT']==0) && ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_AUDIO']==0) && ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_VISUAL']==0)) \r
+ $image_exts = array("gif", "bmp", "png", "jpg", "jpeg", "png", "tif");\r
+ $only_on_secondary_type = intval($only_on_secondary_type);\r
+ \r
+ // intialize the 4 returned values when $info_only is on\r
+ if ($info_only)\r
+ {\r
+ $has_text_alternative = false;\r
+ $has_audio_alternative = false;\r
+ $has_visual_alternative = false;\r
+ $has_sign_lang_alternative = false;\r
+ }\r
+\r
+ if (!$info_only && !$only_on_secondary_type && \r
+ ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_TEXT']==0) && \r
+ ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_AUDIO']==0) && \r
+ ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_VISUAL']==0)) \r
{\r
//No user's preferences related to content format are declared\r
- return $content;\r
+ if (!$info_only) {\r
+ return $content;\r
+ } else {\r
+ return array($has_text_alternative, $has_audio_alternative, $has_visual_alternative, $has_sign_lang_alternative);\r
+ }\r
}\r
\r
// get all relations between primary resources and their alternatives\r
WHERE pr.content_id=".$cid."\r
AND pr.primary_resource_id = prt.primary_resource_id\r
AND pr.primary_resource_id = sr.primary_resource_id\r
- AND sr.language_code='".$_SESSION['prefs']['PREF_ALT_AUDIO_PREFER_LANG']."'\r
+ AND sr.language_code='".$_SESSION['lang']."'\r
AND sr.secondary_resource_id = srt.secondary_resource_id\r
- AND pr.content_id = c.content_id\r
- ORDER BY pr.primary_resource_id, prt.type_id";\r
+ AND pr.content_id = c.content_id";\r
+ if ($only_on_secondary_type > 0) {\r
+ $sql .= " AND srt.type_id=".$only_on_secondary_type;\r
+ }\r
+ $sql .= " ORDER BY pr.primary_resource_id, prt.type_id";\r
\r
$rows = $dao->execute($sql);\r
\r
\r
foreach ($rows as $row) \r
{\r
- if (($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_TEXT']==1 && $row['primary_type']==3 &&\r
+ if ($info_only || $only_on_secondary_type ||\r
+ ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_TEXT']==1 && $row['primary_type']==3 &&\r
($_SESSION['prefs']['PREF_ALT_TO_TEXT']=="audio" && $row['secondary_type']==1 || \r
$_SESSION['prefs']['PREF_ALT_TO_TEXT']=="visual" && $row['secondary_type']==4 || \r
$_SESSION['prefs']['PREF_ALT_TO_TEXT']=="sign_lang" && $row['secondary_type']==2)) ||\r
$ext = substr($row['secondary_resource'], strrpos($row['secondary_resource'], '.')+1);\r
\r
// alternative is video\r
- if (in_array($ext, $vidoe_exts))\r
+ if (in_array($ext, $video_exts))\r
$target = '[media]'.$row['secondary_resource'].'[/media]';\r
// a text primary to be replaced by a visual alternative \r
else if (in_array($ext, $txt_exts))\r
{\r
- if (substr($row['secondary_resource'], 0, 2) == '..') \r
- $file_location = substr($row['secondary_resource'], 3);\r
+ if ($row['content_path'] <> '') \r
+ $file_location = $row['content_path'].'/'.$row['secondary_resource'];\r
else \r
$file_location = $row['secondary_resource'];\r
- $file .= $file_location;\r
\r
- if ($row['content_path'] <> '') {\r
- $file = TR_CONTENT_DIR.$_course_id . '/'.$row['content_path'].'/'.$file_location;\r
- }\r
- else {\r
- $file = TR_CONTENT_DIR.$_course_id . '/'.$file_location;\r
- }\r
- $target = file_get_contents($file);\r
+ $file = TR_CONTENT_DIR.$_SESSION['course_id'] . '/'.$file_location;\r
+ $target = '<br />'.file_get_contents($file);\r
\r
// check whether html file\r
if (preg_match('/.*\<html.*\<\/html\>.*/s', $target))\r
if (defined('TR_FORCE_GET_FILE') && TR_FORCE_GET_FILE) {\r
$course_base_href = 'get.php/';\r
} else {\r
- $course_base_href = 'content/' . $_course_id . '/';\r
+ $course_base_href = 'content/' . $_SESSION['course_id'] . '/';\r
}\r
\r
$file = TR_BASE_HREF . $course_base_href.$file_location;\r
$target = nl2br($target);\r
}\r
} \r
- else if ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_TEXT']==1 \r
- && $_SESSION['prefs']['PREF_ALT_TO_TEXT']=="visual")\r
- $target = '<img border="0" alt="Alternate Text" src="'.$row['secondary_resource'].'"/>';\r
+ else if (in_array($ext, $image_exts))\r
+ $target = '<img border="0" alt="'._AT('alternate_text').'" src="'.$row['secondary_resource'].'"/>';\r
// otherwise\r
else\r
$target = '<p><a href="'.$row['secondary_resource'].'">'.$row['secondary_resource'].'</a></p>';\r
- \r
+ \r
// replace or append the target alternative to the source\r
if (($row['primary_type']==3 && $_SESSION['prefs']['PREF_ALT_TO_TEXT_APPEND_OR_REPLACE'] == 'replace') ||\r
($row['primary_type']==1 && $_SESSION['prefs']['PREF_ALT_TO_AUDIO_APPEND_OR_REPLACE']=='replace') ||\r
$pattern_replace_to = '${1}'.$target.'${3}';\r
else\r
$pattern_replace_to = '${1}${2}'.$target.'${3}';\r
- \r
+ \r
+ // *** Alternative replace/append starts from here ***\r
+ $img_processed = false; // The indicator to tell the source image is found (or not) \r
+ // and processed (or not) in an <img> tag. If found and processed, \r
+ // SKIP the found/process for <a> tag because the source is a image\r
+ // and <a> is very likely the tag wrapping around <img>\r
+\r
// append/replace target alternative to [media]source[/media]\r
- $content = preg_replace("/(.*)(".preg_quote("[media]".$row['resource']."[/media]", "/").")(.*)/s", \r
+ if (preg_match("/".preg_quote("[media").".*".preg_quote("]".$row['resource']."[/media]", "/")."/sU", $content))\r
+ {\r
+ if (!$info_only) {\r
+ $content = preg_replace("/(.*)(".preg_quote("[media").".*".preg_quote("]".$row['resource']."[/media]", "/").")(.*)/sU", \r
$pattern_replace_to, $content);\r
+ } else {\r
+ if ($row['secondary_type'] == 1) $has_audio_alternative = true;\r
+ if ($row['secondary_type'] == 2) $has_sign_lang_alternative = true;\r
+ if ($row['secondary_type'] == 3) $has_text_alternative = true;\r
+ if ($row['secondary_type'] == 4) $has_visual_alternative = true;\r
+ }\r
+ }\r
\r
- // append/replace target alternative to <a>...source...</a> or <a ...source...>...</a>\r
- if (preg_match("/\<a.*".preg_quote($row['resource'], "/").".*\<\/a\>/s", $content))\r
+ // append/replace target alternative to <img ... src="source" ...></a>\r
+ if (preg_match("/\<img.*src=\"".preg_quote($row['resource'], "/")."\".*\/\>/sU", $content))\r
{\r
- $content = preg_replace("/(.*)(\<a.*".preg_quote($row['resource'], "/").".*\<\/a\>)(.*)/s", \r
+ $img_processed = true;\r
+ if (!$info_only) {\r
+ $content = preg_replace("/(.*)(\<img.*src=\"".preg_quote($row['resource'], "/")."\".*\/\>)(.*)/sU", \r
$pattern_replace_to, $content);\r
+ } else {\r
+ if ($row['secondary_type'] == 1) $has_audio_alternative = true;\r
+ if ($row['secondary_type'] == 2) $has_sign_lang_alternative = true;\r
+ if ($row['secondary_type'] == 3) $has_text_alternative = true;\r
+ if ($row['secondary_type'] == 4) $has_visual_alternative = true;\r
+ }\r
}\r
- \r
- // append/replace target alternative to <img ... src="source" ...></a>\r
- if (preg_match("/\<img.*src=\"".preg_quote($row['resource'], "/")."\".*\/\>/s", $content))\r
+ \r
+ // append/replace target alternative to <a>...source...</a> or <a ...source...>...</a>\r
+ // skip this "if" when the source object has been processed in aboved <img> tag\r
+ if (!$img_processed && preg_match("/\<a.*".preg_quote($row['resource'], "/").".*\<\/a\>/sU", $content))\r
{\r
- $content = preg_replace("/(.*)(\<img.*src=\"".preg_quote($row['resource'], "/")."\".*\/\>)(.*)/s", \r
+ if (!$info_only) {\r
+ $content = preg_replace("/(.*)(\<a.*".preg_quote($row['resource'], "/").".*\<\/a\>)(.*)/sU", \r
$pattern_replace_to, $content);\r
+ } else {\r
+ if ($row['secondary_type'] == 1) $has_audio_alternative = true;\r
+ if ($row['secondary_type'] == 2) $has_sign_lang_alternative = true;\r
+ if ($row['secondary_type'] == 3) $has_text_alternative = true;\r
+ if ($row['secondary_type'] == 4) $has_visual_alternative = true;\r
+ }\r
}\r
- \r
+ \r
// append/replace target alternative to <object ... source ...></object>\r
- if (preg_match("/\<object.*".preg_quote($row['resource'], "/").".*\<\/object\>/s", $content))\r
+ if (preg_match("/\<object.*".preg_quote($row['resource'], "/").".*\<\/object\>/sU", $content))\r
{\r
- $content = preg_replace("/(.*)(\<object.*".preg_quote($row['resource'], "/").".*\<\/object\>)(.*)/s", \r
+ if (!$info_only) {\r
+ $content = preg_replace("/(.*)(\<object.*".preg_quote($row['resource'], "/").".*\<\/object\>)(.*)/sU", \r
$pattern_replace_to, $content);\r
+ } else {\r
+ if ($row['secondary_type'] == 1) $has_audio_alternative = true;\r
+ if ($row['secondary_type'] == 2) $has_sign_lang_alternative = true;\r
+ if ($row['secondary_type'] == 3) $has_text_alternative = true;\r
+ if ($row['secondary_type'] == 4) $has_visual_alternative = true;\r
+ }\r
}\r
\r
// append/replace target alternative to <embed ... source ...>\r
- if (preg_match("/\<embed.*".preg_quote($row['resource'], "/").".*\>/s", $content))\r
+ if (preg_match("/\<embed.*".preg_quote($row['resource'], "/").".*\>/sU", $content))\r
{\r
- $content = preg_replace("/(.*)(\<embed.*".preg_quote($row['resource'], "/").".*\>)(.*)/s", \r
+ if (!$info_only) {\r
+ $content = preg_replace("/(.*)(\<embed.*".preg_quote($row['resource'], "/").".*\>)(.*)/sU", \r
$pattern_replace_to, $content);\r
+ } else {\r
+ if ($row['secondary_type'] == 1) $has_audio_alternative = true;\r
+ if ($row['secondary_type'] == 2) $has_sign_lang_alternative = true;\r
+ if ($row['secondary_type'] == 3) $has_text_alternative = true;\r
+ if ($row['secondary_type'] == 4) $has_visual_alternative = true;\r
+ }\r
}\r
}\r
}\r
- return $content;\r
+ \r
+ if (!$info_only) {\r
+ return $content;\r
+ } else {\r
+ return array($has_text_alternative, $has_audio_alternative, $has_visual_alternative, $has_sign_lang_alternative);\r
+ }\r
} \r
\r
/**\r
exit;
}
if (defined('TR_FORCE_GET_FILE') && TR_FORCE_GET_FILE) {
- $_SESSION['course_id'] = $cid; // used by get.php
+ $_SESSION['course_id'] = $_course_id; // used by get.php
}
/* show the content page */
$msg->addInfo('NO_PAGE_CONTENT');
$savant->assign('body', '');
} else {
+ // find whether the body has alternatives defined
+ list($has_text_alternative, $has_audio_alternative, $has_visual_alternative, $has_sign_lang_alternative)
+ = ContentUtility::applyAlternatives($cid, $content_row['text'], true);
- //Silvia: to provide appropriated content on the basis of users' preferences
- $content = ContentUtility::applyAlternatives($cid, $content_row['text']);
+ // apply alternatives
+ if (intval($_GET['alternative']) > 0) {
+ $content = ContentUtility::applyAlternatives($cid, $content_row['text'], false, intval($_GET['alternative']));
+ } else {
+ $content = ContentUtility::applyAlternatives($cid, $content_row['text']);
+ }
$content = ContentUtility::formatContent($content, $content_row['formatting']);
$savant->assign('content_table', $content_array[0]);
$savant->assign('body', $content_array[1]);
-
+ $savant->assign('has_text_alternative', $has_text_alternative);
+ $savant->assign('has_audio_alternative', $has_audio_alternative);
+ $savant->assign('has_visual_alternative', $has_visual_alternative);
+ $savant->assign('has_sign_lang_alternative', $has_sign_lang_alternative);
+ $savant->assign('cid', $cid);
+
//assign test pages if there are tests associated with this content page
if (!empty($content_test_ids)){
$savant->assign('test_message', $content_row['test_message']);
$dao = new DAO();
$resourceTypesDAO = new ResourceTypesDAO();
+
+global $_content_id;
+$cid = $_content_id;
+
/**
* This function returns the preview link of the given file
* @param $file the file location in "file manager"
* @param $secondary_result mysql result of all secondary alternatives
* $alternative type the resource type of the alternative to display. Must be one of the values in resource_types.type_id
* $content_id used to pass into file_manager/index.php
- * $ps used to pass into file_manager/index.php
+ * $pid primary resource id
+ * $td_header_id the id of the table header cell, to comply with accessibility rule
* @return html of the table cell "<td>...</td>"
*/
function display_alternative_cell($secondary_resources, $alternative_type, $content_id, $pid, $td_header_id)
{
- global $content_row;
+ global $content_row, $_course_id;
$found_alternative = false;
{
echo ' <div id="'.$pid.'_'.$alternative_type.'">'."\n";
echo ' <a href="'.get_preview_link($secondary_resource['secondary_resource']).'" title="'._AT('new_window').'" target="_new">'.$secondary_resource['secondary_resource'].'</a><br />'."\n";
- echo ' <a href="#" onclick="trans.utility.poptastic(\''.TR_BASE_HREF.'file_manager/index.php?framed=1'. SEP.'popup=1'. SEP.'cp='. $content_row['content_path'].SEP.'cid='.$content_id.SEP.'pid='.$pid.SEP.'a_type='.$alternative_type.'\');return false;" title="'._AT('new_window').'">'."\n";
- echo ' <img src="'.TR_BASE_HREF.'images/home-tests_sm.png" border="0" title="'._AT('alter').'" alt="'._AT('alter').'" />'."\n";
+ echo ' <a href="#" onclick="trans.utility.poptastic(\''.TR_BASE_HREF.'file_manager/index.php?framed=1'. SEP.'popup=1'. SEP.'cp='. $content_row['content_path'].SEP.'_cid='.$content_id.SEP.'pid='.$pid.SEP.'a_type='.$alternative_type.'\');return false;" title="'._AT('new_window').'">'."\n";
+ echo ' <img src="'.TR_BASE_HREF.'images/alter.png" border="0" title="'._AT('alter').'" alt="'._AT('alter').'" />'."\n";
echo ' </a>'."\n";
echo ' <a href="#" onclick="removeAlternative(\''.$content_row['content_path'].'\', '.$content_id.','.$pid.','.$alternative_type.');return false;">'."\n";
- echo ' <img src="'.TR_BASE_HREF.'images/icon_delete.gif" border="0" title="'._AT('remove').'" alt="'._AT('remove').'" />'."\n";
+ echo ' <img src="'.TR_BASE_HREF.'images/remove.gif" border="0" title="'._AT('remove').'" alt="'._AT('remove').'" />'."\n";
echo ' </a>'."\n";
echo ' </div>'."\n";
$found_alternative = true;
if (!$found_alternative)
{
echo ' <div id="'.$pid.'_'.$alternative_type.'">'."\n";
- echo ' <input type="button" value="'._AT('add').'" title="'._AT('new_window').'" onclick="trans.utility.poptastic(\''.TR_BASE_HREF.'file_manager/index.php?framed=1'. SEP.'popup=1'. SEP.'cp='. $content_row['content_path'].SEP.'cid='.$content_id.SEP.'pid='.$pid.SEP.'a_type='.$alternative_type.'\');return false;" />'."\n";
+ echo ' <input type="button" value="'._AT('add').'" title="'._AT('new_window').'" onclick="trans.utility.poptastic(\''.TR_BASE_HREF.'file_manager/index.php?framed=1'. SEP.'popup=1'. SEP.'cp='. $content_row['content_path'].SEP.'_cid='.$content_id.SEP.'pid='.$pid.SEP.'a_type='.$alternative_type.'\');return false;" />'."\n";
echo ' </div>'."\n";
}
echo ' </td>'."\n";
// $resource_types_result = mysql_query($sql, $db);
$resource_types = $resourceTypesDAO->getAll();
- echo '<table class="data" rules="all" style="width:100%">'."\n";
+ echo '<br /><table class="data" rules="all">'."\n";
echo ' <thead>'."\n";
echo ' <tr>'."\n";
echo ' <th rowspan="2" id="header1">'._AT('original_resource').'</th>'."\n";
AND language_code = '".$_SESSION['lang']."'
AND resource='".$primary_resource."'";
// $primary_result = mysql_query($sql, $db);
- $primary_resources = $dao->execute($sql);
-
- if (is_array($primary_resources)) $num_of_primary_resources = count($primary_resources);
+ $existing_primary_resource = $dao->execute($sql);
+
// insert primary resource if it's not in db
- if ($num_of_primary_resources == 0)
+ if (!is_array($existing_primary_resource))
// if (mysql_num_rows($primary_result) == 0)
{
$sql = "INSERT INTO ".TABLE_PREFIX."primary_resources (content_id, resource, language_code)
VALUES (".$cid.", '".$primary_resource."', '".$_SESSION['lang']."')";
// $result = mysql_query($sql, $db);
- $dao->execute($sql);
- $primary_resource_id = mysql_insert_id();
+ $primary_resource_id = $dao->execute($sql);
}
else
{
// get primary resource id
// $primary_resource_row = mysql_fetch_assoc($primary_result);
- $primary_resource_id = $primary_resources['primary_resource_id'];
+ $primary_resource_id = $existing_primary_resource[0]['primary_resource_id'];
}
+
$sql = "SELECT prt.type_id, rt.type
FROM ".TABLE_PREFIX."primary_resources pr, ".
TABLE_PREFIX."primary_resources_types prt, ".
// mysql_data_seek($resource_types_result, 0); // move the mysql result cursor back to the first row
// while ($resource_type = mysql_fetch_assoc($resource_types_result))
- if (is_array($secondary_resources))
+ if (is_array($resource_types))
{
- foreach ($secondary_resources as $resource_type) {
+ foreach ($resource_types as $resource_type) {
if ($resource_type['type'] == 'sign_language')
continue;
else
}
}
else {
- if (mysql_num_rows($primary_type_result)> 0) mysql_data_seek($primary_type_result, 0);
- while ($primary_resource_type = mysql_fetch_assoc($primary_type_result)) {
- if ($primary_resource_type['type_id'] == $resource_type['type_id']){
- echo 'checked="checked"';
- break;
+ if (is_array($primary_types)) {
+ foreach ($primary_types as $primary_resource_type) {
+ if ($primary_resource_type['type_id'] == $resource_type['type_id']){
+ echo 'checked="checked"';
+ break;
+ }
}
}
}
echo ' </tr>'."\n";
}
echo ' </tbody>'."\n";
- echo '</table>'."\n";
+ echo '</table><br /><br />'."\n";
}
?>
{"pid":pid, "a_type":a_type},
function(data) {});
- var button_html = ' <input type="button" value="<?php echo _AT('add'); ?>" title="<?php echo _AT('new_window'); ?>" onclick="trans.utility.poptastic(\\\'<?php echo TR_BASE_HREF; ?>file_manager/index.php?framed=1<?php echo SEP; ?>popup=1<?php echo SEP; ?>cp='+contentPath+'<?php echo SEP; ?>cid='+cid+'<?php echo SEP; ?>pid='+pid+'<?php echo SEP; ?>a_type='+a_type+'\\\');return false;" />';
+ var button_html = ' <input type="button" value="<?php echo _AT('add'); ?>" title="<?php echo _AT('new_window'); ?>" onclick="trans.utility.poptastic(\\\'<?php echo TR_BASE_HREF; ?>file_manager/index.php?framed=1<?php echo SEP; ?>popup=1<?php echo SEP; ?>cp='+contentPath+'<?php echo SEP; ?>_cid='+cid+'<?php echo SEP; ?>pid='+pid+'<?php echo SEP; ?>a_type='+a_type+'\\\');return false;" />';
eval("document.getElementById(\""+pid+"_"+a_type+"\").innerHTML = '"+button_html+"'");
}
//-->
// check post vars
if ($pid == 0 || $type_id == 0) exit;
-global $db;
+require_once(TR_INCLUDE_PATH.'classes/DAO/DAO.class.php');
+$dao = new DAO();
+
// delete the existing alternative for this (pid, a_type)
$sql = "SELECT sr.secondary_resource_id
FROM ".TABLE_PREFIX."secondary_resources sr, ".TABLE_PREFIX."secondary_resources_types srt
AND sr.primary_resource_id = ".$pid."
AND sr.language_code = '".$_SESSION['lang']."'
AND srt.type_id=".$type_id;
-$existing_secondary_result = mysql_query($sql, $db);
-
-while ($existing_secondary = mysql_fetch_assoc($existing_secondary_result))
-{
- $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources
- WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id'];
- $result = mysql_query($sql, $db);
-
- $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources_types
- WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id']."
- AND type_id=".$type_id;
- $result = mysql_query($sql, $db);
+$existing_secondary_rows = $dao->execute($sql);
+
+if (is_array($existing_secondary_rows)) {
+ foreach ($existing_secondary_rows as $existing_secondary)
+ {
+ $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources
+ WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id'];
+ $dao->execute($sql);
+
+ $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources_types
+ WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id']."
+ AND type_id=".$type_id;
+ $dao->execute($sql);
+ }
}
exit;
*/
define('TR_INCLUDE_PATH', '../../include/');
-require (TR_INCLUDE_PATH.'vitals.inc.php');
+require_once(TR_INCLUDE_PATH.'vitals.inc.php');
$pid = intval($_POST['pid']);
$type_id = intval($_POST['a_type']);
// check post vars
if ($pid == 0 || $type_id == 0 || $secondary_resource == '') exit;
-global $db;
+require_once(TR_INCLUDE_PATH.'classes/DAO/DAO.class.php');
+$dao = new DAO();
+
// delete the existing alternative for this (pid, a_type)
$sql = "SELECT sr.secondary_resource_id
FROM ".TABLE_PREFIX."secondary_resources sr, ".TABLE_PREFIX."secondary_resources_types srt
AND sr.primary_resource_id = ".$pid."
AND sr.language_code = '".$_SESSION['lang']."'
AND srt.type_id=".$type_id;
-$existing_secondary_result = mysql_query($sql, $db);
-
-while ($existing_secondary = mysql_fetch_assoc($existing_secondary_result))
-{
- $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources
- WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id'];
- $result = mysql_query($sql, $db);
+//$existing_secondary_result = mysql_query($sql, $db);
+$existing_secondary_rows = $dao->execute($sql);
- $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources_types
- WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id']."
- AND type_id=".$type_id;
- $result = mysql_query($sql, $db);
+if (is_array($existing_secondary_rows)) {
+ foreach ($existing_secondary_rows as $existing_secondary)
+ {
+ $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources
+ WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id'];
+ $dao->execute($sql);
+
+ $sql = "DELETE FROM ".TABLE_PREFIX."secondary_resources_types
+ WHERE secondary_resource_id = ".$existing_secondary['secondary_resource_id']."
+ AND type_id=".$type_id;
+ $dao->execute($sql);
+ }
}
// insert new alternative
$sql = "INSERT INTO ".TABLE_PREFIX."secondary_resources (primary_resource_id, secondary_resource, language_code)
VALUES (".$pid.", '".mysql_real_escape_string($secondary_resource)."', '".$_SESSION['lang']."')";
-$result = mysql_query($sql, $db);
+$dao->execute($sql);
$secondary_resource_id = mysql_insert_id();
$sql = "INSERT INTO ".TABLE_PREFIX."secondary_resources_types (secondary_resource_id, type_id)
VALUES (".$secondary_resource_id.", ".$type_id.")";
-$result = mysql_query($sql, $db);
+$dao->execute($sql);
exit;
include_once(TR_INCLUDE_PATH.'../home/classes/ContentUtility.class.php');
$body_text = htmlspecialchars($stripslashes($_POST['body_text']));
-$body_t = html_entity_decode($body_text);
-
+$body = html_entity_decode($body_text);
require(TR_INCLUDE_PATH.'classes/XML/XML_HTMLSax/XML_HTMLSax.php'); /* for XML_HTMLSax */
require(TR_INCLUDE_PATH.'imscc/ims_template.inc.php'); /* for ims templates + print_organizations() */
/* generate the resources and save the HTML files */
-ob_start();
+//ob_start();
global $parser, $my_files;
global $course_id;
$content_files = "\n";
//in order to control if some [media] is in the body_text
-$body = ContentUtility::embedMedia($body_t);
+//$body = ContentUtility::embedMedia($body_t);
$parser->parse($body);
-
+
+// find all [media] resources
+preg_match_all("/\[media[0-9a-z\|]*\](.*)\[\/media\]/i",$body,$media_matches);
+$my_files = array_merge($media_matches[1], $my_files);
+
// add by Cindy Li.
// This resolves the problem introduced by [media] tag: when [media] is
// parsed into <object>, same resource appears a few times in <object> with different
-// format to cater for different browsers or players. This way creates prolem that different
+// format to cater for different browsers or players. This way creates problem that different
// formats in <object> are all parsed and considered as different resource. array_unique()
// call solves this problem. But, it introduces the new problem that when a same resource
// appears at different places in the content and users do want to have them with different
// alternatives. With this solution, this same resource only shows up once at "adapt content"
-// and only can have one alternative associate with. Table and scripts need to re-design
+// and only can have one alternative associated with. Table and scripts need to be re-designed
// to solve this problem, for example, include line number in table.
$my_files = array_unique($my_files);
foreach ($my_files as $file) {
/* filter out full urls */
$url_parts = @parse_url($file);
- if (isset($url_parts['scheme'])) {
+ if (isset($url_parts['scheme']) && substr($file, 0, strlen(TR_BASE_HREF)) != TR_BASE_HREF) {
continue;
}
INSERT INTO `TR_language_text` VALUES ('en', '_template', 'browse_for_upload', 'Browse for file to upload', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', 'the_follow_errors_occurred', 'The following errors occurred:', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', 'content_id', 'Content ID', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'put_link', 'put link name here', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'auditory', 'Auditory', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'textual', 'Textual', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'stop_apply_text_alternatives', 'Stop Applying Text Alternatives', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'apply_audio_alternatives', 'Apply Audio Alternatives', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'stop_apply_audio_alternatives', 'Stop Applying Audio Alternatives', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'apply_text_alternatives', 'Apply Text Alternatives', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'stop_apply_visual_alternatives', 'Stop Applying Visual Alternatives', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'apply_visual_alternatives', 'Apply Visual Alternatives', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'stop_apply_sign_lang_alternatives', 'Stop Applying Sign Language Alternatives', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'apply_sign_lang_alternatives', 'Apply Sign Language Alternatives', now(), '');\r
\r
-INSERT INTO `TR_language_text` VALUES ('en', '_template', '', '', now(), '');\r
-INSERT INTO `TR_language_text` VALUES ('en', '_template', '', '', now(), '');\r
-INSERT INTO `TR_language_text` VALUES ('en', '_template', '', '', now(), '');\r
-INSERT INTO `TR_language_text` VALUES ('en', '_template', '', '', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', '', '', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', '', '', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', '', '', now(), '');\r
\r
if (!defined('TR_INCLUDE_PATH')) { exit; } ?>\r
\r
+<?php if ($this->has_text_alternative || $this->has_audio_alternative || $this->has_visual_alternative || $this->has_sign_lang_alternative): ?>\r
+<div id="alternatives_shortcuts">\r
+<?php if ($this->has_text_alternative) :?>\r
+ <a href="<?php echo $_SERVER['PHP_SELF'].'?_cid='.$this->cid.(($_GET['alternative'] == 3) ? '' : SEP.'alternative=3'); ?>">\r
+ <img src="<?php echo TR_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 3) ? 'pause.png' : 'text_alternative.png'); ?>" \r
+ alt="<?php echo (($_GET['alternative'] == 3) ? _AT('stop_apply_text_alternatives') : _AT('apply_text_alternatives')); ?>" \r
+ title="<?php echo (($_GET['alternative'] == 3) ? _AT('stop_apply_text_alternatives') : _AT('apply_text_alternatives')); ?>" \r
+ border="0" />\r
+ </a>\r
+<?php endif; // END OF has text alternative?>\r
+<?php if ($this->has_audio_alternative) :?>\r
+ <a href="<?php echo $_SERVER['PHP_SELF'].'?_cid='.$this->cid.(($_GET['alternative'] == 1) ? '' : SEP.'alternative=1'); ?>">\r
+ <img src="<?php echo TR_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 1) ? 'pause.png' : 'audio_alternative.png'); ?>" \r
+ alt="<?php echo (($_GET['alternative'] == 1) ? _AT('stop_apply_audio_alternatives') : _AT('apply_audio_alternatives')); ?>" \r
+ title="<?php echo (($_GET['alternative'] == 1) ? _AT('stop_apply_audio_alternatives') : _AT('apply_audio_alternatives')); ?>" \r
+ border="0" />\r
+ </a>\r
+<?php endif; // END OF has audio alternative?>\r
+<?php if ($this->has_visual_alternative) :?>\r
+ <a href="<?php echo $_SERVER['PHP_SELF'].'?_cid='.$this->cid.(($_GET['alternative'] == 4) ? '' : SEP.'alternative=4'); ?>">\r
+ <img src="<?php echo TR_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 4) ? 'pause.png' : 'visual_alternative.png'); ?>" \r
+ alt="<?php echo (($_GET['alternative'] == 4) ? _AT('stop_apply_visual_alternatives') : _AT('apply_visual_alternatives')); ?>" \r
+ title="<?php echo (($_GET['alternative'] == 4) ? _AT('stop_apply_visual_alternatives') : _AT('apply_visual_alternatives')); ?>" \r
+ border="0" />\r
+ </a>\r
+<?php endif; // END OF has visual alternative?>\r
+<?php if ($this->has_sign_lang_alternative) :?>\r
+ <a href="<?php echo $_SERVER['PHP_SELF'].'?_cid='.$this->cid.(($_GET['alternative'] == 2) ? '' : SEP.'alternative=2'); ?>">\r
+ <img src="<?php echo TR_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 2) ? 'pause.png' : 'sign_lang_alternative.png'); ?>" \r
+ alt="<?php echo (($_GET['alternative'] == 2) ? _AT('stop_apply_sign_lang_alternatives') : _AT('apply_sign_lang_alternatives')); ?>" \r
+ title="<?php echo (($_GET['alternative'] == 2) ? _AT('stop_apply_sign_lang_alternatives') : _AT('apply_sign_lang_alternatives')); ?>" \r
+ border="0" />\r
+ </a>\r
+<?php endif; // END OF has sign language alternative?>\r
+</div>\r
+<?php endif; // END OF displaying alternative shortcut icons?>\r
+\r
<?php if ($this->shortcuts): ?>\r
<input type="hidden" name="course_id" value="<?php echo $this->course_id; ?>" />\r
\r
<meta name="keywords" content="Transformable,free, open source, accessibility checker, accessibility reviewer, accessibility evaluator, accessibility evaluation, WCAG evaluation, 508 evaluation, BITV evaluation, evaluate accessibility, test accessibility, review accessibility, ATRC, WCAG 2, STANCA, BITV, Section 508." />
<meta name="description" content="Transformable is a Web accessibility evalution tool designed to help Web content developers and Web application developers ensure their Web content is accessible to everyone regardless to the technology they may be using, or their abilities or disabilities." />
<base href="<?php echo $this->content_base_href; ?>" />
- <link rel="shortcut icon" href="<?php echo $this->base_path; ?>/favicon.ico" type="image/x-icon" />
+ <link rel="shortcut icon" href="<?php echo $this->base_path; ?>favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/forms.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/styles.css" type="text/css" />
<!--[if IE]>
.nowrap {
white-space: nowrap;
}
+div#alternatives_shortcuts {
+ float: right;
+ margin: 0 2em;
+ border-radius: .5em .5em .5em .5em;;
+ -moz-border-radius: .5em .5em .5em .5em;
+ -moz-box-shadow:.2em .2em .2em #999999;
+ box-shadow: .2em .2em .2em #999999;
+ border:1px solid #cccccc;
+ padding-top: .2em;
+ padding-left: .2em;
+ padding-right: .2em;
+}