ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilExAssignmentFileSystemGUI Class Reference

File System Explorer GUI class. More...

+ Inheritance diagram for ilExAssignmentFileSystemGUI:
+ Collaboration diagram for ilExAssignmentFileSystemGUI:

Public Member Functions

 __construct ($a_main_directory)
 
 getTable ($a_dir, $a_subdir)
 Get table. More...
 
 uploadFile ()
 Insert into database the file order and update the file. More...
 
 saveFilesOrder ()
 Save all the orders. More...
 
 deleteFile ()
 delete object file we can pass one parameter to deleteFile in fileSystemGUI, that contains the name of the class to redirect. More...
 
 renameFile ()
 Rename File name. More...
 
- Public Member Functions inherited from ilFileSystemGUI
 __construct ($a_main_directory)
 
 setAllowedSuffixes ($a_suffixes)
 Set allowed Suffixes. More...
 
 getAllowedSuffixes ()
 Get allowed Suffixes. More...
 
 setForbiddenSuffixes ($a_suffixes)
 Set forbidden Suffixes. More...
 
 getForbiddenSuffixes ()
 Get Accepted Suffixes. More...
 
 isValidSuffix ($a_suffix)
 Is suffix valid? More...
 
 setAllowDirectories ($a_val)
 Set allow directories. More...
 
 getAllowDirectories ()
 Get allow directories. More...
 
 setPostDirPath ($a_val)
 Set post dir path. More...
 
 getPostDirPath ()
 Get post dir path. More...
 
 setTableId ($a_val)
 Set table id. More...
 
 getTableId ()
 Get table id. More...
 
 setTitle ($a_val)
 Set title. More...
 
 getTitle ()
 Get title. More...
 
 setUseUploadDirectory ($a_val)
 Set use upload directory. More...
 
 getUseUploadDirectory ()
 Get use upload directory. More...
 
 getLastPerformedCommand ()
 Get performed command. More...
 
 executeCommand ()
 execute command More...
 
 addCommand (&$a_obj, $a_func, $a_name, $a_single=true, $a_allow_dir=false)
 Add command. More...
 
 clearCommands ()
 Clear commands. More...
 
 labelFile ($a_file, $a_label)
 label a file More...
 
 activateLabels ($a_act, $a_label_header)
 activate file labels More...
 
 extCommand ($a_nr)
 call external command More...
 
 setAllowDirectoryCreation ($a_val)
 Set allowed directory creation. More...
 
 getAllowDirectoryCreation ()
 Get allowed directory creation. More...
 
 setAllowFileCreation ($a_val)
 Set allowed file creation. More...
 
 getAllowFileCreation ()
 Get allowed file creation. More...
 
 listFiles ($a_table_gui=null)
 List files. More...
 
 getTable ($a_dir, $a_subdir)
 Get table. More...
 
 renameFileForm ($a_file)
 list files More...
 
 renameFile ()
 rename a file More...
 
 cancelRename ()
 cancel renaming a file More...
 
 createDirectory ()
 create directory More...
 
 uploadFile ()
 Upload file. More...
 
 confirmDeleteFile (array $a_files)
 Confirm file deletion. More...
 
 deleteFile ()
 delete object file More...
 
 unzipFile ($a_file=null)
 delete object file More...
 
 downloadFile ($a_file)
 delete object file More...
 
 getTabs (&$tabs_gui)
 get tabs More...
 
 getActionCommands ()
 
 defineCommands ()
 Define commands available. More...
 

Additional Inherited Members

- Data Fields inherited from ilFileSystemGUI
 $ctrl
 
const CDIR = "cdir"
 
- Protected Member Functions inherited from ilFileSystemGUI
 setPerformedCommand ($command, $pars="")
 Set performed command. More...
 
 parseCurrentDirectory ()
 
 getFileList ($a_dir, $a_subdir=null)
 
 getIncomingFiles ()
 
- Protected Attributes inherited from ilFileSystemGUI
 $use_upload_directory = false
 
 $allowed_suffixes = array()
 
 $forbidden_suffixes = array()
 

Detailed Description

