Skip to content

Commit

Permalink
Fixed issue: ranking_advanced not working
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Nov 13, 2018
1 parent 413b5b0 commit 6ba8438
Showing 1 changed file with 18 additions and 14 deletions.
Expand Up @@ -50,26 +50,30 @@
</div>

{% set script %}
try{
var ranking{{qId}} = new AdvancedRankingQuestion({
max_answers : {{max_answers}},
min_answers : {{min_answers}},
showpopups : "{{showpopups}}",
samechoiceheight : "{{samechoiceheight}}",
samelistheight : "{{samelistheight}}",
rankingName : "{{rankingName}}",
questionId : "{{qId}}",
numbersActive : {{ ((show_number is same as('yes'))) ? 1 : 0 }},
withHandle : {{ ((show_handle is same as('yes'))) ? 1 : 0 }}
});
ranking{{qId}}.init()
} catch(e){}
try{
var ranking{{qId}} = new AdvancedRankingQuestion({
max_answers : {{max_answers}},
min_answers : {{min_answers}},
showpopups : "{{showpopups}}",
samechoiceheight : "{{samechoiceheight}}",
samelistheight : "{{samelistheight}}",
rankingName : "{{rankingName}}",
questionId : "{{qId}}",
numbersActive : {{ ((show_number is same as('yes'))) ? 1 : 0 }},
withHandle : {{ ((show_handle is same as('yes'))) ? 1 : 0 }}
});
ranking{{qId}}.init()
console.ls.log("Ranking advances initialized for qid {{qId}}");
} catch(e){
console.ls.error(e);
}
{% endset %}
{# DEBUG #}
<div class="hidden">
{{script}}
</div>
{{ registerScript( 'RankingQuestion'~qId, script, 'POS_POSTSCRIPT') }}
{{ registerPackage( 'sortable' ) }}


<!-- end of answer -->

0 comments on commit 6ba8438

Please sign in to comment.