function addContent($course_id, $content_parent_id, $ordering, $title, $text, $keywords,
$related, $formatting, $head = '', $use_customized_head = 0,
- $test_message = '', $allow_test_export = 1, $content_type = CONTENT_TYPE_CONTENT) {
+ $test_message = '', $content_type = CONTENT_TYPE_CONTENT) {
global $_current_user, $_course_id;
if (!isset($_current_user) || !$_current_user->isAuthor($this->course_id)) {
/* main topics all have minor_num = 0 */
$cid = $this->contentDAO->Create($_course_id, $content_parent_id, $ordering, 0, $formatting,
$keywords, '', $title, $text, $head, $use_customized_head,
- $test_message, $allow_test_export, $content_type);
+ $test_message, $content_type);
return $cid;
}
function editContent($content_id, $title, $text, $keywords, $formatting,
- $head, $use_customized_head, $test_message,
- $allow_test_export) {
+ $head, $use_customized_head, $test_message) {
global $_current_user;
if (!isset($_current_user) || !$_current_user->isAuthor($this->course_id)) {
}
$this->contentDAO->Update($content_id, $title, $text, $keywords, $formatting, $head, $use_customized_head,
- $test_message, $allow_test_export);
+ $test_message);
}
function moveContent($content_id, $new_content_parent_id, $new_content_ordering) {
}
}
}
-
- /**
- * Return true if this content page allows export, else false.
- * @param int content id
- * @return true if 'allow_test_export'==1 || is instructor
- */
- function allowTestExport($content_id){
- include_once(TR_INCLUDE_PATH.'classes/Utility.class.php');
-
- $row = $this->contentDAO->get($content_id);
-
- if ($row['allow_test_export'] == 1 || Utility::authenticate(TR_PRIV_ISAUTHOR_OF_CURRENT_COURSE, false)){
- return true;
- }
- return false;
- }
}
?>
\ No newline at end of file
$_POST['weblink_text'] = $content_row['text'];
$_POST['keywords'] = $content_row['keywords'];
$_POST['test_message'] = $content_row['test_message'];
- $_POST['allow_test_export'] = $content_row['allow_test_export'];
// $_POST['day'] = substr($content_row['release_date'], 8, 2);
// $_POST['month'] = substr($content_row['release_date'], 5, 2);
// }
}
- if (!isset($_POST['allow_test_export']) && $current_tab != 3) {
- //export flag handling.
-// $sql = "SELECT `allow_test_export` FROM ".TABLE_PREFIX."content WHERE content_id=$_REQUEST[cid]";
-// $result2 = mysql_query($sql, $db);
-// if ($result2){
-// $c_row = mysql_fetch_assoc($result2);
-// }
- if (intval($content_row['allow_test_export'])==1){
- echo '<input type="hidden" name="allow_test_export" value="1" />';
- } else {
- echo '<input type="hidden" name="allow_test_export" value="0" />';
- }
- } else {
- echo '<input type="hidden" name="allow_test_export" value="'.intval($_POST['allow_test_export']).'" />';
- }
-
if ($do_check) {
$changes_made = check_for_changes($content_row, $row_alternatives);
}
$content_row['formatting'],
'',
$content_row['use_customized_head'],
- '',
- $content_row['allow_test_export']);
+ '');
}
else
{ // add new content
//these are the _AT(x) variable names and their include file
/* tabs[tab_id] = array(tab_name, file_name, accesskey) */
$tabs[0] = array('content', 'edit.inc.php', 'n');
- $tabs[1] = array('properties', 'properties.inc.php', 'p');
+ $tabs[1] = array('metadata', 'properties.inc.php', 'p');
$tabs[2] = array('alternative_content', 'alternatives.inc.php', 'l');
$tabs[3] = array('tests', 'tests.inc.php', 't');
$_POST['formatting'] = intval($_POST['formatting']);
$_POST['keywords'] = trim($_POST['keywords']);
$_POST['test_message'] = trim($_POST['test_message']);
- $_POST['allow_test_export'] = intval($_POST['allow_test_export']);
//if weblink is selected, use it
if ($_POST['formatting']==CONTENT_TYPE_WEBLINK) {
$err = $contentManager->editContent($_POST['_cid'], $_POST['title'], $_POST['body_text'],
$_POST['keywords'], $_POST['formatting'],
$_POST['head'], $_POST['use_customized_head'],
- $_POST['test_message'], $_POST['allow_test_export']);
+ $_POST['test_message']);
$cid = $_POST['_cid'];
} else {
/* insert new */
-
$cid = $contentManager->addContent($_course_id,
$_POST['pid'],
$_POST['ordering'],
$_POST['head'],
$_POST['use_customized_head'],
$_POST['test_message'],
- $_POST['allow_test_export'],
$content_type_pref);
$_POST['_cid'] = $cid;
$_REQUEST['_cid'] = $cid;
}
+ if ($cid == 0) return;
// }
/* insert glossary terms */
if ($row && isset($_POST['test_message']) && $_POST['test_message'] != $row['test_message']){
$changes[3] = true;
}
- if ($row && isset($_POST['allow_test_export']) && $_POST['allow_test_export'] != $row['allow_test_export']){
- $changes[3] = true;
- }
$content_tests = $contentManager->getContentTestsAssoc($cid);
$dao = new DAO();
$resourceTypesDAO = new ResourceTypesDAO();
-global $_content_id;
+global $_content_id, $content_row, $msg;
$cid = $_content_id;
+if ($cid == 0) {
+ $msg->printErrors('SAVE_BEFORE_PROCEED');
+ require_once(TR_INCLUDE_PATH.'footer.inc.php');
+ exit;
+}
/**
* This function returns the preview link of the given file
* @param $file the file location in "file manager"
}
// Main program
-global $db, $content_row;
require(TR_INCLUDE_PATH.'lib/resources_parser.inc.php');
if (count($resources)==0)
/************************************************************************/\r
\r
if (!defined('TR_INCLUDE_PATH')) { exit; }\r
+global $_course_id;\r
?>\r
<script type="text/javascript" language="javascript">\r
//<!--\r
<script type="text/javascript" language="javascript">\r
//<!--\r
trans.editor.content_path = "<?php if(isset($content_row['content_path'])) echo $content_row['content_path']; ?>";\r
+ trans.editor.course_id = "<?php if(isset($cid)) echo $_course_id; ?>";\r
trans.editor.content_id = "<?php if(isset($cid)) echo $cid; ?>";\r
trans.editor.head_enabled_title = "<?php echo _AT('customized_head_enabled_title'); ?>";\r
trans.editor.head_disabled_title = "<?php echo _AT('customized_head_disabled_title'); ?>";\r
<span style="font-weight:bold"><?php echo _AT('about_content_tests'); ?></span>
</div>
-<div class="row">
- <?php
- //Need radio button 'cause one checkbox makes the states indeterministic
- //@harris
- $test_export_y_checked = '';
- $test_export_n_checked = '';
- if ($_POST['allow_test_export'] == 1){
- $test_export_y_checked = ' checked="checked"';
- } else {
- $test_export_n_checked = ' checked="checked"';
- }
-
- echo _AT('allow_test_export');
-?>
-
- <input type="radio" name="allow_test_export" id="allow_test_export" value="1" <?php echo $test_export_y_checked; ?>/>
- <label for="allow_test_export"><?php echo _AT('yes'); ?></label>
- <input type="radio" name="allow_test_export" id="disallow_test_export" value="0" <?php echo $test_export_n_checked; ?>/>
- <label for="disallow_test_export"><?php echo _AT('no'); ?></label>
-</div>
-
-
<div class="row">
<p><?php echo _AT('custom_test_message'); ?></p>
<textarea name="test_message"><?php echo $_POST['test_message']; ?></textarea>
\r
//click function to launch file manager window\r
var launchFileManager = function () {\r
- window.open(trans.base_href + 'file_manager/index.php?framed=1&popup=1&cp=' + trans.editor.content_path + '&_cid=' + trans.editor.content_id, 'newWin1', 'menubar=0,scrollbars=1,resizable=1,width=640,height=490');\r
+ window.open(trans.base_href + 'file_manager/index.php?framed=1&popup=1&cp=' + trans.editor.content_path + '&_course_id=' + trans.editor.course_id, 'newWin1', 'menubar=0,scrollbars=1,resizable=1,width=640,height=490');\r
return false;\r
};\r
\r
/* generate the IMS QTI resource and files */
global $contentManager;
//check if test export is allowed.
- if ($contentManager->allowTestExport($content['content_id'])){
- $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);
- $test_ids = array(); //reset test ids
- //$my_files = array(); //reset myfiles.
- while ($content_test_row = mysql_fetch_assoc($content_test_rs)){
- //export
- $test_ids[] = $content_test_row['test_id'];
- //the 'added_files' is for adding into the manifest file in this zip
- $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
-
- //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
- foreach($added_files as $filename=>$file_array){
- $my_files[] = $filename;
- foreach ($file_array as $garbage=>$filename2){
- if (!in_array($filename2, $my_files)){
- $my_files[] = $filename2;
- }
+ $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);
+ $test_ids = array(); //reset test ids
+ //$my_files = array(); //reset myfiles.
+ while ($content_test_row = mysql_fetch_assoc($content_test_rs)){
+ //export
+ $test_ids[] = $content_test_row['test_id'];
+ //the 'added_files' is for adding into the manifest file in this zip
+ $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
+
+ //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
+ foreach($added_files as $filename=>$file_array){
+ $my_files[] = $filename;
+ foreach ($file_array as $garbage=>$filename2){
+ if (!in_array($filename2, $my_files)){
+ $my_files[] = $filename2;
}
}
-
- //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
- $resources .= str_replace( array('{TEST_ID}', '{PATH}', '{FILES}'),
- array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
- $ims_template_xml['resource_test']);
}
+
+ //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
+ $resources .= str_replace( array('{TEST_ID}', '{PATH}', '{FILES}'),
+ array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
+ $ims_template_xml['resource_test']);
}
/* generate the a4a files */
require_once(TR_INCLUDE_PATH.'classes/DAO/ContentDAO.class.php');
require_once(TR_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
-$course_id = (isset($_REQUEST['course_id']) ? intval($_REQUEST['course_id']) : $_course_id);
-$cid = isset($_REQUEST['cid']) ? intval($_REQUEST['cid']) : $_content_id; /* content id of an optional chapter */
+$_course_id = $course_id = (isset($_REQUEST['course_id']) ? intval($_REQUEST['course_id']) : $_course_id);
+$_content_id = $cid = isset($_REQUEST['cid']) ? intval($_REQUEST['cid']) : $_content_id; /* content id of an optional chapter */
$c = isset($_REQUEST['c']) ? intval($_REQUEST['c']) : 0;
if ($course_id == 0 && $cid == 0)
}
if (isset($_REQUEST['to_tile']) && !isset($_POST['cancel'])) {
- /* for TILE */
-
- /* redirect to TILE import servlet */
+ /* export from transformable to atutor */
require_once(TR_INCLUDE_PATH.'vitals.inc.php');
if (!authenticate(TR_PRIV_ADMIN, TR_PRIV_RETURN)) {
$glossary_manifest_xml = '';
}
*/
+
ob_start();
print_organizations($top_content_parent_id, $content, 0, '', array(), $toc_html);
/* generate the IMS QTI resource and files */
//check if test export is allowed.
- if ($contentManager->allowTestExport($content['content_id'])){
- $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);
- $test_ids = array(); //reset test ids
- //$my_files = array(); //reset myfiles.
- if (is_array($content_test_rs)) {
- foreach ($content_test_rs as $content_test_row){
- //export
- $test_ids[] = $content_test_row['test_id'];
- //the 'added_files' is for adding into the manifest file in this zip
- $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
- foreach($added_files as $xml_file=>$chunk){
- foreach ($chunk as $xml_filename){
- $added_files_xml .= str_replace('{FILE}', 'QTI/'.$xml_filename, $ims_template_xml['xml']);
- }
- }
- //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
- $resources .= str_replace( array('{TEST_ID}', '{PATH}', '{FILES}'),
- array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
- $ims_template_xml['resource_test']);
- /* Taken out since we are gonna use dependency instead
- $test_xml_items .= str_replace( array('{TEST_ID}'),
- array($content_test_row['test_id']),
- $ims_template_xml['test']);
- */
- foreach($test_files as $filename=>$realfilepath){
- $zipfile->add_file(@file_get_contents($realfilepath), 'QTI/'.$filename, filemtime($realfilepath));
+ $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);
+ $test_ids = array(); //reset test ids
+ //$my_files = array(); //reset myfiles.
+ if (is_array($content_test_rs)) {
+ foreach ($content_test_rs as $content_test_row){
+ //export
+ $test_ids[] = $content_test_row['test_id'];
+ //the 'added_files' is for adding into the manifest file in this zip
+ $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
+ foreach($added_files as $xml_file=>$chunk){
+ foreach ($chunk as $xml_filename){
+ $added_files_xml .= str_replace('{FILE}', 'QTI/'.$xml_filename, $ims_template_xml['xml']);
}
}
+ //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
+ $resources .= str_replace( array('{TEST_ID}', '{PATH}', '{FILES}'),
+ array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
+ $ims_template_xml['resource_test']);
+/* Taken out since we are gonna use dependency instead
+ $test_xml_items .= str_replace( array('{TEST_ID}'),
+ array($content_test_row['test_id']),
+ $ims_template_xml['test']);
+*/
+ foreach($test_files as $filename=>$realfilepath){
+ $zipfile->add_file(@file_get_contents($realfilepath), 'QTI/'.$filename, filemtime($realfilepath));
+ }
}
}
*/
public function Create($course_id, $content_parent_id, $ordering, $revision, $formatting, $keywords,
$content_path, $title, $text, $head, $use_customized_head, $test_message,
- $allow_test_export, $content_type)
+ $content_type)
{
global $addslashes, $msg;
head,
use_customized_head,
test_message,
- allow_test_export,
content_type
)
VALUES (".$course_id.",
'".$addslashes($head)."',
".$use_customized_head.",
'".$addslashes($test_message)."',
- ".$allow_test_export.",
".$content_type.")";
if (!$this->execute($sql))
}
else
{
- return mysql_insert_id();
+ $cid = mysql_insert_id();
+
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($cid, "content_id");
+
+ return $cid;
}
}
else
* @author Cindy Qi Li
*/
public function Update($content_id, $title, $text, $keywords, $formatting,
- $head, $use_customized_head, $test_message,
- $allow_test_export)
+ $head, $use_customized_head, $test_message)
{
global $addslashes, $msg;
formatting = '".$formatting."',
head = '".$addslashes($head)."',
use_customized_head = ".$use_customized_head.",
- test_message = '".$addslashes($test_message)."',
- allow_test_export = ".$allow_test_export."
+ test_message = '".$addslashes($test_message)."'
WHERE content_id = ".$content_id;
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($content_id, "content_id");
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
else {
return false;
SET ".$fieldName."='".$addslashes($fieldValue)."'
WHERE content_id = ".$contentID;
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($contentID, "content_id");
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
$contentForumsAssocDAO->DeleteByContentID($contentID);
$sql = "DELETE FROM ".TABLE_PREFIX."content WHERE content_id = ".$contentID;
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($contentID, "content_id");
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
$sql = 'INSERT INTO ' . TABLE_PREFIX . 'content_forums_assoc' .
'(content_id, forum_id) ' .
'VALUES (' . $content_id . ", $forum_id)";
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($content_id, "content_id");
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
{
$sql = "DELETE FROM ".TABLE_PREFIX."content_forums_assoc
WHERE content_id = ".$contentID."";
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($contentID, "content_id");
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
{
$sql = "DELETE FROM ".TABLE_PREFIX."content_forums_assoc
WHERE forum_id = ".$forumID."";
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/ForumsCoursesDAO.class.php');
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+
+ $forumsCoursesDAO = new ForumsCoursesDAO();
+ $course_rows = $forumsCoursesDAO->getByForum($forumID);
+
+ if (is_array($course_rows)) {
+ foreach ($course_rows as $row) {
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($row['course_id']);
+ }
+ }
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
$sql = 'INSERT INTO ' . TABLE_PREFIX . 'content_tests_assoc' .
'(content_id, test_id) ' .
'VALUES (' . $content_id . ", $test_id)";
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($content_id, "content_id");
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
{
$sql = "DELETE FROM ".TABLE_PREFIX."content_tests_assoc
WHERE content_id = ".$contentID."";
- return $this->execute($sql);
+
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($contentID, "content_id");
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
{
$sql = "DELETE FROM ".TABLE_PREFIX."content_tests_assoc
WHERE test_id = ".$testID."";
- return $this->execute($sql);
+ if ($this->execute($sql)) {
+ // update the courses.modified_date to the current timestamp
+ include_once(TR_INCLUDE_PATH.'classes/DAO/TestsDAO.class.php');
+ include_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
+ $testsDAO = new TestsDAO();
+ $test_rows = $testsDAO->get($testID);
+
+ if ($test_rows['course_id'] > 0) {
+ $coursesDAO = new CoursesDAO();
+ $coursesDAO->updateModifiedDate($test_rows['course_id']);
+ }
+ return true;
+ } else {
+ $msg->addError('DB_NOT_UPDATED');
+ return false;
+ }
}
/**
return false;
$sql = "UPDATE ".TABLE_PREFIX."courses
- SET ".$fieldName."='".$addslashes($fieldValue)."'
+ SET ".$fieldName."='".$addslashes($fieldValue).",
+ modified_date = now()
WHERE course_id = ".$courseID;
return $this->execute($sql);
return $this->execute($sql);
}
+ /**
+ * Update courses.modified_date to the current timestamp
+ * @access public
+ * @param id: course_id or content_id
+ * id_type: "course_id" or "content_id", by default is "course_id"
+ * @return true if successful, otherwise, return false
+ * @author Cindy Qi Li
+ */
+ public function updateModifiedDate($id, $id_type = "course_id")
+ {
+ if ($id_type != "course_id" && $id_type != "content_id") return false;
+
+ if ($id_type == "course_id") {
+ $sql = "UPDATE ".TABLE_PREFIX."courses SET modified_date=now() WHERE course_id=".$id;
+ } else if ($id_type == "content_id") {
+ $sql = "UPDATE ".TABLE_PREFIX."courses SET modified_date=now()
+ WHERE course_id=(SELECT course_id FROM ".TABLE_PREFIX."content WHERE content_id=".$id.")";
+ }
+ return $this->execute($sql);
+ }
+
/**
* Return course information by given course id
* @access public
{
$sql = "SELECT * FROM ".TABLE_PREFIX."courses
WHERE access='public'
- ORDER BY modified_date, created_date";
+ ORDER BY modified_date DESC, created_date DESC";
return $this->execute($sql);
}
$sql = "SELECT * FROM ".TABLE_PREFIX."forums_courses WHERE course_id = '".$course_id."'";
return $this->execute($sql);
}
+
+ /**
+ * Return rows by forum ID
+ * @access public
+ * @param name
+ * @return table rows
+ * @author Cindy Qi Li
+ */
+ function getByForum($forum_id)
+ {
+ $sql = "SELECT * FROM ".TABLE_PREFIX."forums_courses WHERE forum_id = '".$forum_id."'";
+ return $this->execute($sql);
+ }
}
?>
\ No newline at end of file
`head` TEXT NOT NULL,\r
`use_customized_head` TINYINT(4) NOT NULL,\r
`test_message` TEXT NOT NULL,\r
- `allow_test_export` TINYINT(1) UNSIGNED NOT NULL,\r
`content_type` TINYINT(1) UNSIGNED NOT NULL,\r
PRIMARY KEY (`content_id`),\r
KEY `course_id` (`course_id`),\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', 'others_course', 'Others\' course', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', 'most_recent_courses', 'Most Recent Courses', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_template', 'all_categories', 'All Categories', 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', 'ims_files_missing', 'In this package, the file, %1$s, is missing or misplaced.', now(), '');\r
+\r
+INSERT INTO `TR_language_text` VALUES ('en', '_template', 'metadata', 'Meta-data', 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', '_msgs','TR_ERROR_BAD_FILE_TYPE', 'Unsupported file type. Plain Text or HTML files only.', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_ERROR_INVALID_INPUT', 'Invalid URL: %s', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_FEEDBACK_CLOSED', 'Successfully closed', now(), '');\r
+INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_ERROR_SAVE_BEFORE_PROCEED', 'Please save the content before proceeding to define "Adapted Content".', now(), '');\r
\r
INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_', '', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_', '', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_', '', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_', '', now(), '');\r
INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_', '', now(), '');\r
-INSERT INTO `TR_language_text` VALUES ('en', '_msgs','TR_', '', now(), '');\r
\r
\r
INSERT INTO `AT_language_text` VALUES ('en', '_msgs','AT_ERROR_TILE_AUTHENTICATION_FAIL','The Transformable authentication fails at:<br />%s.',now(),'');\r
\r
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1">\r
<fieldset class="group_form"><legend class="group_form"><?php echo _AT("language"); ?></legend>\r
-<h2 align="center"><?php echo $this->title ;?></h2>\r
\r
<table class="data" rules="rows">\r
-\r
<thead>\r
<tr>\r
<th scope="col"> </th>\r
<td><span class="inlineEdits" id="<?php echo "english_name:".$row["language_code"].":".$row["charset"]; ?>"><?php echo $row['english_name']; ?></span></td>\r
<td><?php echo $row['language_code']; ?></td>\r
<td><?php echo $row['charset']; ?></td>\r
- <td><?php if ($row['status']) echo _AT('enabled'); else echo _AT('disabled'); ?></td>\r
+ <td>\r
+ <?php \r
+ if ($row['status'] == TR_STATUS_ENABLED) echo _AT('enabled'); \r
+ else if ($row['status'] == TR_STATUS_DISABLED) echo _AT('disabled'); \r
+ else echo _AT('unknown'); \r
+ ?>\r
+ </td>\r
</tr>\r
<?php }?>\r
</tbody>\r