From 14209be05781c608e814b600d48eebc63af17589 Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Thu, 14 Sep 2017 09:09:12 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=AE=9E=E8=AE=ADtpm=E7=89=88=E6=9C=AC=E5=BA=93=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E3=80=82=E6=A8=A1=E5=9D=97=E4=B9=8B=E9=97=B4=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=9C=89=E8=B7=9D=E7=A6=BB=EF=BC=8Cta=E7=9A=84?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E6=88=91=E7=9A=84=E8=B5=84=E6=96=99=E9=A1=B5=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E7=81=B0=E8=89=B2=E8=83=8C=E6=99=AF=E5=B9=B6=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=EF=BC=8C=E6=88=90=E9=95=BF=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E7=9A=84=E8=A1=A8=E6=A0=BC=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20=E6=88=91=E7=9A=84=E4=B8=BB=E9=A1=B5=E5=92=8C=E5=90=84?= =?UTF-8?q?=E4=B8=AA=E5=8A=9F=E8=83=BD=E9=A6=96=E9=A1=B5=E7=9A=84=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=8A=9F=E8=83=BD=E6=9D=A1=EF=BC=8C=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=8B=E9=A1=B9=E6=9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=AF=9D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=9C=89tip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 4 + app/views/courses/_courseList.html.erb | 13 +- .../_search_not_students_list.html.erb | 4 +- .../_homework_bank_list.html.erb | 4 +- app/views/layouts/_public_left_info.html.erb | 8 +- app/views/layouts/base_edu_account.html.erb | 4 +- app/views/layouts/base_shixun.html.erb | 7 +- app/views/projects/_no_data.html.erb | 2 +- app/views/shixuns/_settings_show.html.erb | 4 +- app/views/shixuns/settings.html.erb | 39 ++-- .../shixuns/statistics_students.html.erb | 197 ++++++++++++++++++ app/views/syllabuses/_syllabus_index.html.erb | 4 +- app/views/syllabuses/index.html.erb | 6 +- .../users/_user_experience_content.html.erb | 6 +- app/views/users/_user_grade_content.html.erb | 6 +- .../users/_user_journalsformessage.html.erb | 2 +- .../users/search_shixuns_or_courses.html.erb | 2 +- app/views/users/shixuns.html.erb | 10 +- app/views/users/show.html.erb | 21 +- app/views/users/user_fanslist.html.erb | 7 +- app/views/users/user_newfeedback.html.erb | 7 +- app/views/users/user_watchlist.html.erb | 7 +- config/routes.rb | 1 + public/javascripts/edu/application.js | 70 +------ public/stylesheets/css/edu-common.css | 21 +- public/stylesheets/css/edu-user.css | 5 +- public/stylesheets/css/taskstyle.css | 4 +- 27 files changed, 317 insertions(+), 148 deletions(-) create mode 100644 app/views/shixuns/statistics_students.html.erb diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 9f16575b8..36f775652 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -14,6 +14,10 @@ class ShixunsController < ApplicationController CODES = %W(2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z) DCODES = %W(2 3 4 5 6 7 8 9 a b c f e f g h i j k l m n o p q r s t u v w x y z) + + def statistics_students + + end # push代码的时候会触发gitlab hook def ghook shixun_modify_status_without_publish(@shixun, 1) diff --git a/app/views/courses/_courseList.html.erb b/app/views/courses/_courseList.html.erb index eff37ff70..f9fe853fb 100644 --- a/app/views/courses/_courseList.html.erb +++ b/app/views/courses/_courseList.html.erb @@ -10,9 +10,15 @@ <% sy_author = User.find(sy.tea_id) %>
+ <% if sy.name.length > 32 %> +
<%= sy.name %>
+ <% else %> ++ <%= sy.name %> +
+ <% end %>没有数据可以显示!
diff --git a/app/views/shixuns/settings.html.erb b/app/views/shixuns/settings.html.erb index 3900bba5a..f70b954c3 100644 --- a/app/views/shixuns/settings.html.erb +++ b/app/views/shixuns/settings.html.erb @@ -1,19 +1,20 @@ <%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %> <%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js', '/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%> -
课程实训发布
+实训路径发布
<% if is_teacher || comment.creator_user == User.current%>
- 删除
+ 删除
<% end %>
- <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
+ <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"} %>
<%= link_to(
'回复'.html_safe,
diff --git a/app/views/praise_tread/_edu_praise.html.erb b/app/views/praise_tread/_edu_praise.html.erb
index 67b9470ea..bc8bbd082 100644
--- a/app/views/praise_tread/_edu_praise.html.erb
+++ b/app/views/praise_tread/_edu_praise.html.erb
@@ -2,7 +2,7 @@
+ :type => type }) %>' data-remote="true" class="fr ml15" title="点赞">
赞
<% num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
<%= (num.nil? ? 0 : num) > 0 ? num : 0 %>
@@ -11,7 +11,7 @@
+ :type => type }) %>' data-remote="true" class="fr ml15 link-color-green" title="取消点赞" >
赞
<% num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
<%= (num.nil? ? 0 : num) > 0 ? num : 0 %>
diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb
index 6dfc8c5de..34ab82068 100644
--- a/app/views/school/index.html.erb
+++ b/app/views/school/index.html.erb
@@ -1,95 +1,97 @@
-<% port = ":3000" if Rails.env.development? %>
-
-
-
-
- <%= link_to l(:label_all_schol),school_index_path %>
- <% if User.current.logged? %>
-
- <%= l(:label_my_school) %>
-
- <% end %>
-
+ <%= link_to l(:label_all_schol),school_index_path %>
+ <% if User.current.logged? %>
+
+ <%= l(:label_my_school) %>
+
+ <% end %>
+
<% if is_teacher || comment.creator_user == User.current%>
- 删除
+ 删除
<% end %>
<%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
diff --git a/app/views/student_work/_shixun_work_show.html.erb b/app/views/student_work/_shixun_work_show.html.erb
index a5d8c4d3d..7705d882e 100644
--- a/app/views/student_work/_shixun_work_show.html.erb
+++ b/app/views/student_work/_shixun_work_show.html.erb
@@ -10,7 +10,7 @@
/
<%= link_to @shixun.name, shixun_path(@shixun), :class => "edu-info-dark fl", :target => "_blank" %>
+
<% if current_user %>
你还没有关注任何人,去找找感兴趣的用户
<% else %>
diff --git a/app/views/users/_resource_share_popup.html.erb b/app/views/users/_resource_share_popup.html.erb
index eed2f2a86..3a0360b58 100644
--- a/app/views/users/_resource_share_popup.html.erb
+++ b/app/views/users/_resource_share_popup.html.erb
@@ -1,30 +1,34 @@
-
+ 提交: <%= test.input.gsub("\r\n", " <%= test.output.gsub("\r\n", " <%= test.input.gsub(" ", "").gsub(/\r\n$/, " <%= test.output.gsub(" ", "").gsub(/\r\n$/, " " + ( test_sets[i].output == null ? "空" : test_sets[i].output.replace(/\r\n/g, " " + ( test_sets[i].output == null ? "空" : test_sets[i].output.replace(/\r\n/g, " " + (test_sets[i].actual_output == null ? "空" : (test_sets[i].compile_success == "1" ? test_sets[i].actual_output.replace(/\r\n/g, " " + (test_sets[i].actual_output == null ? "空" : (test_sets[i].compile_success == "1" ? test_sets[i].actual_output.replace(/\r\n$/, "
<%= shixun_done(@shixun, challenge.position).to_i %>人 完成挑战
<%= shixun_running(@shixun, challenge.position).to_i %>人 正在挑战
- <%= challenge.score %>经验值
+ <% if challenge.st != 0 %>
+ <%= challenge.choose_score %>经验值
+ <% else %>
+ <%= challenge.score %>经验值
+ <% end %>
<% if @shixun.status == 2 %>
<%= find_game_status challenge.id %>
<% end %>
diff --git a/app/views/challenges/_single_or_multiple_question.html.erb b/app/views/challenges/_single_or_multiple_question.html.erb
index c157d6773..be8a43f2c 100644
--- a/app/views/challenges/_single_or_multiple_question.html.erb
+++ b/app/views/challenges/_single_or_multiple_question.html.erb
@@ -12,7 +12,7 @@
<%#= form_tag(url_for(new_or_edit_choose_question_shixun_challenge_path(@challenge, :shixun_id => @shixun, :type => @type, :position => @position)), :remote => true, :id => 'challenge_choose_update') do |f| %>
- <%= game_challenge.choose_correct_num %>/<%= game_challenge.challenge_chooses.count %>错误
+ <%= game_challenge.choose_correct_num %>/<%= game_challenge.challenge_chooses.count %>共有<%= game_challenge.challenge_chooses.count %>组测试集,其中有<%= game_challenge.challenge_chooses.count - game_challenge.choose_correct_num %>组测试结果不匹配。详情如下:
-
-
-
-
+
+
+
+
-
-
+<%= form_tag share_message_to_course_user_path(user),:remote=>true,:id=>'course_list_form' do %>
+
+ <% if !courses.empty? %>
+ <% courses.each do |course| %>
+
发送资源
+ 1、每个黑色小方块代表一个空格,
+ 2、向下的黑色箭头代表测试集末尾的换行。
+
<% if @test_sets.count > 0 %>
@@ -39,8 +48,8 @@
<% end %>
-
").html_safe unless test.input.blank? %>
").html_safe unless test.output.blank? %>
").html_safe unless test.input.blank? %>
").html_safe unless test.output.blank? %>
").replace(/\t/g, " ").replace(/ /g, "") ) + "
").replace(/\t/g, " ").replace(/ /g, "") ) + "
").replace(/ /g, "") : test_sets[i].actual_output.replace(/\r\n/g, "
"))) + "
").replace(/ /g, "") : test_sets[i].actual_output.replace(/\r\n/g, "
"))) + "