Skip to content

Commit

Permalink
fix(*): fix the query to get the options for survey
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush8923 committed Sep 4, 2024
1 parent 9bd4a3c commit 8f59b63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/model/survey_question_option.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static function get_options_by_option_text($optiontext) {

public static function get_option_ids_for_survey($surveyid) {
global $DB;
$sql = "SELECT option.id FROM {cc_survey_questions} as survey_question
JOIN {cc_survey_question_options} as option ON option.survey_question_id = survey_question.id
$sql = "SELECT q_option.id FROM {cc_survey_questions} as survey_question
JOIN {cc_survey_question_options} as q_option ON q_option.survey_question_id = survey_question.id
WHERE survey_question.survey_id = :surveyid
";
$params = ['surveyid' => $surveyid];
Expand Down

0 comments on commit 8f59b63

Please sign in to comment.