Skip to content

Commit

Permalink
Fixed issue #6862: Question cannot be copied to different group
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 15, 2012
1 parent 61f311d commit 7cbac91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions application/controllers/admin/database.php
Expand Up @@ -325,6 +325,10 @@ function index($sa = null)

if (in_array($action, array('insertquestion', 'copyquestion')) && hasSurveyPermission($surveyid, 'surveycontent','create'))
{
if ($action=='copyquestion')
{
$gid=intval(Yii::app()->request->getPost('copygid'));
}
$baselang = Survey::model()->findByPk($surveyid)->language;
if (strlen(Yii::app()->request->getPost('title')) < 1)
{
Expand All @@ -334,8 +338,6 @@ function index($sa = null)
}
else
{
if (!Yii::app()->request->getPost('lid') || Yii::app()->request->getPost('lid') == '') {$_POST['lid']="0";}
if (!Yii::app()->request->getPost('lid1') || Yii::app()->request->getPost('lid1') == '') {$_POST['lid1']="0";}
if (Yii::app()->request->getPost('questionposition',"")!="")
{
$question_order= intval(Yii::app()->request->getPost('questionposition'));
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/survey/Question/editQuestion_view.php
Expand Up @@ -151,8 +151,8 @@
<?php if ($activated != "Y")
{ ?>
<li>
<label for='gid'><?php $clang->eT("Question group:"); ?></label>
<select name='gid' id='gid'>
<label for='copygid'><?php $clang->eT("Question group:"); ?></label>
<select name='copygid' id='copygid'>

<?php echo getGroupList3($eqrow['gid'],$surveyid); ?>
</select></li>
Expand Down

0 comments on commit 7cbac91

Please sign in to comment.