Skip to content

Commit

Permalink
Fixed issue #11975: On Responses Screen - Array Subquestion is not di…
Browse files Browse the repository at this point in the history
…splayed, when you view the results on screen in extended view, the Sub Question text is not shown, so you dont know which column responds to which question.
  • Loading branch information
LouisGac committed Dec 6, 2016
1 parent 694f3e6 commit 148b54b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion application/views/admin/responses/listResponses_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,15 @@
{
$colName = viewHelper::getFieldCode($fieldmap[$column->name],array('LEMcompat'=>true)); // This must be unique ......
$base64jsonFieldMap = base64_encode(json_encode($fieldmap[$column->name]));
$colDetails = '';
if(isset($fieldmap[$column->name]['subquestion'])){
$colDetails .= '<em>'.$fieldmap[$column->name]['subquestion'].'</em><br/>';
}
$colDetails .= ellipsize($fieldmap[$column->name]['question'], $model->ellipsize_header_value);

$aColumns[]=
array(
'header' => '<span data-toggle="tooltip" data-placement="bottom" title="'.quoteText(strip_tags($fieldmap[$column->name]['question'])).'">'.$colName.' <br/> '.ellipsize($fieldmap[$column->name]['question'], $model->ellipsize_header_value).'</span>',
'header' => '<span data-toggle="tooltip" data-placement="bottom" title="'.quoteText(strip_tags($fieldmap[$column->name]['question'])).'">'.$colName.' <br/> '.$colDetails.'</span>',
'headerHtmlOptions'=>array('style'=>'min-width: 350px;'),
'name' => $column->name,
'type' => 'raw',
Expand Down

5 comments on commit 148b54b

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lack of subquestion for array text and array number question here :) : subquestion1 and subquestion2 see https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/viewHelper.php#L105

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because i fix it in 1.92, then not catched. viewHelper::getFieldText is badly coded , using Expression Manager and more option than really needed. But it was done for this part (and export part)

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, all the fieldmap system should be removed, and replace by some methods in the question model

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

Please sign in to comment.