ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilStudyProgrammeTypeUploadHandlerGUI Class Reference

ilStudyProgrammeTypeUploadHandlerGUI: ilStudyProgrammeTypeGUI More...

+ Inheritance diagram for ilStudyProgrammeTypeUploadHandlerGUI:
+ Collaboration diagram for ilStudyProgrammeTypeUploadHandlerGUI:

Public Member Functions

 __construct (private string $rid="")
 
- Public Member Functions inherited from ilCtrlAwareStorageUploadHandler
 __construct (protected ResourceStakeholder $stakeholder)
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
- Public Member Functions inherited from ILIAS\MetaData\OERExposer\OAIPMH\Handler\AbstractCtrlAwareUploadHandler
 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 getFileIdentifierParameterName ()
 
 getUploadURL ()
 
 getExistingFileInfoURL ()
 
 getFileRemovalURL ()
 
 executeCommand ()
 Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented. More...
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
 supportsChunkedUploads ()
 

Protected Member Functions

 getUploadResult ()
 
- Protected Member Functions inherited from ilCtrlAwareStorageUploadHandler
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 
- Protected Member Functions inherited from ILIAS\MetaData\OERExposer\OAIPMH\Handler\AbstractCtrlAwareUploadHandler
 readChunkedInformation ()
 
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 

Additional Inherited Members

- Data Fields inherited from ILIAS\UI\Component\Input\Field\UploadHandler
const DEFAULT_FILE_ID_PARAMETER = 'file_id'
 
- Protected Attributes inherited from ilCtrlAwareStorageUploadHandler
Services $storage
 
- Protected Attributes inherited from ILIAS\MetaData\OERExposer\OAIPMH\Handler\AbstractCtrlAwareUploadHandler
const CMD_UPLOAD = 'upload'
 
const CMD_REMOVE = 'remove'
 
const CMD_INFO = 'info'
 
HttpServices $http
 
ilCtrl $ctrl
 
FileUpload $upload
 
bool $is_chunked = false
 
int $chunk_index = 0
 
int $amount_of_chunks = 0
 
string $chunk_id = null
 
int $chunk_total_size = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeTypeUploadHandlerGUI::__construct ( private string  $rid = "")

Definition at line 30 of file class.ilStudyProgrammeTypeUploadHandlerGUI.php.

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ getUploadResult()

ilStudyProgrammeTypeUploadHandlerGUI::getUploadResult ( )
protected

Definition at line 37 of file class.ilStudyProgrammeTypeUploadHandlerGUI.php.

References $message, ILIAS\MetaData\OERExposer\OAIPMH\Handler\AbstractCtrlAwareUploadHandler\getFileIdentifierParameterName(), ILIAS\FileUpload\DTO\UploadResult\isOK(), null, and ILIAS\Repository\upload().

38  {
39 
40  foreach ($this->stakeholder->getPreprocessors() as $p) {
41  $this->upload->register($p);
42  }
43 
44  $this->upload->process();
45 
46  $result_array = $this->upload->getResults();
47  $result = end($result_array);
48 
49  if ($result instanceof UploadResult && $result->isOK()) {
50  $resource_identification = $this->storage->manage()->find($this->rid);
51  if ($resource_identification !== null) {
52  $identifier = $this->storage->manage()->replaceWithUpload(
53  $resource_identification,
54  $result,
55  $this->stakeholder
56  )->getIdentification()->serialize();
57  } else {
58  $identifier = $this->storage->manage()->upload($result, $this->stakeholder)->serialize();
59  }
60  $status = HandlerResult::STATUS_OK;
61  $message = "file upload OK";
62  } else {
63  $identifier = '';
64  $status = HandlerResult::STATUS_FAILED;
65  $message = $result->getStatus()->getMessage();
66  }
67 
68  return new BasicHandlerResult(
70  $status,
71  $identifier,
72  $message
73  );
74  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:

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