Description:
rename submission_view_log class
don't log when admin is viewing
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r530:d41578f393ed - - 2 files changed: 3 inserted, 2 deleted
@@ -86,7 +86,8 | |||||
|
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 | - SubmissionViewLogs.create(user_id: session[:user_id],submission_id: @submission.id) |
|
89 | + user = User.find(session[:user_id]) |
|
|
90 | + SubmissionViewLog.create(user_id: session[:user_id],submission_id: @submission.id) unless user.admin? | ||
|
90 |
|
91 | ||
|
91 | end |
|
92 | end |
|
92 |
|
93 |
You need to be logged in to leave comments.
Login now