Skip to content

Commit 7def429

Browse files
committed
add multicorrect flag to questions
1 parent 9a30850 commit 7def429

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

app/models/question.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export default DS.Model.extend({
77
difficulty: DS.attr(),
88
positiveScore: DS.attr(),
99
negativeScore: DS.attr(),
10+
multicorrect: DS.attr('boolean'),
1011
user: DS.belongsTo('user'),
1112
choices: DS.hasMany('choice'),
1213
tags: DS.hasMany('tag')

app/pods/components/question-editor/template.hbs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,21 @@
5858
</div>
5959
</div>
6060

61+
62+
6163
{{#unless question.isNew}}
6264

63-
<div class="button-dashed add-choice">
64-
<a>
65-
<button {{action 'addChoice'}}>Add Choice</button>
66-
</a>
67-
</div>
65+
<div class="row">
66+
<div class="col-4">
67+
<button class="button-dashed add-choice" {{action 'addChoice'}}>Add Choice</button>
68+
</div>
69+
70+
<div class="col-4 my-auto">
71+
{{input id="multicorrect-checkbox" type="checkbox" checked=question.multicorrect}}
72+
<label for="multicorrect-checkbox">Multicorrect </label>
73+
</div>
74+
</div>
75+
6876
<ul>
6977
{{#each question.choices as |choice|}}
7078
<li class="justify-content-center">

0 commit comments

Comments
 (0)