ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilExAssignmentFileSystemGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 getTable (string $a_dir, string $a_subdir)
 
 uploadFile ()
 
 saveFilesOrder ()
 
 deleteFile ()
 
 renameFile ()
 Rename File name. More...
 
- Public Member Functions inherited from ilFileSystemGUI
 __construct (string $main_absolute_directory)
 
 setAllowedSuffixes (array $a_suffixes)
 
 getAllowedSuffixes ()
 
 setForbiddenSuffixes (array $a_suffixes)
 
 getForbiddenSuffixes ()
 
 isValidSuffix (string $a_suffix)
 
 setAllowDirectories (bool $a_val)
 
 getAllowDirectories ()
 
 setPostDirPath (bool $a_val)
 
 getPostDirPath ()
 
 setTableId (string $a_val)
 
 getTableId ()
 
 setTitle (string $a_val)
 
 getTitle ()
 
 setUseUploadDirectory (bool $a_val)
 
 getUseUploadDirectory ()
 
 getLastPerformedCommand ()
 
 executeCommand ()
 
 addCommand (object $a_obj, string $a_func, string $a_name, bool $a_single=true, bool $a_allow_dir=false)
 
 clearCommands ()
 
 labelFile (string $a_file, string $a_label)
 
 activateLabels (bool $a_act, string $a_label_header)
 
 setAllowDirectoryCreation (bool $a_val)
 
 getAllowDirectoryCreation ()
 
 setAllowFileCreation (bool $a_val)
 Set allowed file creation. More...
 
 getAllowFileCreation ()
 
 listFiles (?ilTable2GUI $a_table_gui=null)
 
 getTable (string $a_dir, string $a_subdir)
 
 renameFileForm (string $a_file)
 
 renameFile ()
 
 cancelRename ()
 
 createDirectory ()
 
 uploadFile ()
 
 confirmDeleteFile (array $a_files)
 
 deleteFile ()
 
 unzipFile (?string $a_file=null)
 
 downloadFile (string $a_file)
 
 getActionCommands ()
 
 defineCommands ()
 

Protected Attributes

int $requested_ass_id
 
string $requested_old_name
 
string $requested_new_name
 
array $requested_order
 
array $requested_file
 
- Protected Attributes inherited from ilFileSystemGUI
ilCtrlInterface $ctrl
 
bool $use_upload_directory = false
 
array $allowed_suffixes = []
 
array $forbidden_suffixes = []
 
ilLanguage $lng
 
string $main_absolute_dir
 
bool $post_dir_path = false
 
ilGlobalTemplateInterface $tpl
 
array $file_labels = []
 
bool $label_enable = false
 
bool $allow_directories = true
 
string $table_id = ''
 
string $title = ''
 
array $commands = []
 
string $label_header = ''
 
bool $directory_creation = false
 
bool $file_creation = false
 
ILIAS HTTP Wrapper WrapperFactory $wrapper
 
ILIAS Refinery Factory $refinery
 

Additional Inherited Members

- Data Fields inherited from ilFileSystemGUI
const PARAMETER_CDIR = "cdir"
 
const SESSION_LAST_COMMAND = "fsys_lastcomm"
 
const PARAMETER_NEWDIR = "newdir"
 
const PARAMETER_FHSH = "fhsh"
 
const POST_PARAM_FILE = "file"
 
const PARAM_RESETOFFSET = "resetoffset"
 
const PARAM_OLD_NAME = "old_name"
 
const PARAM_UPFILE = "upfile"
 
const POST_PARAM_NEW_NAME = "new_name"
 
const POST_PARAM_NEW_DIR = "new_dir"
 
const POST_PARAM_UPLOADED_FILE = "uploaded_file"
 
- Protected Member Functions inherited from ilFileSystemGUI
 setPerformedCommand ($command, array $pars=[])
 
 parseCurrentDirectory ()
 
 getFileList (string $a_dir, ?string $a_subdir=null)
 
 getIncomingFiles ()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning File System Explorer GUI class

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

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

Member Function Documentation

◆ deleteFile()

ilExAssignmentFileSystemGUI::deleteFile ( )

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

References ilExAssignment\instructionFileDeleteOrder().

84  : void
85  {
86  if ($this->requested_ass_id > 0) {
87  ilExAssignment::instructionFileDeleteOrder($this->requested_ass_id, $this->requested_file);
88 
89  parent::deleteFile();
90  }
91  }
static instructionFileDeleteOrder(int $a_ass_id, array $a_file)
+ Here is the call graph for this function:

◆ getTable()

ilExAssignmentFileSystemGUI::getTable ( string  $a_dir,
string  $a_subdir 
)

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

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

53  $this,
54  "listFiles",
55  $a_dir,
56  $a_subdir,
57  $this->label_enable,
58  $this->file_labels,
59  "",
60  $this->getActionCommands(),
61  $this->getPostDirPath()
62  );
63  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ renameFile()

ilExAssignmentFileSystemGUI::renameFile ( )

Rename File name.

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

References ilExAssignment\renameInstructionFile(), and ilUtil\stripSlashes().

96  : void
97  {
98  if ($this->requested_ass_id > 0) {
99  $new_name = str_replace("..", "", ilUtil::stripSlashes($this->requested_new_name));
100  $old_name = str_replace("/", "", $this->requested_old_name);
101 
102  if ($new_name != $old_name) {
103  ilExAssignment::renameInstructionFile($old_name, $new_name, $this->requested_ass_id);
104  }
105  }
106  parent::renameFile();
107  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static renameInstructionFile(string $a_old_name, string $a_new_name, int $a_ass_id)
+ Here is the call graph for this function:

◆ saveFilesOrder()

ilExAssignmentFileSystemGUI::saveFilesOrder ( )

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

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

74  : void
75  {
76  $ilCtrl = $this->ctrl;
77 
78  if ($this->requested_ass_id > 0) {
79  ilExAssignment::saveInstructionFilesOrderOfAssignment($this->requested_ass_id, $this->requested_order);
80  $ilCtrl->redirect($this, "listFiles");
81  }
82  }
ilCtrlInterface $ctrl
static saveInstructionFilesOrderOfAssignment(int $a_ass_id, array $a_order)
+ Here is the call graph for this function:

◆ uploadFile()

ilExAssignmentFileSystemGUI::uploadFile ( )

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

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

66  : void
67  {
68  $filename = ilUtil::stripSlashes($_FILES["new_file"]["name"]);
69 
70  ilExAssignment::instructionFileInsertOrder($filename, $this->requested_ass_id);
71  parent::uploadFile();
72  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static instructionFileInsertOrder(string $a_filename, int $a_ass_id, int $a_order_nr=0)
$filename
Definition: buildRTE.php:78
+ Here is the call graph for this function:

Field Documentation

◆ $requested_ass_id

int ilExAssignmentFileSystemGUI::$requested_ass_id
protected

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

◆ $requested_file

array ilExAssignmentFileSystemGUI::$requested_file
protected

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

◆ $requested_new_name

string ilExAssignmentFileSystemGUI::$requested_new_name
protected

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

◆ $requested_old_name

string ilExAssignmentFileSystemGUI::$requested_old_name
protected

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

◆ $requested_order

array ilExAssignmentFileSystemGUI::$requested_order
protected

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


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