Description:
add submission view loggin
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r529:32578781bde7 - - 3 files changed: 8 inserted, 2 deleted
@@ -0,0 +1,5 | |||||
|
|
1 | + class AddLastIpToUser < ActiveRecord::Migration | ||
|
|
2 | + def change | ||
|
|
3 | + add_column :users, :last_ip, :string | ||
|
|
4 | + end | ||
|
|
5 | + end |
@@ -83,13 +83,13 | |||||
|
83 | when "java" then Rouge::Lexers::Java.new |
|
83 | when "java" then Rouge::Lexers::Java.new |
|
84 | when "php" then Rouge::Lexers::PHP.new |
|
84 | when "php" then Rouge::Lexers::PHP.new |
|
85 | end |
|
85 | end |
|
86 | @formatted_code = formatter.format(lexer.lex(@submission.source)) |
|
86 | @formatted_code = formatter.format(lexer.lex(@submission.source)) |
|
87 | @css_style = Rouge::Themes::ThankfulEyes.render(scope: '.highlight') |
|
87 | @css_style = Rouge::Themes::ThankfulEyes.render(scope: '.highlight') |
|
88 |
|
88 | ||
|
89 |
- Submission |
|
89 | + SubmissionViewLogs.create(user_id: session[:user_id],submission_id: @submission.id) |
|
90 |
|
90 | ||
|
91 | end |
|
91 | end |
|
92 |
|
92 | ||
|
93 | # various grader controls |
|
93 | # various grader controls |
|
94 |
|
94 | ||
|
95 | def stop |
|
95 | def stop |
@@ -8,13 +8,13 | |||||
|
8 | # system, you should be using db:schema:load, not running all the migrations |
|
8 | # system, you should be using db:schema:load, not running all the migrations |
|
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
|
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
|
11 | # |
|
11 | # |
|
12 | # It's strongly recommended to check this file into your version control system. |
|
12 | # It's strongly recommended to check this file into your version control system. |
|
13 |
|
13 | ||
|
14 |
- ActiveRecord::Schema.define(:version => 20150827131 |
|
14 | + ActiveRecord::Schema.define(:version => 20150827133841) do |
|
15 |
|
15 | ||
|
16 | create_table "announcements", :force => true do |t| |
|
16 | create_table "announcements", :force => true do |t| |
|
17 | t.string "author" |
|
17 | t.string "author" |
|
18 | t.text "body", :limit => 16777215 |
|
18 | t.text "body", :limit => 16777215 |
|
19 | t.boolean "published" |
|
19 | t.boolean "published" |
|
20 | t.datetime "created_at", :null => false |
|
20 | t.datetime "created_at", :null => false |
@@ -246,11 +246,12 | |||||
|
246 | t.boolean "activated", :default => false |
|
246 | t.boolean "activated", :default => false |
|
247 | t.datetime "created_at" |
|
247 | t.datetime "created_at" |
|
248 | t.datetime "updated_at" |
|
248 | t.datetime "updated_at" |
|
249 | t.string "section" |
|
249 | t.string "section" |
|
250 | t.boolean "enabled", :default => true |
|
250 | t.boolean "enabled", :default => true |
|
251 | t.string "remark" |
|
251 | t.string "remark" |
|
|
252 | + t.string "last_ip" | ||
|
252 | end |
|
253 | end |
|
253 |
|
254 | ||
|
254 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
255 | add_index "users", ["login"], :name => "index_users_on_login", :unique => true |
|
255 |
|
256 | ||
|
256 | end |
|
257 | end |
You need to be logged in to leave comments.
Login now