Skip to content

Commit

Permalink
deliverable imsc readded #39
Browse files Browse the repository at this point in the history
  • Loading branch information
Csutorás Robin committed Sep 16, 2017
1 parent 3fbcc8d commit 3597ed5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ export default Ember.Controller.extend({
if (this.get('selectedDeliverable.grade') === '') {
this.set('selectedDeliverable.grade', null);
}
if (this.get('selectedDeliverable.imsc') === '') {
this.set('selectedDeliverable.imsc', null);
}
this.get('selectedDeliverable').save().then(() => {
this.set('success', true);
}, (t) => {
Expand Down
1 change: 1 addition & 0 deletions app/models/deliverable.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default DS.Model.extend({
lastSubmittedDate: DS.attr('date'),
grade: DS.attr('number'),
grading: DS.attr('boolean'),
imsc: DS.attr('number'),
comment: DS.attr('string'),
finalized: DS.attr('boolean'),
url: DS.attr('string'),
Expand Down
9 changes: 9 additions & 0 deletions app/templates/components/demonstrator-student.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
{{event.firstCorrectableDeliverable.comment}}
</div>

<div class='text label'>Exercise imsc</div>
<div class="text">
{{#if event.firstCorrectableDeliverable.imsc}}
{{event.firstCorrectableDeliverable.imsc}} point
{{else}}
No
{{/if}}
</div>

<div class="text label">Exercise file</div>
{{#if event.firstCorrectableDeliverable.uploaded}}
<div class="text"><a class="button" {{action 'download'}}>Download</a></div>
Expand Down

0 comments on commit 3597ed5

Please sign in to comment.