Skip to content

Commit

Permalink
Fixed #7004: QA - view of question: click on variable -> bad request
Browse files Browse the repository at this point in the history
dev: this seems to be an easy fix, not sure if there are side effects to this
  • Loading branch information
mennodekker committed Dec 11, 2012
1 parent b095da1 commit 53b4e1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -3944,6 +3944,7 @@ static function StartSurvey($surveyid,$surveyMode='group',$options=NULL,$forceRe
$LEM->sid=sanitize_int($surveyid);
$LEM->sessid = 'survey_' . $LEM->sid;

$LEM->em->StartProcessingGroup($surveyid);
if (is_null($options)) {
$options = array();
}
Expand Down

4 comments on commit 53b4e1c

@TMSWhite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that will have side effects.

1.92 works, so somehow it is getting the surveyid. Can it's approach be followed instead?

@mennodekker
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startprocessinggroup is the only method that can set the sid so it needs to be called at least once.

I don't know if this particular thing worked in 1.92, don't have an install at the moment to check. Only when viewing qa from a question this
error occured on clicking a linked qid from the relevance.

What kind of side effect would you expect? It clears substitutionName/Info and could set syntax highlighting to true when false. If you think it can cause trouble in some place, please tell where so we can test if that is the case.

@TMSWhite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at 1.92 code. Your fix should be fine.

@mennodekker
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the followup!

Please sign in to comment.