From 63ae921c4099d4a1e5e081bbb33beaf572dd7fe6 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 25 Mar 2016 17:07:06 +0800 Subject: [PATCH 01/17] =?UTF-8?q?return=20=E6=94=BE=E9=94=99=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/homework.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index b03ddf1bf..3bca1606c 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -97,8 +97,8 @@ $(function(){ alert("您的答案超时了, 请检查代码是否存在死循环的错误."); } else { alert("测试失败,服务器出错."); - return; } + return; }); }; From 35faa12d4dff488d2f7229b62c58ea85bab69c5a Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 25 Mar 2016 20:10:53 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E6=97=A0=E6=B3=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/org_document_comments/edit.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/org_document_comments/edit.html.erb b/app/views/org_document_comments/edit.html.erb index 3ad388bd2..5997482fb 100644 --- a/app/views/org_document_comments/edit.html.erb +++ b/app/views/org_document_comments/edit.html.erb @@ -12,10 +12,12 @@ if($("#document_title").val().trim() == "") { $("#doc_title_hint").html("标题不能为空").show(); + return false; } else { $("#doc_title_hint").hide(); + return true; } } From 1bf494f661dfa3237377e89dbea9775b86881eba Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 25 Mar 2016 20:11:26 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=BB=9F=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_recommendation.html.erb | 4 ++-- app/views/layouts/base_courses.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/courses/_recommendation.html.erb b/app/views/courses/_recommendation.html.erb index 63803a5b9..1db2edf57 100644 --- a/app/views/courses/_recommendation.html.erb +++ b/app/views/courses/_recommendation.html.erb @@ -7,8 +7,8 @@

<%=link_to e_course.name, course_path(e_course.id), :class => "hidden fl w170" %>

- <% if course_file_num > 0 %> - <%= l(:project_module_attachments) %>(<%= link_to course_file_num, course_files_path(e_course), :class => "linkBlue2" %>) + <% if visable_attachemnts_incourse(e_course).count > 0 %> + <%= l(:project_module_attachments) %>(<%= link_to visable_attachemnts_incourse(e_course).count, course_files_path(e_course), :class => "linkBlue2" %>) <% end %> <% if e_course.homework_commons.where("publish_time <= '#{Date.today}'").count > 0 %> <%= l(:label_homework_commont) %>(<%= link_to e_course.homework_commons.where("publish_time <= '#{Date.today}'").count, homework_common_index_path(:course=>e_course.id), :class => "linkBlue2" %>) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 7495b20db..bdbed2931 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -169,7 +169,7 @@

- <%= render :partial => 'courses/recommendation', :locals => {:course => @course, :course_file_num => course_file_num} %> + <%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
访问计数 <%= @course.visits.to_i %>
From c7c96e0c6a505ddf8530da321f86cf6f7fb9428d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 25 Mar 2016 20:37:32 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=90=8D=E7=BC=96=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_resources_list.html.erb | 353 +----------------- app/views/users/_user_resource_info.html.erb | 356 ++++++++++++++++++- 2 files changed, 356 insertions(+), 353 deletions(-) diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index a545038f1..c2b37f0e6 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -26,349 +26,14 @@ <% end %> <% end %> - diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb index bea78130a..bf36e4b38 100644 --- a/app/views/users/_user_resource_info.html.erb +++ b/app/views/users/_user_resource_info.html.erb @@ -37,12 +37,350 @@ - \ No newline at end of file + \ No newline at end of file From a58ba8080c7a132d151f0c4ffad7c9814a7c2a09 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 25 Mar 2016 21:06:25 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=8A=A0=E4=B8=AA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/new_user_commit_homework.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index e5e2a385c..0c2a32865 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -30,7 +30,7 @@ 超时! - 测试错误! + 测试错误! 您的输出:
 
