|
|
Line 1: |
Line 1: |
| '''When''' | | '''When''' |
|
| |
|
| This event is fired when permission is saved via the admin GUI, just after $_FILES was checked. | | This event is fired when a participant upload a file in Upload file question type |
|
| |
|
| '''Input''' | | '''Input''' |
Line 7: |
Line 7: |
| The event receives the following information: | | The event receives the following information: |
|
| |
|
| * ''surveyId'' : The survey id | | * ''aNewPermissions'' The array of new permission |
| * ''responseId'' : The response id (null if preview) | | * ''iSurveyID'' The entity id, 0 for global |
| * ''qid'' : The upload question id | | * ''iUserID'' The user id |
| * ''preview'' : Preview mode as boolean
| |
| * ''fieldname'' : The fieldname of the DB (as SGQA)
| |
| * ''maxfilesize'' : The max file size question advanced setting
| |
| * ''valid_extensions_array'' : The valid extension question advanced settings as array
| |
| * ''success'' : boolean (set as true by core)
| |
| * ''filename'' : The filename of the file
| |
| * ''size'' : The size of the file
| |
| * ''tmp_name'' : The temporary name of the uploaded file ($_FILES['uploadfile']['tmp_name'])
| |
| * ''ext'' : The extension of the filename
| |
| * ''randfilename'' : The random file name generated by LimeSurvey (futmp_) (used in case of success)
| |
| * ''randfileloc'' :The final location on server include the random filename (used in case of success)
| |
| | |
|
| |
|
| '''Possible output''' | | '''Possible output''' |
|
| |
|
| * ''success'' : Boolean, if false : file was not moved and was deleted on serveur | | * none |
| * ''msg'' : A string to return to user (in case of success or error)
| |
| * ''disableCheck'' : Boolean : disable default LimeSurvey core checking about size and format/extension.
| |
| * ''movefile'' : Boolean, allow LimeSurvey core to move the file (default as true)
| |
| * ''filename'' : The filename to be used in response part
| |
| * ''ext'' :Extension to be used
| |
| * ''tmp_name'' : The temporary file name (used as real uploaded file content)
| |
| * ''randfilename'' : the final random filename
| |
| * ''randfileloc'' : the final random file location (include randfilename)
| |
| | |
|
| |
|
| [[Category:Plugins events]] | | [[Category:Plugins events]] |
Latest revision as of 12:32, 14 November 2024
When
This event is fired when a participant upload a file in Upload file question type
Input
The event receives the following information:
- aNewPermissions The array of new permission
- iSurveyID The entity id, 0 for global
- iUserID The user id
Possible output