View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17479 | Bug reports | Plugins | public | 2021-07-27 12:59 | 2021-07-29 09:15 |
Reporter | dschirge | Assigned To | galads | ||
Priority | none | Severity | partial_block | ||
Status | acknowledged | Resolution | open | ||
Product Version | 3.25.20 | ||||
Summary | 17479: How to change template and survey format temporary from outside | ||||
Description | Hi guys, for a project we need to change the format and/or template for a specific survey just for some users. We are doing it with modifying the session. For example we change the template via
It is working as expected but with a problem. Using different browsers or private tabs is no possible solution. How can you solve this mixture of admin and user sessions? | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | Version 3.25.14+210218 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MySQL 5.x | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 5.6 | ||||
Always launch with newtest=Y or Private browser. It's a question : not an issue here … |
|
The surveys are startet with newTest=Y, private browsing is unfortunately not possible. |
|
The problem is with the session handling, example:
If you log out and log in to the admin interface again, the format is shown as G again because of the new session. So the problem - to me - seems to be the mix of admin and public survey session. Any idea how to differentiate these settings??? |
|
Why? |
|
RE "Why?" -> The customer's answer: "Because people at the company are stupid. We just need a working solution for which we do not have to train every new employee." |
|
OK, to repeat what I wrote in the chat, what you need is probably a patch that overrides the PHP session if a certain URL parameter is set. |
|
Well, I think a better session handling at Limesurvey would be the core thing. Why can public survey sessions and admin sessions get messed up at all? Can we somehow differentiate between a survey taking session and the admin session? We are already adjusting the session if the URL parameter is set, see code snippet above: Thing is that this adjustment also affects the admin session, see step 3 above. |
|
https://gitlab.com/SondagesPro/coreAndTools/sessionNameBySurvey This must be tested more and more. Else : i really think we muts have different session name too. For each survey and for admin. Something you can try :
|
|
I agree with DenisChenu. |
|
the plugin use own session name only for survey controller, never for admin controller : https://gitlab.com/SondagesPro/coreAndTools/sessionNameBySurvey/-/blob/master/sessionNameBySurvey.php#L33 But : to be incuded in LS core : best option seems to extend https://github.com/LimeSurvey/LimeSurvey/blob/master/framework/web/CHttpSession.php |
|
@DenisChenu, for which use case did you actually develop this plugin for? Did you test it with a new 3.27 version? RE " i really think we muts have different session name too. For each survey and for admin." -> I totally agree! |
|
https://bugs.limesurvey.org/view.php?id=13761 |
|
Another more easy solution : 2 different link (alias) Different website => 2 different session. |
|
@DenisChenu, does that work with a load balanced system with db based sessions? Can we have the same Limesurvey system to use e.g. |
|
And plugin solution : Must be adapted to the situation, Finally beforeControllerAction must check if you are in admin or public and register the good afterFindSurvey according to this. maybe best
|
|
Session cookies are not the same , then i think yes. |
|
Do the trick |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2021-07-27 12:59 | dschirge | New Issue | |
2021-07-27 13:02 | Mazi | Description Updated | |
2021-07-27 13:09 | DenisChenu | Note Added: 65647 | |
2021-07-27 13:20 | dschirge | Note Added: 65648 | |
2021-07-27 14:44 | Mazi | Note Added: 65650 | |
2021-07-27 15:14 | ollehar | Note Added: 65651 | |
2021-07-27 21:34 | Mazi | Note Added: 65657 | |
2021-07-27 21:57 | ollehar | Note Added: 65658 | |
2021-07-27 21:57 | ollehar | Note Edited: 65658 | |
2021-07-27 23:47 | Mazi | Note Added: 65659 | |
2021-07-28 08:30 | DenisChenu | Note Added: 65662 | |
2021-07-28 09:06 | dschirge | Note Added: 65664 | |
2021-07-28 09:09 | DenisChenu | Note Added: 65665 | |
2021-07-28 10:29 | Mazi | Note Added: 65668 | |
2021-07-28 10:57 | DenisChenu | Note Added: 65669 | |
2021-07-28 14:56 | DenisChenu | Note Added: 65678 | |
2021-07-28 15:01 | Mazi | Note Added: 65680 | |
2021-07-28 15:02 | DenisChenu | Note Added: 65682 | |
2021-07-28 15:04 | DenisChenu | Note Added: 65684 | |
2021-07-28 17:52 | DenisChenu | Relationship added | related to 17107 |
2021-07-29 08:54 | galads | Assigned To | => galads |
2021-07-29 08:54 | galads | Status | new => acknowledged |
2021-07-29 09:15 | DenisChenu | Note Added: 65722 |