Skip to content

Commit fadba4a

Browse files
authored
Merge pull request #26 from imdhruvgupta/explanation
[CHANGE] added explanation field in question
2 parents 7d44e6c + e333880 commit fadba4a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

app/models/question.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import DS from "ember-data";
33
export default DS.Model.extend({
44
title: DS.attr(),
55
description: DS.attr(),
6+
explanation: DS.attr(),
67
difficulty: DS.attr(),
78
user: DS.belongsTo('user'),
89
choices: DS.hasMany('choice'),

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030
</div>
3131
</div>
3232

33+
<div class="row justify-content-center align-items-center">
34+
<div class="col-2">
35+
<label>Question Explanation:</label>
36+
</div>
37+
<div class="col-5 input-group">
38+
{{textarea type="text" class="input-text py-4" placeholder="Edit this explanation" value=question.explanation}}
39+
</div>
40+
<div class="col-5">
41+
{{markdown-to-html question.explanation extensions='katex'}}
42+
</div>
43+
</div>
44+
3345
{{#unless question.isNew}}
3446

3547
<div class="button-dashed add-choice">

0 commit comments

Comments
 (0)