@@ -133,7 +133,8 @@ <% else %>
    - <% test.results.reverse.each_with_index do |x, i| %> + <%puts test.results %> + <% test.results.reverse.each_with_index do |x, i| %>
  • 测试<%=test.results.size-i%> <% if x["status"].to_i != 0 %> <% if x["status"].to_i == 2 %> From ef49715b085b6c5d44d1868a4eae3bae34f95ef5 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 25 Mar 2016 21:11:13 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=8A=A0=E4=B8=AAresults=E4=B8=BA=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_programing_work_show.html.erb | 3 ++- app/views/users/new_user_commit_homework.html.erb | 4 +++- app/views/users/user_commit_homework.html.erb | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index ae2237bdc..6009dfbb5 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -55,8 +55,8 @@
      <% test.results.reverse.each_with_index do |x, i| %> + <% unless x.nil? %>
    • - 测试<%=test.results.size-i%> <% if x["status"].to_i != 0 %> <% if x["status"].to_i == 2 %> @@ -82,6 +82,7 @@
      <% end %>
    • + <% end %> <% end %>
diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index 0c2a32865..e33362a0a 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -133,8 +133,9 @@ <% else %>
    - <%puts test.results %> + <% logger.error("################################################{test.results}") %> <% test.results.reverse.each_with_index do |x, i| %> + <% unless x.nil? %>
  • 测试<%=test.results.size-i%> <% if x["status"].to_i != 0 %> <% if x["status"].to_i == 2 %> @@ -160,6 +161,7 @@
  • <% end %> <% end %> + <% end %>
<% end %> diff --git a/app/views/users/user_commit_homework.html.erb b/app/views/users/user_commit_homework.html.erb index 40fd9d241..cab3c55ab 100644 --- a/app/views/users/user_commit_homework.html.erb +++ b/app/views/users/user_commit_homework.html.erb @@ -101,6 +101,7 @@
    <% test.results.reverse.each_with_index do |x, i| %> + <% unless x.nil? %>
  • 测试<%=test.results.size-i%> <% if x["status"].to_i != 0 %> <% if x["status"].to_i == 2 %> @@ -125,6 +126,7 @@
  • <% end %> + <% end %> <% end %>
