From 3f1852985ebe466d08d09403769a5dc18603813d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Jul 2015 09:00:08 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 4b655cf31..3fbd7940e 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -40,9 +40,9 @@ class HomeworkCommonController < ApplicationController # @homework_detail_programing = HomeworkDetailPrograming.new # @homework.homework_detail_programing = @homework_detail_programing # end - # respond_to do |format| - # format.html - # end + respond_to do |format| + format.html + end end #新建作业下一步 From cf58ea8a9f9a9ff8591962d2cc0c4b6831d26c8f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Jul 2015 14:31:08 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 57c3712f9..0d8159c89 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -540,7 +540,7 @@ $('#my_account_form_btn').click(); }); $('#my_password_form_link').click(function(){ - alert("密码修改成功,请重新登录!"); +// alert("密码修改成功,请重新登录!"); $('#my_password_form_btn').click(); }); }); From 4a781ea6b23cde56f39e4b72ce4f2774640a0f25 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Jul 2015 14:36:53 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=EF=BC=8C=E5=8A=A9=E6=95=99=E4=B8=8D=E5=8F=AF=E4=BB=A5=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E8=AF=BE=E7=A8=8B=E3=80=82=E4=BF=AE=E6=94=B9=E5=BC=A0?= =?UTF-8?q?=E7=94=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a1c7ae875..1623979f0 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -604,7 +604,7 @@ class CoursesController < ApplicationController def toggleCourse @course_prefs = Course.find_by_extra(@course.extra) - unless (@course_prefs.student != User.current || User.current.admin?) + unless (User.current.allowed_to?(:as_teacher,@course_prefs) || User.current.admin?) render_403 end end From 4f8170700e7702e87d3a7daeb8a8b2fae3d9214d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Jul 2015 15:19:01 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/index.html.erb | 26 +++++++++++++++++------- app/views/student_work/index.html.erb | 22 +++++++++++++++++++- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 2de96bca1..c0f716ed7 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -71,18 +71,30 @@ <% end%> - <% end%> -
+ -+ 输入 + | ++ 输出 + | +
@@ -151,8 +159,20 @@ <% end%> |
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %>
-- <%# 用户每月提交代码量 %> - <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_qoc_per_author")) %> -
<%# 用户最近六个月的提交次数 %> <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %>
-- <%# 用户最近一年的提交次数 %> - <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_qoc_per_author")) %> -
<%# 用户最近六个月的代码量 %> <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %>
-- <%# 用户最近一年的代码量 %> - <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_year")) %> -
<%= link_to l(:button_back), :action => 'show', :id => @project %>
<% html_title(l(:label_repository), l(:label_statistics)) -%> From e74ca78b0e25bf3b686a9a74a376b12971f2f233 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 27 Jul 2015 10:03:45 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E5=9C=A8debug=E7=8E=AF=E5=A2=83=E4=B8=8B=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=B8=BAdebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/environments/development.rb | 1 + db/schema.rb | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index 2aca152cb..a3e7dff99 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -7,6 +7,7 @@ RedmineApp::Application.configure do # Log error messages when you accidentally call methods on nil. config.whiny_nils = true + config.log_level =:debug config.logger = Logger.new('log/development.log', 'daily') # daily, weekly or monthly # Show full error reports and disable caching config.consider_all_requests_local = true diff --git a/db/schema.rb b/db/schema.rb index 912b4e8b4..9f9bbc33c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -737,6 +737,16 @@ ActiveRecord::Schema.define(:version => 20150722015428) do add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" + create_table "journal_details_copy", :force => true do |t| + t.integer "journal_id", :default => 0, :null => false + t.string "property", :limit => 30, :default => "", :null => false + t.string "prop_key", :limit => 30, :default => "", :null => false + t.text "old_value" + t.text "value" + end + + add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id" + create_table "journal_replies", :id => false, :force => true do |t| t.integer "journal_id" t.integer "user_id" From 0d31536c6e065436b3810387ef402abd86577a8c Mon Sep 17 00:00:00 2001 From: huang- <%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %> -
-- <%# 用户每月提交代码次数 %> - <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %> -
-- <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %> -
-- <%# 用户最近六个月的提交次数 %> - <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %> -
-- <%# 用户最近六个月的代码量 %> - <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %> -
-<%= link_to l(:button_back), :action => 'show', :id => @project %>
-<% html_title(l(:label_repository), l(:label_statistics)) -%> +<% if @status_commit_count ==0 %> ++ <%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %> +
++ <%# 用户每月提交代码次数 %> + <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %> +
++ <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %> +
++ <%# 用户最近六个月的提交次数 %> + <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %> +
++ <%# 用户最近六个月的代码量 %> + <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %> +
+<%= link_to l(:button_back), :action => 'show', :id => @project %>
+ <% html_title(l(:label_repository), l(:label_statistics)) -%> +<% end %> \ No newline at end of file