View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
13513 | Feature requests | Expression Manager | public | 2018-03-21 17:42 | 2021-03-07 21:55 |
Reporter | orvil | Assigned To | DenisChenu | ||
Priority | none | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Fixed in Version | develop | ||||
Summary | 13513: Update save way to add custom made EM functions | ||||
Description | Additional EM functions are very helpful to adapt questionaires on specific needs, to shorten surveys and/or replace complicated EM expressions with shorter ones. But with (almost) every update an adapted em_core_helper.php and em_javascript.js is replaced with the default one. Solution would be an update save way to add custom made em functions, e.g. like a plugin. | ||||
Tags | No tags attached. | ||||
Bug heat | 14 | ||||
Story point estimate | |||||
Users affected % | |||||
has duplicate | 14130 | closed | DenisChenu | Allow to expose PHP functions to Expression Manager via config or GUI. |
Why not open it up via a include file which can be edited via settings. You already proposed the plugin idea over two years ago. To me ExpressionManager seems to be a big blackhole which nobody likes to really touch. |
|
You are right, did this already (2Y7M ago), forgot it meanwhile :o Anyhow it is not that hard to write new functions for the EM and some features requested in the wishlist you mentioned are avaliable meanwhile. My idea to realize an EM extender like a plugin is based on the possibility to share plugins with the community. Unfortunately plugins and plugin how-to's are Although this would be a real booster for LS! |
|
Expression Manager NEED to be extendable :).
:) It's a +1000 for this Feature |
|
Finally found a way to implement this! Working with php and js, so usable in question.by-question, group-by-group and all-in-one mode of showing a survey. created pull requests for em_core_helper.php (~30 lines of code), and sample extensions files (php, js) |
|
Yep : EM function a php function (existing or not) + a js function (existing or not). But , i think we need to move all of this to an helper or model to more easily managed after, and maybe add some caching (because test/read file is time consuming). I think @olle like if we have "one function => one directory", and maybe he a 'config' … file Personnaly, i had it with event if i do it. But think LS GMBH don't like event. @orvil : you don't have limesurvey-team irc access ? |
|
@DenisChenu: as someone wrote once the LEM is genius, but a big black hole, hard to understand and to maintain. Think this will take quite some time (1-2 years probably?). So the proposed solution is an interim way, but I think all created additional functions can be migrated to a new solution then easily. By the way: the folders and folder structure i choose for implementation is a suggestion => an other structure and folder naming is possible too, to pre-fit a modular concept Finally, no, I'm sorry I don't have a limesurvey-team irc access. |
|
Can this be done easily with a new event? |
|
@olle : it's what i think adding a new event, plugin can add function to EM |
|
@DenisChenu: Hi, do you have some some progress with the em extension/plugin already? |
|
OK, well, if anyone makes a PR we can merge it. |
|
As you suggested the em plugin requires three++ steps to take:
|
|
@olle: sorry I'm a noop: what's meant by PR? |
|
PR = pull request (on github). |
|
oh, that easy :))) |
|
I have some issue with travis, i think it's because i made the pull request on a old version. I redo it , but same principle done |
|
Develop Travis is broken right now. Master should work. |
|
No, i have an issue on my commit, i fix it today :) |
|
Fix committed to master_13513 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=28297 |
|
Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=28345 |
|
LimeSurvey: master_13513 2a6f8fd5 2018-05-30 19:35 Details Diff |
New feature 13513 : allow plugins to add expresssion manager function |
Affected Issues 13513 |
|
mod - application/controllers/admin/expressions.php | Diff File | ||
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - application/helpers/expressions/em_manager_helper.php | Diff File | ||
add - plugins/Demo/demoAddEmFunction/assets/demoAddEmFunction.js | Diff File | ||
add - plugins/Demo/demoAddEmFunction/demoAddEmFunction.php | Diff File | ||
add - plugins/Demo/demoAddEmFunction/exampleFunctions.php | Diff File | ||
LimeSurvey: develop 2a7490b5 2018-10-16 19:06 Committer: GitHub Details Diff |
New feature 13513 : allow plugins to add expresssion manager function (#1081) Dev: fix call_user_func_array not call_user_func Dev: fixed issue with any number of arguments function Dev: PHP function receive a big array with argument : call_user_function Dev: add doHtmlList in example Dev: rename event to ExpressionManagerStart : this is the real event Dev: idea to add too a way to update knowVars of EM Dev: add config.xml for plugin Dev: fix js not loaded (strangely : Em is not initialized) Dev: register expression-extend just after done Dev: add sayHello function |
Affected Issues 13513 |
|
mod - application/config/packages.php | Diff File | ||
mod - application/controllers/admin/expressions.php | Diff File | ||
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - application/helpers/expressions/em_manager_helper.php | Diff File | ||
add - plugins/Demo/demoAddEmFunction/assets/demoAddEmFunction.js | Diff File | ||
add - plugins/Demo/demoAddEmFunction/config.xml | Diff File | ||
add - plugins/Demo/demoAddEmFunction/demo/limesurvey_survey_demo.lss | Diff File | ||
add - plugins/Demo/demoAddEmFunction/demoAddEmFunction.php | Diff File | ||
add - plugins/Demo/demoAddEmFunction/exampleFunctions.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-03-21 17:42 | orvil | New Issue | |
2018-03-21 18:43 | c_schmitz | Project | Bug reports => Feature requests |
2018-03-21 21:54 | jelo | Note Added: 47167 | |
2018-03-22 09:37 | orvil | Note Added: 47171 | |
2018-03-22 10:53 | DenisChenu | Note Added: 47176 | |
2018-03-22 10:53 | DenisChenu | Note Edited: 47176 | |
2018-05-20 21:24 | orvil | Note Added: 47696 | |
2018-05-21 09:18 | DenisChenu | Note Added: 47697 | |
2018-05-21 10:40 | orvil | Note Added: 47698 | |
2018-05-22 10:28 | ollehar | Note Added: 47702 | |
2018-05-30 10:29 | DenisChenu | Note Added: 47906 | |
2018-05-30 10:50 | orvil | Note Added: 47907 | |
2018-05-30 10:57 | ollehar | Note Added: 47909 | |
2018-05-30 10:58 | orvil | Note Added: 47910 | |
2018-05-30 11:00 | orvil | Note Added: 47911 | |
2018-05-30 11:20 | ollehar | Note Added: 47912 | |
2018-05-30 13:05 | orvil | Note Added: 47918 | |
2018-05-30 17:36 | DenisChenu | Note Added: 47928 | |
2018-05-31 11:05 | DenisChenu | Note Added: 47930 | |
2018-05-31 11:23 | ollehar | Note Added: 47931 | |
2018-06-01 08:17 | DenisChenu | Note Added: 47937 | |
2018-10-06 10:38 | DenisChenu | Relationship added | has duplicate 14130 |
2018-10-10 17:49 | DenisChenu | Changeset attached | => LimeSurvey master_13513 2a6f8fd5 |
2018-10-10 17:49 | DenisChenu | Note Added: 49297 | |
2018-10-10 17:49 | DenisChenu | Assigned To | => DenisChenu |
2018-10-10 17:49 | DenisChenu | Resolution | open => fixed |
2018-10-16 17:07 | DenisChenu | Changeset attached | => LimeSurvey develop 2a7490b5 |
2018-10-16 17:07 | DenisChenu | Note Added: 49340 | |
2018-10-16 17:23 | DenisChenu | Status | new => resolved |
2018-10-16 17:23 | DenisChenu | Fixed in Version | => develop |
2021-03-07 21:55 | c_schmitz | Status | resolved => closed |