Skip to content

Commit e301636

Browse files
Merge pull request #27 from coding-blocks/negative_marking
Negative marking
2 parents fadba4a + 647ee8b commit e301636

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

app/models/choice.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@ import DS from "ember-data";
33
export default DS.Model.extend({
44
title: DS.attr(),
55
description: DS.attr(),
6-
positiveWeight: DS.attr(),
7-
negativeWeight: DS.attr(),
86
question: DS.belongsTo('question')
97
})

app/models/question.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export default DS.Model.extend({
55
description: DS.attr(),
66
explanation: DS.attr(),
77
difficulty: DS.attr(),
8+
positiveScore: DS.attr(),
9+
negativeScore: DS.attr(),
810
user: DS.belongsTo('user'),
911
choices: DS.hasMany('choice'),
1012
tags: DS.hasMany('tag')

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@
4242
</div>
4343
</div>
4444

45+
<div class="row justiy-content-center align-items-center">
46+
<div class="col-1">
47+
<label>Positive Score</label>
48+
</div>
49+
<div class="col-5">
50+
{{input type="number" class="input-text" value=question.positiveScore}}
51+
</div>
52+
53+
<div class="col-1">
54+
<label>Negative Score</label>
55+
</div>
56+
<div class="col-5">
57+
{{input type="number" class="input-text" value=question.negativeScore}}
58+
</div>
59+
</div>
60+
4561
{{#unless question.isNew}}
4662

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

config/environment.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ module.exports = function(environment) {
3636
// ENV.APP.LOG_VIEW_LOOKUPS = true;
3737
ENV.ONEAUTH = {
3838
clientID: "2636937167",
39-
callbackURL: "http://localhost:4200/callback"
39+
callbackURL: process.env.ONEAUTH_CALLBACK_URL || "http://localhost:4200/callback"
4040
}
41-
ENV.apiHost = 'http://localhost:8080'
41+
ENV.apiHost = process.env.API_HOST || 'http://localhost:8080'
4242
ENV.sentry.development = true
4343
}
4444

0 commit comments

Comments
 (0)