Skip to content

Commit

Permalink
Simile Timeline commit
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/branches/1.9@433 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
pgogy committed Sep 16, 2012
1 parent 95b8d8d commit 15abe1b
Show file tree
Hide file tree
Showing 28 changed files with 1,594 additions and 66 deletions.
6 changes: 3 additions & 3 deletions languages/en-GB/folderproperties.inc
Expand Up @@ -14,10 +14,10 @@

define("FOLDERPROPERTIES_DISPLAY_TITLE", "Folder Properties");

define("FOLDERPROPERTIES_TAB_FOLDER", "Folder: Properties");
define("FOLDERPROPERTIES_TAB_FOLDER", "Folder Properties");

define("FOLDERPROPERTIES_TAB_CONTENT", "Folder: Contents");
define("FOLDERPROPERTIES_TAB_CONTENT", "Folder Contents of this folder");

define("FOLDERPROPERTIES_TAB_RSS", "Folder: RSS feeds");
define("FOLDERPROPERTIES_TAB_RSS", "Folder RSS feed for this folder");

?>
18 changes: 18 additions & 0 deletions languages/en-GB/modules/simile/edit.inc
@@ -0,0 +1,18 @@
<?PHP

/**
*
* Xerte preview english language file
*
* @author Patrick Lockley
* @version 1.0
* @copyright Pat Lockley
* @package
*/


define("SIMILE_EDIT_TITLE", "Simile Editor Window");

define("XERTE_EDIT_MAXIMISE", "Maximise Window Size");

?>
16 changes: 16 additions & 0 deletions languages/en-GB/modules/simile/module_functions.inc
@@ -0,0 +1,16 @@
<?PHP

/**
*
* Xerte module functions english language file
*
* @author Patrick Lockley
* @version 1.0
* @copyright Pat Lockley
* @package
*/


define("XERTE_DISPLAY_FAIL", "Sorry, the author of this piece has yet to make it available");

?>
20 changes: 20 additions & 0 deletions languages/en-GB/modules/simile/peer.inc
@@ -0,0 +1,20 @@
<?PHP

/**
*
* Xerte peer english language file
*
* @author Patrick Lockley
* @version 1.0
* @copyright Pat Lockley
* @package
*/


define("XERTE_PEER_DESCRIPTION", "Peer review page");

define("XERTE_PEER_GUIDANCE", "Please review this learning object. Use the feedback form below to submit your feedback.");

define("XERTE_PEER_TEXTAREA_INSTRUCTIONS", "You have been asked to provide some feedback on this learning object. Please enter your feedback and click save when you have finished. This feedback is anonymous.");

?>
16 changes: 16 additions & 0 deletions languages/en-GB/modules/simile/preview.inc
@@ -0,0 +1,16 @@
<?PHP

/**
*
* Xerte preview english language file
*
* @author Patrick Lockley
* @version 1.0
* @copyright Pat Lockley
* @package
*/


define("XERTE_PREVIEW_TITLE", "Interactive Learning Object");

?>
2 changes: 1 addition & 1 deletion languages/en-GB/rss.inc
Expand Up @@ -14,7 +14,7 @@
define("RSS_LANGUAGE","en-gb");
define("RSS_DB_FAIL","Sorry, the system cannot connect to the database at present. The mysql error is ");
define("RSS_LO","'s Learning Objects");
define("RSS_PLURAL", "s");
define("RSS_PLURAL", "'s");
define("RSS_FEED_DESC","A feed containing all of");
define("RSS_FEED_PUBLIC","'s public learning objects from the ");
define("RSS_USER_LO","'s Learning Objects ");
Expand Down
20 changes: 20 additions & 0 deletions languages/en-GB/website_code/php/management/sync.inc
@@ -0,0 +1,20 @@
<?PHP

/**
*
* management templates sync english language file
*
* @author Patrick Lockley
* @version 1.0
* @copyright Pat Lockley
* @package
*/


define("SYNC_INSTALL", "template installed");

define("SYNC_UPDATE", "template updated");

define("SYNC_RETURN", "Click on central templates to return to the template management page");

?>
2 changes: 2 additions & 0 deletions languages/en-GB/website_code/php/management/templates.inc
Expand Up @@ -16,6 +16,8 @@

define("TEMPLATE_VIEW", "View");

define("TEMPLATE_UPDATE", "Update template list");

define("TEMPLATE_MANAGE", "Manage Existing templates");

define("TEMPLATE_TYPE", "This template is of type");
Expand Down
Expand Up @@ -146,7 +146,7 @@

define("PROPERTIES_LIBRARY_RSS_FOLDER", "As you organise content in folders, each folder has it's own RSS feed. This provides a convenient way to include only some of your content in a feed. See the folder properties for more details, and the link to that folder's feed");

define("PROPERTIES_LIBRARY_RSS_EXPORT", "Include content in the export feed (allows other users to download your project and make changes to it)");
define("PROPERTIES_LIBRARY_RSS_EXPORT", "Including content in the export feed allows other users to download your project and make changes to it themselves");

define("PROPERTIES_LIBRARY_RSS_SAVED", "Your changes have been saved");

Expand Down
131 changes: 131 additions & 0 deletions modules/simile/delete_template.php
@@ -0,0 +1,131 @@
<?PHP /**
*
* Delete template page, used by the site to delete a xerte template
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/

/**
*
* Function delete_folder_loop
* This function checks http security settings
* @param string $path = Root path to the folder we wish to delete
* @global $folder_id_array, $folder_array, $file_array, $dir_path
* @version 1.0
* @author Patrick Lockley
*/

function delete_folder_loop($path){

/**
* @global $folder_id_array, $folder_array, $file_array, $dir_path - several arrays and strings
*/

global $folder_id_array, $folder_array, $file_array, $dir_path;

$d = opendir($path);

array_push($folder_id_array, $d);

while($f = readdir($d)){

if(($f!=".")&&($f!="..")){

if(is_dir($path . $f)){


array_push($folder_array, $path . "/" . $f);

delete_folder_loop($path . $f);


}else{

$string = $path . "/" . $f;

array_push($file_array, $string);

}
}

}

$x = array_pop($folder_id_array);

closedir($x);

}

/**
*
* Function Clean up files
* This function removes files added in delete_folder_loop
* @version 1.0
* @author Patrick Lockley
*/

function clean_up_files(){

global $dir_path, $file_array, $folder_array;

while($file = array_pop($file_array)){

unlink($file);

}

while($folder = array_pop($folder_array)){

rmdir($folder);

}

}

$dir_path="";
$temp_dir_path = "";
$temp_new_path = "";

$folder_id_array = array();
$folder_array = array();
$file_array = array();

/**
*
* Function delete_template
* This function removes files added in delete_folder_loop
* @param string $path = Root path to the folder we wish to delete
* @version 1.0
* @author Patrick Lockley
*/


function delete_template($path){

global $dir_path, $new_path, $temp_dir_path, $temp_new_path;

$dir_path = $path;

/*
* find the files to delete
*/

delete_folder_loop($dir_path);

/*
* remove the files
*/

clean_up_files();

/*
* delete the directory for this template
*/

rmdir($path);

}
?>

0 comments on commit 15abe1b

Please sign in to comment.