View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
10436Bug reportsErgonomypublic2016-02-23 08:51
Reporterholch Assigned ToLouisGac 
PriorityurgentSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary10436: Question list in the left bar has problems with equations and doesn't show correct order of questions.
Description

In the left bar the list of questions has two problems:

  • Equation questions change the layout (title turns a link)
  • Questions are not in the correct order they are in the questionnaire structure, but rather the way they were created. E.g. if you add a question in the middle of the survey, it will put to the end, which is quite confusing, because you would expect it in the order it is in the questionnaire.
TagsNo tags attached.
Attached Files
Screenshot_5.png (28,080 bytes)   
Screenshot_5.png (28,080 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)2.5 160213
I will donate to the project if issue is resolvedNo
Browserchrome
Database type & versionMySQL
Server OS (if known)Windows
Webserver software & version (if known)WAMP
PHP Version5.5.12

Relationships

related to 10285 closedLouisGac Question with lot of text must be "cut" in Question explorer 
parent of 10496 closedLouisGac Question list in the left bar has problems with tag 
related to 10497 closedollehar Question list in the left bar has problems with arabic survey 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-02-13 18:58

developer   ~35098

I've found the disorder, but don't find the way , thanks !
order by id not order :)

holch

holch

2016-02-13 20:33

reporter   ~35100

Actually the actual question list has the same problem. But there you can click on the order in the heading of the table and sort it by order yourself. But I think personally people will find it easier if the default behaviour would be that the table is sorted by the actual order, not the ID - following the structure of the questionnaire.

DenisChenu

DenisChenu

2016-02-14 09:17

developer   ~35103

Always follow Questionnaire structure by default, allow ordering alphabetical by code. DOn't see why allow by qid ?

LouisGac

LouisGac

2016-02-16 17:38

developer   ~35241

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=17430

LouisGac

LouisGac

2016-02-16 17:45

developer   ~35242

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=17431

DenisChenu

DenisChenu

2016-02-16 18:43

developer   ~35250

You really don't want to use existing code ... I'm ok : code must be reworked to use only php function, but you can start to rewrite if

ANd here, about : views must use only html and echo , i do not agree : controller must send all the question to the view.
The view have to fix the text according of IS need, it's not the proble of the controller.

ANd here : the fix don't fix it really.

See screenshot.

You have to strip_tags

c_schmitz

c_schmitz

2016-02-16 21:55

administrator   ~35258

2.50+ Build 160216 released

LouisGac

LouisGac

2016-02-17 10:34

developer   ~35287

Last edited: 2016-02-17 10:37

strip tags :

https://github.com/LimeSurvey/LimeSurvey/commit/d015c3010a8e633bf411a98a66c328eb8a46cac4

About the MVC pattern :

like for any pattern, there is various possible implementations of it, less or more strict. For example, Yii is known for its very free interpretation of it, which allows calls to the model from the views, and allow to build HTML from the model (for grid list dataprovider).

One of the main goal of MVC pattern is to separate the work between a backend team (developers using business language such as PHP), and a frontend team (with integrators using HTML, CSS and today JS, but no necessary business language such as PHP).

So, in the purest way of implementing it, views should have access only to simple variables, easy to read and understand for frontend developers. In the purest way, a view can have few if statements, but nor a foreach statement : foreach statement should be in controllers (like I did for the views "header", "item" and "footer", or like Yii does for the grid/list views).

About existing code :

I use it as much as I can. When it's too much dirty, or too much complex, or too much hard to update, and when it's just easier to rewrite a clean function, I don't.

For the question display, like you proposed I first tried to use the LS way of doing :
https://github.com/LimeSurvey/LimeSurvey/blob/676db8bb654b6ba5a5504f57a719a36bb5982625/application/views/admin/super/_question_explorer.php#l89-l92

Because most of the time, I listen your advises, I take in account your remarks. But at last, I'm the one responsible of my code, and in case of problems, I'm the one having trouble. So I MUST choose the right solution.

To my point of view, using "templatereplace" and then viewHelper::stripTagsEM(LimeExpressionManager::GetLastPrettyPrintExpression()); (a call to a static function inside a call to another static function, which contains call to global variables and session variable.....) just to render a string is pure craziness, and way to much complex to maintain and modify.

That's why finally, I didn't used it.

DenisChenu

DenisChenu

2016-02-17 10:37

developer   ~35288

templatereplace is not needed in this list : we don't need to show error here. Only in "question view". I don't add templatereplace here, it come form organize.
I think organize must not use templatereplace, but i klnow some user who use it to see error ....

for the other point : i open a developper mantis

LouisGac

LouisGac

2016-02-17 10:52

developer   ~35291

Denis : you advised me to use the code to render the question in the question summary. As I often do it, I listened to your remark, to your advise :
https://github.com/LimeSurvey/LimeSurvey/blob/676db8bb654b6ba5a5504f57a719a36bb5982625/application/views/admin/survey/Question/question_view.php#l37-l39

I just reused that piece of code, as you suggested. Finally, it was doing to much problems, then I decided to remove it, and now you're blaming me for it.

