diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 6163b5473..e8f21fc3c 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -19,6 +19,7 @@ - Bugfix [ 956219 ] can't delete survey question - Fixed a bug whhere after posting to a USS you were redirected to the forum for your new submission. + - Bugfix [ 952949 ] Survey Export Composite Fails diff --git a/lib/WebGUI/Wobject/Survey.pm b/lib/WebGUI/Wobject/Survey.pm index 46d0f4ad3..c79b7157d 100644 --- a/lib/WebGUI/Wobject/Survey.pm +++ b/lib/WebGUI/Wobject/Survey.pm @@ -789,8 +789,9 @@ sub www_exportComposite { return "" unless (WebGUI::Privilege::isInGroup($_[0]->get("groupToViewReports"))); $session{header}{filename} = WebGUI::URL::escape($_[0]->get("title")."_composite.tab"); $session{header}{mimetype} = "text/tab"; - return WebGUI::SQL->quickTab("select b.question, a.response, a.userId, a.username, a.ipAddress, a.comment, - a.dateOfResponse from Survey_response a left join Survey_question b on a.Survey_questionId=b.Survey_questionId + return WebGUI::SQL->quickTab("select b.question, c.response, a.userId, a.username, a.ipAddress, c.comment, c.dateOfResponse from Survey_response a + left join Survey_questionResponse c on a.Survey_responseId=c.Survey_responseId + left join Survey_question b on c.Survey_questionId=b.Survey_questionId where a.Survey_id=".$_[0]->get("Survey_id")." order by a.userId, a.ipAddress, b.sequenceNumber"); }