View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|08419||Feature requests||Survey taking||public||2013-12-02 09:01||2013-12-12 09:05|
|Summary||08419: 2 event before Survey Start|
|Description||Some existing system need to set something before survey start, for example registring is great to be pluggable.|
Some other thing can be done for each page show to public.
Think we can have 2 new events:
- beforeSurveyStart :
- beforePublicPage : can only use Yii system and update $_SESSION/$_GET/$_POST (and setConfig)
- afterPublicPage : get all information of the diplaying page
|Additional Information||Some example of plugin possible|
1) beforePublicPage :
- Replace survey listing
- Set a default survey (if no surveyid is set : set it to a default survey : some of our other have only one big survey, and don't use different survey.)
- Add own registering susystem (test survey and token : if survey and no token : shown own page)
- Add some default session
- Allways registring some script
- etc ...
2) afterPublicPage :
- Update HTML (replace footer): add own #index (maybe move index in plugin)
- Unregistering some js/css (why not) or put js and css in a CDN
- etc ...
Sam: what do you think of this kind af event ?
Think RegisterController for example is better in Plugin
I suggest the following:
- Extend the survey settings wih a registration URL.
- Create a plugin that sets the survey URL to its own direct request URL and creates a token if / when it wants to.
The advantage of this approach is that we can support any registration system whether it is a plugin or an external system that uses the API to create a token.
We don't need any new events since this would use the direct request event, which seems good since registration via a plugin or external application does not have anything to do with Limesurvey itself.
Then, your way is:
- Put the actual "resitration" page to a plugin
- Update the "registration Y/N" to registration page with default set to core/plugon/registration
- Allow user to set their own url here
PS: and what for
- "survey listing"
- allways register script
- Set some $_SESSION var
A "beforePublicPage" can be used by https://www.limesurvey.org/en/forum/plugins/95306-plugin-to-decrypt-url-parameters-prefilled-answers#102442
This user can use "core prefill url" and update his $_GET array with needed var.
|2013-12-02 09:01||DenisChenu||New Issue|
|2013-12-02 09:02||DenisChenu||Relationship added||related to 08351|
|2013-12-02 09:02||DenisChenu||Tag Attached: plugin|
|2013-12-02 09:03||DenisChenu||Additional Information Updated||View Revisions|
|2013-12-10 16:04||DenisChenu||Issue Monitored: sammousa|
|2013-12-10 16:05||DenisChenu||Note Added: 27539|
|2013-12-10 16:06||DenisChenu||Additional Information Updated||View Revisions|
|2013-12-10 17:20||sammousa||Note Added: 27544|
|2013-12-10 17:20||sammousa||Issue Monitored: mdekker|
|2013-12-10 17:20||sammousa||Issue Monitored: c_schmitz|
|2013-12-12 08:58||DenisChenu||Note Added: 27552|
|2013-12-12 08:59||DenisChenu||Note Edited: 27552||View Revisions|
|2013-12-12 09:05||DenisChenu||Note Added: 27553|