Skip to content

Commit

Permalink
Fixed #7101: Error URL doesn't work when submitting a survey via data…
Browse files Browse the repository at this point in the history
… entry screen

dev: some more path fixes
  • Loading branch information
mennodekker committed Jan 3, 2013
1 parent 117c875 commit 040f7c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions application/controllers/admin/dataentry.php
Expand Up @@ -1601,8 +1601,9 @@ public function insert()
{
$errormsg .= "<br /><br />".$clang->gT("Follow the following link to update it").":\n";
$errormsg .= CHtml::link("[id:$lastanswfortoken]",
Yii::app()->baseUrl.('/admin/dataentry/editdata/subaction/edit/id/'.$lastanswfortoken.'/surveyid/'.$surveyid.'/lang/'.$rlanguage),
$this->getController()->createUrl('/admin/dataentry/sa/editdata/subaction/edit/id/'.$lastanswfortoken.'/surveyid/'.$surveyid.'/lang/'.$rlanguage),
array('title' => $clang->gT("Edit this entry")));
$errormsg .= "<br/><br/>";
}
else
{
Expand Down Expand Up @@ -1779,7 +1780,7 @@ public function insert()
$utresult = dbExecuteAssoc($utquery); //Yii::app()->db->Execute($utquery) or safeDie ("Couldn't update tokens table!<br />\n$utquery<br />\n".Yii::app()->db->ErrorMsg());

// save submitdate into survey table
$sdquery = "UPDATE {{survey_$surveyid}} SET submitdate='".$submitdate."' WHERE id={$new_response}\n";
$sdquery = "UPDATE {{survey_$surveyid}} SET submitdate='".$submitdate."' WHERE id={$last_db_id}\n";
$sdresult = dbExecuteAssoc($sdquery) or safeDie ("Couldn't set submitdate response in survey table!<br />\n$sdquery<br />\n");
$last_db_id = getLastInsertID("{{survey_$surveyid}}");
}
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/responses/browsemenubar_view.php
Expand Up @@ -35,7 +35,7 @@
<?php }
if (hasSurveyPermission($surveyid, 'responses', 'create'))
{ ?>
<a href='<?php echo $this->createUrl("admin/dataentry/view/surveyid/$surveyid"); ?>'>
<a href='<?php echo $this->createUrl("admin/dataentry/sa/view/surveyid/$surveyid"); ?>'>
<img src='<?php echo $sImageURL; ?>dataentry.png' alt='<?php $clang->eT("Dataentry Screen for Survey"); ?>' /></a>
<?php }
if (hasSurveyPermission($surveyid, 'statistics', 'read'))
Expand Down

0 comments on commit 040f7c5

Please sign in to comment.