From e62ee2eadee62e8bdb310944deda6cb7625fae0b Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Sat, 26 Mar 2016 13:44:13 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E6=B5=8B?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 52 +++++++++------------- public/javascripts/homework.js | 11 +++-- 2 files changed, 29 insertions(+), 34 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 89f67ddf4..e40475d51 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -55,12 +55,11 @@ class StudentWorkController < ApplicationController render :json => resultObj end - $test_result = {} - $test_status = {} +#由于负载问题 不要使用全局变量 #根据传入的tIndex确定是第几次测试 def program_test_ex is_test = params[:is_test] == 'true' - resultObj = {status: 0, results: [], error_msg: '', time: Time.now.strftime('%Y-%m-%d %T'),tseq:1,tcount:1} #保存每测试一次返回的结果 + resultObj = {status: 0, results: [], error_msg: '', time: Time.now.strftime('%Y-%m-%d %T'),tseq:1,tcount:1,testid:1} #保存每测试一次返回的结果 student_work = find_or_save_student_work(is_test) @@ -81,7 +80,7 @@ class StudentWorkController < ApplicationController #-1 默认值 0全部正确并结束 2 超时 -2 编译错误 resultObj[:status] = -1 - resultObj[:results] = result["results"][0] #本次测试结果 + resultObj[:results] = result["results"].first #本次测试结果 resultObj[:error_msg] = result["error_msg"] #编译错误时的信息 if result["status"].to_i == -2 #编译错误 @@ -94,24 +93,6 @@ class StudentWorkController < ApplicationController resultObj[:status] = 200 else - #索引 - work_id = student_work.id - - #测试第一个时初始化下全局变量 - if index == 1 - $test_result[work_id] = [] #保存本次测试的结果 输入输出 - $test_status[work_id] = 0 #保存本次测试的结果 正确还是错误 - end - - if result["status"].to_i == -2 - $test_result[work_id] = [result["error_msg"]] - $test_status[work_id] = -2 - else - #存下每次的结果 只有每次都为0才全部正确 - $test_status[work_id] = result["status"] != 0 ? result["status"]:$test_status[work_id] - $test_result[work_id][index - 1] = resultObj[:results] - end - student_work.name = params[:title] student_work.description = params[:src] @@ -121,20 +102,31 @@ class StudentWorkController < ApplicationController student_work.late_penalty = 0 end + #每次都要把数据存到数据库中 + status = resultObj[:status] + if index == 1 + student_work_test = student_work.student_work_tests.build(status: resultObj[:status], + results: [resultObj[:results]],src: params[:src]) + student_work_test.save! + resultObj[:testid] = student_work_test.id + else + student_work_test = StudentWorkTest.find(params[:testid]) + results = student_work_test.results + results << resultObj[:results] + student_work_test.results = results + student_work_test.status = (result["status"] != 0 ? result["status"] : student_work_test.status) + student_work_test.save! + status = student_work_test.status + resultObj[:testid] = student_work_test.id + end + #超时或编译错误则直接返回了并存入数据库 if resultObj[:status] == 2 || resultObj[:status] == -2 || index == @homework.homework_tests.size - if $test_status[work_id] == 0 + if status == 0 resultObj[:status] = 0 end - - student_work_test = student_work.student_work_tests.build(status: $test_status[work_id], - results: $test_result[work_id],src: params[:src]) - student_work.save resultObj[:time] = student_work_test.created_at.to_s(:db) resultObj[:index] = student_work.student_work_tests.count - - $test_result[work_id] = nil - $test_status[work_id] = nil end #渲染返回结果 diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index 3bca1606c..5b7f1b046 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -57,10 +57,12 @@ $(function(){ ); */ //先测试一次并返回测试集个数及结果再判断是否需要继续进行测试 - var test_post = function(i){ + var test_post = function(i, testid){ $.post( '/student_work/program_test_ex', - {homework: homework_id, student_work_id: student_work_id, src: src, title: title, is_test: is_test,tIndex:i}, + {homework: homework_id, student_work_id: student_work_id, + src: src, title: title, is_test: is_test,tIndex:i, + testid: testid}, function(data,status){ var tSeq = data.tseq; var tCount = data.tcount; @@ -90,7 +92,7 @@ $(function(){ return; } - test_post(i+1); + test_post(i+1, data.testid); } ).fail(function(xhr, status){ if(status == 'timeout'){ @@ -100,9 +102,10 @@ $(function(){ } return; }); + }; - test_post(1); + test_post(1, 0); }; $('#test-program-btn').on('click', test_program); From 5116d75eb71c05f2f3a22bfb9091629f23692949 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Sat, 26 Mar 2016 14:48:57 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E7=94=A8=E2=96=A1=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 6 ++++++ public/javascripts/homework.js | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index e40475d51..b02638f9e 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -76,6 +76,12 @@ class StudentWorkController < ApplicationController #请求测试 result = test_realtime_ex(test, params[:src]) + + if result["status"].to_i != -2 + result["results"].first['output'] = result["results"].first['output'].gsub(" ","□") + result["results"].first['result'] = result["results"].first['result'].gsub(" ","□") + end + logger.debug result #-1 默认值 0全部正确并结束 2 超时 -2 编译错误 diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index 5b7f1b046..46dfed122 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -426,7 +426,7 @@ $(function(){ //注意\n\ //1:该程序每次运行的时间必须小于200毫秒,否则会超时,程序超时将不会测试剩余的测试集\n\ //2:该程序每次运行使用的内存不能超过1M,否则会返回错误\n\ - //3:该程序每次运行输出的结果最多显示100个字符(多余的不显示)\n\ + //3:该程序每次运行输出的结果最多显示100个字符(多余的不显示),空格用□表示\n\ import java.io.*;\n\ import java.util.*;\n\ \n\ @@ -450,7 +450,7 @@ class Main\n\ //注意\n\ //1:该程序每次运行的时间必须小于200毫秒,否则会超时,程序超时将不会测试剩余的测试集\n\ //2:该程序每次运行使用的内存不能超过1M,否则会返回错误\n\ - //3:该程序每次运行输出的结果最多显示100个字符(多余的不显示)\n\ + //3:该程序每次运行输出的结果最多显示100个字符(多余的不显示),空格用□表示\n\ #include \n\ int main()\n\ {\n\ @@ -470,7 +470,7 @@ src = '\ //注意\n\ //1:该程序每次运行的时间必须小于200毫秒,否则会超时,程序超时将不会测试剩余的测试集\n\ //2:该程序每次运行使用的内存不能超过1M,否则会返回错误\n\ - //3:该程序每次运行输出的结果最多显示100个字符(多余的不显示)\n\ + //3:该程序每次运行输出的结果最多显示100个字符(多余的不显示),空格用□表示\n\ #include \n\ using namespace std;\n\ \n\ @@ -491,7 +491,7 @@ src = '\ #注意\n\ #1:该程序每次运行的时间必须小于200毫秒,否则会超时,程序超时将不会测试剩余的测试集\n\ #2:该程序每次运行使用的内存不能超过1M,否则会返回错误\n\ - #3:该程序每次运行输出的结果最多显示100个字符(多余的不显示)\n\ + #3:该程序每次运行输出的结果最多显示100个字符(多余的不显示),空格用□表示\n\ import sys \n\ \n\ #获取参数方式,使用raw_input\n\ From 88ba2bf5562c25df29ccbcb18507858edc452f0b Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Sat, 26 Mar 2016 14:59:51 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index b02638f9e..c238b4da3 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -90,6 +90,7 @@ class StudentWorkController < ApplicationController resultObj[:error_msg] = result["error_msg"] #编译错误时的信息 if result["status"].to_i == -2 #编译错误 + resultObj[:results] = result["error_msg"] resultObj[:status] = -2 elsif result["results"][0]["status"].to_i == 2 resultObj[:status] = 2 @@ -116,6 +117,7 @@ class StudentWorkController < ApplicationController student_work_test.save! resultObj[:testid] = student_work_test.id else + #先从数据库取出result student_work_test = StudentWorkTest.find(params[:testid]) results = student_work_test.results results << resultObj[:results] From f217c9097aee73330bdc7e40eb4309903ddd28fe Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Sat, 26 Mar 2016 15:44:28 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E5=85=A8=E9=83=A8=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=8F=90=E7=A4=BA=E6=98=AF=E5=90=A6=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index c238b4da3..903030ecb 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -99,7 +99,6 @@ class StudentWorkController < ApplicationController unless student_work.save resultObj[:status] = 200 else - student_work.name = params[:title] student_work.description = params[:src] @@ -110,9 +109,9 @@ class StudentWorkController < ApplicationController end #每次都要把数据存到数据库中 - status = resultObj[:status] + status = result["status"] if index == 1 - student_work_test = student_work.student_work_tests.build(status: resultObj[:status], + student_work_test = student_work.student_work_tests.build(status: status, results: [resultObj[:results]],src: params[:src]) student_work_test.save! resultObj[:testid] = student_work_test.id @@ -130,9 +129,10 @@ class StudentWorkController < ApplicationController #超时或编译错误则直接返回了并存入数据库 if resultObj[:status] == 2 || resultObj[:status] == -2 || index == @homework.homework_tests.size - if status == 0 + if status == 0 resultObj[:status] = 0 end + student_work.save! resultObj[:time] = student_work_test.created_at.to_s(:db) resultObj[:index] = student_work.student_work_tests.count end From 9fc227d6197e371cca60ebe3e774323f9d4477e4 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 28 Mar 2016 14:50:26 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_resources_list.html.erb | 353 +++++++++++++++++- app/views/users/_user_resource_info.html.erb | 356 +------------------ 2 files changed, 353 insertions(+), 356 deletions(-) diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index c2b37f0e6..a545038f1 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -26,14 +26,349 @@ <% end %> <% end %> - + diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb index bf36e4b38..bea78130a 100644 --- a/app/views/users/_user_resource_info.html.erb +++ b/app/views/users/_user_resource_info.html.erb @@ -37,350 +37,12 @@ - \ No newline at end of file + \ No newline at end of file From 33c9331c7b0a5c5ae2d6d5e13596c37112480b72 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 28 Mar 2016 15:35:24 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=BA=E7=A7=81=E6=9C=89/=E5=85=AC=E5=BC=80=20=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E5=A4=B4=E9=83=A8=E6=9C=AA=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_project_info.html.erb | 1 + app/views/layouts/base_courses.html.erb | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_project_info.html.erb b/app/views/layouts/_project_info.html.erb index d94cbdcc7..30f527595 100644 --- a/app/views/layouts/_project_info.html.erb +++ b/app/views/layouts/_project_info.html.erb @@ -1,6 +1,7 @@ <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> <% teacher_num = TeacherAndAssistantCount(@course) %> <% student_num = studentCount(@course) %> +<% course_file_num = visable_attachemnts_incourse(@course).count %>