Skip to content

Commit

Permalink
Fixed issue #05908: The system is unable to find the requested action…
Browse files Browse the repository at this point in the history
… "printanswers.php".

Mostly fixed via http://git.io/5Zn_9g
  • Loading branch information
sachdeva-shubham committed Mar 16, 2012
1 parent fa84c02 commit 2a39c0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/controllers/PrintanswersController.php
Expand Up @@ -132,11 +132,11 @@ function actionView($surveyid,$printableexport=FALSE)
$printoutput = '';
if(Yii::app()->getConfig('usepdfexport') == 1)
{
$printoutput .= "<form action='".Yii::app()->getController()->createUrl('printanswers/view/'.$surveyid.'/pdf')."' method='post'>\n<center><input type='submit' value='".$clang->gT("PDF export")."'id=\"exportbutton\"/><input type='hidden' name='printableexport' /></center></form>";
$printoutput .= "<form action='".Yii::app()->getController()->createUrl('printanswers/view/surveyid/'.$surveyid.'/printableexport/pdf')."' method='post'>\n<center><input type='submit' value='".$clang->gT("PDF export")."'id=\"exportbutton\"/><input type='hidden' name='printableexport' /></center></form>";
}
if($printableexport == 'pdf')
{
require (Yii::app()->getConfig('rootdir').'/application/config/tcpdf_config_ci.php');
require (Yii::app()->getConfig('rootdir').'/application/config/tcpdf.php');
Yii::import('application.libraries.admin.pdf', true);
$pdf = new pdf();
$pdf->_config = $tcpdf;
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -449,7 +449,7 @@ function run($surveyid,$args) {
// Link to Print Answer Preview **********
if ($thissurvey['printanswers'] == 'Y')
{
$url = Yii::app()->getController()->createUrl("printanswers/view/?surveyid={$surveyid}");
$url = Yii::app()->getController()->createUrl("printanswers/view/surveyid/{$surveyid}");

This comment has been minimized.

Copy link
@c-schmitz

c-schmitz Mar 16, 2012

Contributor

Did you test if this URL style really works? Because it didn't when I tested it.

This comment has been minimized.

Copy link
@sachdeva-shubham

sachdeva-shubham Mar 16, 2012

Author Contributor

I did, it worked.. What's 'urlFormat' set to in your config file?

This comment has been minimized.

Copy link
@c-schmitz

c-schmitz Mar 16, 2012

Contributor

Ok, I admit it works here. My mistake, sorry. ;)

$completed .= "<br /><br />"
. "<a class='printlink' href='$url' target='_blank'>"
. $clang->gT("Print your answers.")
Expand Down

0 comments on commit 2a39c0d

Please sign in to comment.