Skip to content

Commit fd8da9b

Browse files
committed
Return soft deadline from api
1 parent 78160ec commit fd8da9b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/controllers/api/v8/courses/exercises_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def index
7070
publish_time: ex.publish_time,
7171
solution_visible_after: ex.solution_visible_after,
7272
deadline: ex.deadline_for(current_user),
73+
soft_deadline: ex.soft_deadline_for(current_user),
7374
disabled: ex.disabled?,
7475
unlocked: exercises.include?(ex.id)
7576
}

app/models/exercise.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Exercise < ActiveRecord::Base
1717
property :publish_time, type: :string, format: 'date-time', example: '2016-10-24T14:06:36.730+03:00'
1818
property :solution_visible_after, type: :string, format: 'date-time', example: '2016-10-24T14:06:36.730+03:00'
1919
property :deadline, type: :string, format: 'date-time', example: '2016-10-24T14:06:36.730+03:00'
20+
property :soft_deadline, type: :string, format: 'date-time', example: '2016-10-24T14:06:36.730+03:00'
2021
property :disabled, type: :boolean, example: false
2122
property :available_points, type: :array do
2223
items do

0 commit comments

Comments
 (0)