| Anonymous | Login | 2013-05-24 23:47 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Repositories |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 05104 | User patches | Other | public | 2011-04-11 20:51 | 2012-06-21 13:22 | ||||
| Reporter | TMSWhite | ||||||||
| Assigned To | TMSWhite | ||||||||
| Priority | normal | Severity | minor | ||||||
| Status | closed | Resolution | fixed | ||||||
| Product Version | 1.91RC5 | ||||||||
| Target Version | Fixed in Version | 2.00 | |||||||
| Summary | 05104: Create new question type for stored calculation results, called Equation | ||||||||
| Description | Assuming we've created a generic equation parser (see Issue 05103), create a new Question Type called "Equation". $ia[3] (question text) would hold the equation to be parsed. At design-time, the equation parser would validate the syntax and semantics of the equation (e.g. to ensure that it didn't try to reference values that had not yet been set). At run-time, the equation parser would evaluate $ia[3] each time the Conditions specified it should be visited. The results of that calculation would be stored in the database, just like any other Question's results. The results of the calculation could be either a String, a Number, or a Date. If LimeSurvey supports easy casting across those data types (e.g. store as a String, but do run-time casting of it to a Number or Boolean), then we'd only need one Equation type. If it is safer to strongly type the values, then we'd need StringEquation, LongEquation, DoubleEquation, BooleanEquation, DateEquation types. These Equations would be used for situations where users might want to export the data and run statistics on the values computed for those equations. So, we'd want the ability to implement import/export/statistics on them. Sometimes it is necessary to create intermediate Equations which are needed for display purposes, or branching logic, but don't need to be in an export to a statistical dataset. I've recommended that users prefix such variables with something like "nd_" to indicate that they do not contain relevant data. That way, when they export their datasets, they can use regular expression matching to exclude variables they don't care about. | ||||||||
| Tags | No tags attached. | ||||||||
| LimeSurvey build number | 9992 | ||||||||
| Attached Files | |||||||||
Relationships |
|||||||||||
|
|||||||||||
Notes |
|
|
TMSWhite (developer) 2011-06-19 07:52 |
Notes to self - Which functions would need to be edited to add an Equation question type? common_functions.php export_data_r.php export_data_spss.php admin/export_structure_lsrc.php index.php qanda.php admin/questionhandling.php admin/surveytable_functions.php admin/update/upgrade-mssql.php admin/update/upgrade-msqlnative.php admin/update/upgrade-mysql.php admin/update/upgrade-postgres.php |
|
TMSWhite (developer) 2011-07-13 00:02 edited on: 2011-07-13 00:02 |
This now works in the limesurvey_dev_tms branch - revision 10498. Equations use type '*' and follow the ExpressionManager syntax. The are true questions, so the results are stored in the database, and can be used by {INSERTANS:xxx} or ExpressionManager itself. |
|
TMSWhite (developer) 2011-10-28 23:04 |
This is available in >= 2.0alpha |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-04-11 20:51 | TMSWhite | New Issue | |
| 2011-05-07 11:58 | c_schmitz | Status | new => acknowledged |
| 2011-06-19 07:52 | TMSWhite | Note Added: 15502 | |
| 2011-06-19 18:59 | TMSWhite | Relationship added | related to 05288 |
| 2011-06-19 19:03 | TMSWhite | Relationship added | related to 05103 |
| 2011-07-13 00:02 | TMSWhite | Note Added: 15748 | |
| 2011-07-13 00:02 | TMSWhite | Note Edited: 15748 | View Revisions |
| 2011-10-28 23:04 | TMSWhite | Note Added: 16566 | |
| 2011-10-28 23:04 | TMSWhite | Status | acknowledged => resolved |
| 2011-10-28 23:04 | TMSWhite | Fixed in Version | => 2.00 |
| 2011-10-28 23:04 | TMSWhite | Resolution | open => fixed |
| 2011-10-28 23:04 | TMSWhite | Assigned To | => TMSWhite |
| 2012-06-21 13:22 | c_schmitz | Status | resolved => closed |
| Copyright © 2000 - 2013 MantisBT Team |