File System Explorer GUI class.

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 13 of file class.ilExAssignmentFileSystemGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilExAssignmentFileSystemGUI::__construct (   $a_main_directory)

Definition at line 15 of file class.ilExAssignmentFileSystemGUI.php.

References $DIC.

16  {
17  global $DIC;
18 
19  $this->ctrl = $DIC->ctrl();
20  parent::__construct($a_main_directory);
21  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ deleteFile()

ilExAssignmentFileSystemGUI::deleteFile ( )

delete object file we can pass one parameter to deleteFile in fileSystemGUI, that contains the name of the class to redirect.

Parameters
stringview to redirect

Definition at line 78 of file class.ilExAssignmentFileSystemGUI.php.

References $_GET, $_POST, and ilExAssignment\instructionFileDeleteOrder().

79  {
80  if ($_GET["ass_id"]) {
82 
83  parent::deleteFile();
84  }
85  }
$_GET["client_id"]
static instructionFileDeleteOrder($a_ass_id, $a_file)
$_POST["username"]
+ Here is the call graph for this function:

◆ getTable()

ilExAssignmentFileSystemGUI::getTable (   $a_dir,
  $a_subdir 
)

Get table.

Parameters

Definition at line 29 of file class.ilExAssignmentFileSystemGUI.php.

References ilFileSystemGUI\getPostDirPath(), and ilFileSystemGUI\getTableId().

30  {
31  include_once("./Modules/Exercise/classes/class.ilExAssignmentFileSystemTableGUI.php");
33  $this,
34  "listFiles",
35  $a_dir,
36  $a_subdir,
37  $this->label_enable,
38  $this->file_labels,
39  $this->label_header,
40  $this->commands,
41  $this->getPostDirPath(),
42  $this->getTableId()
43  );
44  }
getTableId()
Get table id.
getPostDirPath()
Get post dir path.
+ Here is the call graph for this function:

◆ renameFile()

ilExAssignmentFileSystemGUI::renameFile ( )

Rename File name.

Definition at line 90 of file class.ilExAssignmentFileSystemGUI.php.

References $_GET, $_POST, ilExAssignment\renameInstructionFile(), and ilUtil\stripSlashes().

91  {
92  if ($_GET["ass_id"]) {
93  $new_name = str_replace("..", "", ilUtil::stripSlashes($_POST["new_name"]));
94  $old_name = str_replace("/", "", $_GET["old_name"]);
95 
96  if ($new_name != $old_name) {
97  ilExAssignment::renameInstructionFile($old_name, $new_name, $_GET['ass_id']);
98  }
99  }
100  parent::renameFile();
101  }
$_GET["client_id"]
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static renameInstructionFile($a_old_name, $a_new_name, $a_ass_id)
$_POST["username"]
+ Here is the call graph for this function:

◆ saveFilesOrder()

ilExAssignmentFileSystemGUI::saveFilesOrder ( )

Save all the orders.

Definition at line 63 of file class.ilExAssignmentFileSystemGUI.php.

References $_GET, $_POST, ilFileSystemGUI\$ctrl, $ilCtrl, and ilExAssignment\saveInstructionFilesOrderOfAssignment().

64  {
66 
67  if ($_GET["ass_id"]) {
69  $ilCtrl->redirect($this, "listFiles");
70  }
71  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static saveInstructionFilesOrderOfAssignment($a_ass_id, $a_order)
Save ordering of instruction files for an assignment.
$_POST["username"]
+ Here is the call graph for this function:

◆ uploadFile()

ilExAssignmentFileSystemGUI::uploadFile ( )

Insert into database the file order and update the file.

Parameters
stringview to redirect

Definition at line 52 of file class.ilExAssignmentFileSystemGUI.php.

References $_GET, $filename, ilExAssignment\instructionFileInsertOrder(), and ilUtil\stripSlashes().

53  {
54  $filename = ilUtil::stripSlashes($_FILES["new_file"]["name"]);
55 
57  parent::uploadFile();
58  }
$_GET["client_id"]
static instructionFileInsertOrder($a_filename, $a_ass_id, $a_order_nr=0)
Store the file order in the database.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: