View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
14520Bug reportsPrint Viewpublic2021-08-31 13:48
ReporterMazi Assigned Togalads  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.15.x 
Summary14520: Lots of styles for "print answers" view are hardcoded within Twig files which makes adjusting the page design pretty difficult
Description

Some example of hard coded design details at some "print answers" twig files (of which most can't be edited at the theme editor!):
https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/printanswers/question_types/template_ranking.twig#L7
https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/printanswers/question_types/template_boilerplate.twig#L6
https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/printanswers/question_types/template_multiple-opt.twig#L14
https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/printanswers/printanswers_question.twig#L5

There are many more affected at https://github.com/LimeSurvey/LimeSurvey/tree/master/themes/survey/vanilla/views/subviews/printanswers/question_types.

I suggest removing these hard coded design details and replacing them with proper SPAN or similar elements which get assigned some additional CSS classes so we (and all other users) can style those details at the custom.css file.

Steps To Reproduce

Take the attached survey, enter fake data for some questions and call the print answers screen at the end of the survey.

TagsNo tags attached.
Attached Files
print_answers.lss (230,028 bytes)
Bug heat8
Complete LimeSurvey version number (& build)Version 3.15.6+190108
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5
Server OS (if known)Ubuntu 14 TLS
Webserver software & version (if known)Apache 2
PHP Version7.0.26

Relationships

related to 14430 closedJHoeck Usage of obsolete HTML 
related to 14353 acknowledged Print answers as PDF make to wide part 
related to 14628 closeddominikvitt Array numbers question type doesn't include proper subquestion and answer details at "print answers" overview 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-02-12 15:05

developer   ~50523

  1. Maybe it's better to use boostrap class ?
  2. if we don't move to mpdf : Must remove usage of col-sm-X : since tcpdf is not compatible with float : https://bugs.limesurvey.org/view.php?id=14353
Mazi

Mazi

2021-08-31 11:05

updater   ~66232

@ollehar, has this been addressed at v5.x?

ollehar

ollehar

2021-08-31 11:10

administrator   ~66233

Hm, Denis was the last person working on printanswers. His fixes have been merged, but I don't know if this was affected.

DenisChenu

DenisChenu

2021-08-31 11:27

developer   ~66235

Hm, Denis was the last person working on printanswers. His fixes have been merged, but I don't know if this was affected.

?
https://github.com/LimeSurvey/LimeSurvey/commits/3.x-LTS/application/controllers/PrintanswersController.php
https://github.com/LimeSurvey/LimeSurvey/commits/3.x-LTS/themes/survey/vanilla/views/subviews/printanswers

ThIs work on admin print statitics.

I start again to work on this awfull twig part, but 80 questions … one by one.

ollehar

ollehar

2021-08-31 11:28

administrator   ~66236

Oh, sorry, I was talking about LS5, not 3.

DenisChenu

DenisChenu

2021-08-31 11:36

developer   ~66237

https://github.com/LimeSurvey/LimeSurvey/commits/master/themes/survey/vanilla/views/subviews/printanswers
https://github.com/LimeSurvey/LimeSurvey/commits/master/application/controllers/PrintanswersController.php
?

My last update is adding |escape to free text question for security.

ollehar

ollehar

2021-08-31 11:39

administrator   ~66238

Eh. I thought your PR was about printanswers? Oh no, it's for print statistics. Different section?

DenisChenu

DenisChenu

2021-08-31 12:56

developer   ~66239

Not different section : different controller, view and css :).

Statistics part use

  • Admin controller
  • All admin CSS/style
  • PHP view

printanswers part have

  1. own controller
  2. use public view
  3. Can be partially fixed via template

See related : 14353: Print answers as PDF make to wide part
And https://gitlab.com/SondagesPro/SurveyThemes/skelvanilla/-/tree/master_fix-printanswers

galads

galads

2021-08-31 13:48

reporter   ~66241

I will pick up the issue from the other ticket (14353) and follow up on it. I will close this ticket now.

Issue History

Date Modified Username Field Change
2019-02-12 12:11 Mazi New Issue
2019-02-12 12:11 Mazi File Added: print_answers.lss
2019-02-12 12:12 Mazi Relationship added related to 14430
2019-02-12 15:04 DenisChenu Relationship added related to 14353
2019-02-12 15:05 DenisChenu Note Added: 50523
2019-02-12 16:40 cdorin Assigned To => dominikvitt
2019-02-12 16:40 cdorin Priority none => normal
2019-02-12 16:40 cdorin Status new => assigned
2019-02-12 16:40 cdorin Description Updated
2019-03-11 16:23 Mazi Relationship added related to 14628
2019-07-15 11:41 dominikvitt Assigned To dominikvitt => cdorin
2019-08-08 17:26 cdorin Assigned To cdorin => LimeBot
2021-03-10 17:04 ollehar Status assigned => feedback
2021-08-31 08:53 c_schmitz Assigned To LimeBot =>
2021-08-31 08:53 c_schmitz Status feedback => new
2021-08-31 11:05 Mazi Note Added: 66232
2021-08-31 11:05 Mazi Bug heat 2 => 4
2021-08-31 11:10 ollehar Note Added: 66233
2021-08-31 11:10 ollehar Bug heat 4 => 6
2021-08-31 11:27 DenisChenu Note Added: 66235
2021-08-31 11:28 ollehar Note Added: 66236
2021-08-31 11:36 DenisChenu Note Added: 66237
2021-08-31 11:39 ollehar Note Added: 66238
2021-08-31 12:56 DenisChenu Note Added: 66239
2021-08-31 13:48 galads Note Added: 66241
2021-08-31 13:48 galads Bug heat 6 => 8
2021-08-31 13:48 galads Assigned To => galads
2021-08-31 13:48 galads Status new => closed
2021-08-31 13:48 galads Resolution open => fixed