$_POST['cid'] = $cid;
$_REQUEST['cid'] = $cid;
}
- }
-
+ }
+ else return;
+
/* insert glossary terms */
if (is_array($_POST['glossary_defs']) && ($num_terms = count($_POST['glossary_defs']))) {
global $glossary, $glossary_ids, $msg;
if (!defined('AT_INCLUDE_PATH')) { exit; }
+if ($cid == 0) {
+ $msg->printErrors('SAVE_BEFORE_PROCEED');
+ require_once(AT_INCLUDE_PATH.'footer.inc.php');
+ exit;
+}
+
/**
* This function returns the preview link of the given file
* @param $file the file location in "file manager"
$added_dt = array(); //the mapping of discussion tools that are added
$avail_dt = array(); //list of discussion tools that have not been handled
-
/*
* return the error messages represented by the given array
* @author Mike A.
if (isset($_POST['url']) && ($_POST['url'] != 'http://') ) {
if ($content = @file_get_contents($_POST['url'])) {
-
// save file to /content/
$filename = substr(time(), -6). '.zip';
$full_filename = AT_CONTENT_DIR . $filename;
}
clr_dir(AT_CONTENT_DIR . 'import/'.$_SESSION['course_id']);
-if (isset($_POST['url'])) {
+if (file_exists($full_filename)) {
@unlink($full_filename);
}
print_menu_sections($menu, $children['content_id'], $depth+1, $new_ordering);
}
}
-
-
?>
<form name="form1" method="post" action="mods/_core/imscp/ims_import.php?tile=1" onsubmit="openWindow('<?php echo AT_BASE_HREF; ?>tools/prog.php?tile=1');">
- <input type="hidden" name="url" value="<?php echo AT_TILE_EXPORT_URL.$_GET['tile_course_id']; ?>" />
+ <input type="hidden" name="url" value="<?php echo AT_TILE_EXPORT_CC_URL.$_GET['tile_course_id']; ?>" />
+ <input type="hidden" name="allow_a4a_import" value="1" />
<br />
<div class="input-form">
</div>
<div class="row">
- <strong><?php echo _AT('import_content_package_where'); ?>:</strong> <select name="cid">
- <option value="0"><?php echo _AT('import_content_package_bottom_subcontent'); ?></option>
- <option>--------------------------</option>
- <?php
- print_menu_sections($_main_menu);
- ?>
- </select>
+ <strong><?php echo _AT('import_content_package_where'); ?>:</strong>
+ <select name="cid">
+ <option value="0"><?php echo _AT('import_content_package_bottom_subcontent'); ?></option>
+ <option>--------------------------</option>
+ <?php print_menu_sections($_main_menu); ?>
+ </select>
</div>
<div class="row">
// The URL to view the transformable course\r
define('AT_TILE_VIEW_COURSE_URL', $_config['transformable_uri'].'home/course/index.php?_course_id=');\r
\r
+// The URL to export content package from transformable\r
+define('AT_TILE_EXPORT_CP_URL', $_config['transformable_uri'].'home/ims/ims_export.php?course_id=');\r
+\r
// The URL to export common cartridge from transformable\r
-define('AT_TILE_EXPORT_URL', $_config['transformable_uri'].'home/imscc/ims_export.php?course_id=');\r
+define('AT_TILE_EXPORT_CC_URL', $_config['transformable_uri'].'home/imscc/ims_export.php?to_a4a=1&course_id=');\r
\r
// The URL to import common cartridge into transformable\r
define('AT_TILE_IMPORT_URL', $_config['transformable_uri'].'home/ims/ims_import.php');\r
<dl class="browse-result">\r
<?php if (isset($this->instructor_role)) { ?>\r
<dt class="tr_results_tools">\r
- <a href="<?php echo AT_TILE_EXPORT_URL.$result['courseID']; ?>">\r
- <img src="<?php echo AT_BASE_HREF. 'images/download.png'?>" alt="<?php echo _AT('download_common_cartridge'); ?>" title="<?php echo _AT("download_common_cartridge").' '.$result['title']; ?>; ?>" border="0">\r
+ <a href="<?php echo AT_TILE_EXPORT_CP_URL.$result['courseID']; ?>">\r
+ <img src="<?php echo AT_BASE_HREF. 'images/download.png'?>" alt="<?php echo _AT('download_content_package'); ?>" title="<?php echo _AT("download_content_package").' '.$result['title']; ?>" border="0">\r
</a> \r
<a href="mods/_standard/tile_search/import.php?tile_course_id=<?php echo $result['courseID']; ?>&title=<?php echo urlencode($result['title']); ?>">\r
<img src="<?php echo AT_BASE_HREF. 'images/archive.gif'?>" alt="<?php echo _AT('import'); ?>" title="<?php echo _AT("import").' '.$result['title']; ?>" border="0">\r