Merge remote-tracking branch 'origin/master' into error-info

# Conflicts:
#	app/controllers/concerns/submission_scoring.rb
#	app/views/application/_navigation.html.slim
#	config/locales/de.yml
#	config/locales/en.yml
#	db/schema.rb
This commit is contained in:
Maximilian Grundke
2017-10-15 17:02:19 +02:00
65 changed files with 1190 additions and 405 deletions

View File

@ -0,0 +1,18 @@
class AddCauseToTestruns < ActiveRecord::Migration
def up
add_column :testruns, :cause, :string
Testrun.reset_column_information
Testrun.all.each{ |testrun|
if(testrun.submission.nil?)
say_with_time "#{testrun.id} has no submission" do end
else
testrun.cause = testrun.submission.cause
testrun.save
end
}
end
def down
remove_column :testruns, :cause
end
end

View File

@ -0,0 +1,11 @@
class CreateSubscriptions < ActiveRecord::Migration
def change
create_table :subscriptions do |t|
t.belongs_to :user, polymorphic: true
t.references :request_for_comment
t.string :type
t.timestamps null: false
end
end
end

View File

@ -0,0 +1,5 @@
class RenameSubscriptionType < ActiveRecord::Migration
def change
rename_column :subscriptions, :type, :subscription_type
end
end

View File

@ -0,0 +1,5 @@
class AddDeletedToSubscription < ActiveRecord::Migration
def change
add_column :subscriptions, :deleted, :boolean
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170719133351) do
ActiveRecord::Schema.define(version: 20170920145852) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -321,6 +321,16 @@ ActiveRecord::Schema.define(version: 20170719133351) do
add_index "submissions", ["exercise_id"], name: "index_submissions_on_exercise_id", using: :btree
add_index "submissions", ["user_id"], name: "index_submissions_on_user_id", using: :btree
create_table "subscriptions", force: :cascade do |t|
t.integer "user_id"
t.string "user_type"
t.integer "request_for_comment_id"
t.string "subscription_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "deleted"
end
create_table "tags", force: :cascade do |t|
t.string "name", null: false
t.datetime "created_at"
@ -334,6 +344,7 @@ ActiveRecord::Schema.define(version: 20170719133351) do
t.integer "submission_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "cause"
end
create_table "user_exercise_feedbacks", force: :cascade do |t|