Skip to content

Commit

Permalink
Dev: Add comment about ranking question bug
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jun 14, 2016
1 parent 2306449 commit 62a99bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions application/controllers/admin/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ function index($sa = null)
$aQuestionTypeList=getQuestionTypeList('','array');
$iScaleCount=$aQuestionTypeList[$sQuestionType]['answerscales'];

// This is needed for ranking question. See issue #09828
$__max_db_answers = QuestionAttribute::model()->findByAttributes(array(
'qid' => $iQuestionID,
'attribute' => '__max_db_answers'
Expand All @@ -162,6 +163,7 @@ function index($sa = null)
{
$iMaxCount=(int) Yii::app()->request->getPost('answercount_'.$iScaleID);

// This is needed for ranking question. See issue #09828
if (!empty($__max_db_answers))
{
if ($iMaxCount > $__max_db_answers->value + 1)
Expand Down

0 comments on commit 62a99bb

Please sign in to comment.