View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05858Bug reportsPrint Viewpublic2012-04-05 19:15
Reportermisterdot Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.91+ 
Target Version2.00a3Fixed in Version2.00b1 
Summary05858: Incorrect date format on detailed admin notification email and print answers
Description

Setting the date format in the "edit text elements" settings has no effect on the format in the detailed admin notification nor print answers. Both are still in the dd.mm.yyyy format.
See http://www.limesurvey.org/en/forum/design-issues/71264-date-format-for-the-entire-system

Steps To Reproduce
  1. Change the date format to mm/dd/yyyy on the "edit text elements" settings of the survey.
  2. Enable detailed admin notifications and set "Participants may print answers?" to yes.
  3. Create a survey with a date question, activate, and submit it.
  4. The admin notification email and printanswers.php page will show the date as dd.mm.yyyy
Additional Information

Line 1830 of common_functions.php seems to be the culprit:
function getextendedanswer($fieldcode, $value, $format='', $dateformatphp='d.m.Y')
Changing the format on that line will result in the correct format for admin notifications and printanswers.php.
Build number 120226. The build field in this bug report is only allowing me to enter 5 characters.

TagsNo tags attached.
Attached Files
screenshot.jpg (22,631 bytes)   
screenshot.jpg (22,631 bytes)   
common_functions.diff (274 bytes)   
1847c1847
< 	
---
> 
7065c7065
<                     $answer=getextendedanswer($fname['fieldname'], $idrow[$fname['fieldname']], '', $_SESSION['dateformats']['phpdate']);
---
>                     $answer=getextendedanswer($fname['fieldname'], $idrow[$fname['fieldname']]);
common_functions.diff (274 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)12022
I will donate to the project if issue is resolvedNo
BrowserChrome 17
Database type & versionMySQL 5.1.52
Server OS (if known)CentOS 6.2
Webserver software & version (if known)Apache 2.2.15
PHP Version5.3.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

ryandao

ryandao

2012-03-14 07:23

reporter   ~17914

Last edited: 2012-03-14 07:25

I found out that the problem is at line 7065 in common_functions.php. The date format is not passed to getextendedanswer(). I've attached my patch for common_functions.php

c_schmitz

c_schmitz

2012-03-16 02:44

administrator   ~17942

Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=7964

c_schmitz

c_schmitz

2012-04-05 19:15

administrator   ~18226

Released 2.00b1

Related Changesets

LimeSurvey: Yii b4e3af7d

2012-03-15 18:44:18

c_schmitz

Details Diff
Fixed issue 05858: Incorrect date format on detailed admin notification email and print answers Affected Issues
05858
mod - application/controllers/admin/surveyadmin.php Diff File
mod - application/core/Survey_Common_Action.php Diff File
mod - application/helpers/common_helper.php Diff File
mod - application/helpers/surveytranslator_helper.php Diff File
mod - application/models/Surveys_languagesettings.php Diff File

Issue History

Date Modified Username Field Change
2012-02-27 19:36 misterdot New Issue
2012-02-27 19:36 misterdot File Added: limesurvey_survey_22944.lss
2012-02-27 19:37 misterdot File Added: screenshot.jpg
2012-02-28 10:07 Mazi Assigned To => c_schmitz
2012-02-28 10:07 Mazi Status new => assigned
2012-03-12 17:45 c_schmitz Target Version => 2.00a3
2012-03-14 07:23 ryandao Note Added: 17914
2012-03-14 07:24 ryandao File Added: common_functions.diff
2012-03-14 07:25 ryandao Note Edited: 17914
2012-03-16 02:44 c_schmitz Changeset attached => LimeSurvey Yii b4e3af7d
2012-03-16 02:44 c_schmitz Note Added: 17942
2012-03-16 02:44 c_schmitz Resolution open => fixed
2012-03-16 02:44 c_schmitz Status assigned => resolved
2012-03-16 02:44 c_schmitz Fixed in Version => 2.00b1
2012-04-05 19:15 c_schmitz Note Added: 18226
2012-04-05 19:15 c_schmitz Status resolved => closed