In general, I listen and take in account all your remarks and suggestions. I've did a lot of modifications on the base of your requests. Of course : I'm not doing all what you're asking for, because we can have different point of views.

c_schmitz

c_schmitz

2016-02-17 18:11

administrator   ~35341

Version 2.50+ Build 160217 released

DenisChenu

DenisChenu

2016-02-18 09:07

developer   ~35376

Jut to answer to tis sentence:
"I just reused that piece of code, as you suggested. "

Here i suggested using viewHelper::flatEllipsizeText https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/viewHelper.php#L218 and never to use templatereplace etc ....

I really dislike the templatereplace system everywhere ....

And if use templatereplace : use viewHelper::stripTagsEM

I really feel that we do not care of my mouth.

LouisGac

LouisGac

2016-02-18 10:07

developer   ~35383

we care a lot about what you're saying. a lot. I did a lot of changes in the base of what you said.

That doesn't imply that I must do all what you ask without exception.
It's 2 different things.

Also, it doesn't imply that I should do immediately the changes you're asking. For example, it's clear from months now that we'll do a whole session for accessibility stuff (like the aria-hidden). It's just not the priority for now. But we'll do it : no doubt about it.

c_schmitz

c_schmitz

2016-02-23 08:51

administrator   ~35570

Version 2.50+ Build 160222 released

Related Changesets

LimeSurvey: master 7f87a060

2016-02-16 16:38:07

LouisGac

Details Diff
Fixed issue 10436: Display the question correctly in question explorer Affected Issues
10436
mod - application/core/Survey_Common_Action.php Diff File
mod - application/helpers/expressions/em_core_helper.php Diff File
mod - application/helpers/viewHelper.php Diff File
mod - application/views/admin/super/_question_explorer.php Diff File

LimeSurvey: master 25cf5598

2016-02-16 16:45:07

LouisGac

Details Diff
Fixed issue 10436: Question rendering in question explorer improvement Affected Issues
10436
mod - application/core/Survey_Common_Action.php Diff File

Issue History

Date Modified Username Field Change
2016-02-13 18:21 holch New Issue
2016-02-13 18:21 holch File Added: Screenshot_5.png
2016-02-13 18:58 DenisChenu Note Added: 35098
2016-02-13 18:59 DenisChenu Relationship added related to 10285
2016-02-13 20:33 holch Note Added: 35100
2016-02-14 09:17 DenisChenu Note Added: 35103
2016-02-15 13:31 c_schmitz Priority normal => urgent
2016-02-15 14:00 ollehar Assigned To => LouisGac
2016-02-15 14:00 ollehar Status new => assigned
2016-02-16 17:38 LouisGac Changeset attached => LimeSurvey master 7f87a060
2016-02-16 17:38 LouisGac Note Added: 35241
2016-02-16 17:38 LouisGac Resolution open => fixed
2016-02-16 17:45 LouisGac Changeset attached => LimeSurvey master 25cf5598
2016-02-16 17:45 LouisGac Note Added: 35242
2016-02-16 17:45 LouisGac Status assigned => resolved
2016-02-16 18:43 DenisChenu Note Added: 35250
2016-02-16 18:44 DenisChenu File Added: Capture du 2016-02-16 18-43-06.png
2016-02-16 21:55 c_schmitz Note Added: 35258
2016-02-16 21:55 c_schmitz Status resolved => closed
2016-02-17 08:20 DenisChenu Relationship added parent of 10496
2016-02-17 08:22 DenisChenu Relationship added related to 10497
2016-02-17 10:34 LouisGac Note Added: 35287
2016-02-17 10:34 LouisGac Status closed => feedback
2016-02-17 10:34 LouisGac Resolution fixed => reopened
2016-02-17 10:35 LouisGac Note Edited: 35287
2016-02-17 10:37 LouisGac Note Edited: 35287
2016-02-17 10:37 DenisChenu Note Added: 35288
2016-02-17 10:52 LouisGac Note Added: 35291
2016-02-17 13:21 LouisGac Status feedback => resolved
2016-02-17 13:21 LouisGac Resolution reopened => fixed
2016-02-17 18:11 c_schmitz Note Added: 35341
2016-02-17 18:11 c_schmitz Status resolved => closed
2016-02-18 09:07 DenisChenu Note Added: 35376
2016-02-18 09:07 DenisChenu Status closed => feedback
2016-02-18 09:07 DenisChenu Resolution fixed => reopened
2016-02-18 09:07 DenisChenu Status feedback => closed
2016-02-18 09:07 DenisChenu Resolution reopened => fixed
2016-02-18 09:07 DenisChenu Fixed in Version => 2.5
2016-02-18 10:07 LouisGac Note Added: 35383
2016-02-18 10:07 LouisGac Status closed => feedback
2016-02-18 10:07 LouisGac Resolution fixed => reopened
2016-02-22 10:01 LouisGac Status feedback => resolved
2016-02-22 10:01 LouisGac Resolution reopened => fixed
2016-02-23 08:51 c_schmitz Note Added: 35570
2016-02-23 08:51 c_schmitz Status resolved => closed