From 60707b1ed8caa77f4c26ab708e4f16a4262248d6 Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Sat, 30 Sep 2017 16:56:55 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=9A=84=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/_game_show.html.erb | 4 ++-- app/views/games/_shixun_comment_list.html.erb | 1 - app/views/shixuns/index.html.erb | 6 +++--- public/stylesheets/css/edu-public.css | 1 - public/stylesheets/css/taskstyle.css | 6 +++--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb index 18e5eded5..7068bfccb 100644 --- a/app/views/games/_game_show.html.erb +++ b/app/views/games/_game_show.html.erb @@ -83,10 +83,10 @@ <%= render :partial => "games/shixun_comment_block" %>
  • 发送
  • - " onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20"> + " onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20"> " alt="赞" ><%= @praise_count %> - " onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;"> + " onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;"> " ><%= @tread_count %>
  • diff --git a/app/views/games/_shixun_comment_list.html.erb b/app/views/games/_shixun_comment_list.html.erb index d4a50066d..3bfb2a3fe 100644 --- a/app/views/games/_shixun_comment_list.html.erb +++ b/app/views/games/_shixun_comment_list.html.erb @@ -86,7 +86,6 @@ $points.show(); }); $("#comment_news").bind("input propertychange",function(){ - console.log(1); if($("#comment_news").val() != ''){ $points.hide(); } diff --git a/app/views/shixuns/index.html.erb b/app/views/shixuns/index.html.erb index 6c6b6d9a3..fc6235d62 100644 --- a/app/views/shixuns/index.html.erb +++ b/app/views/shixuns/index.html.erb @@ -98,7 +98,7 @@
  • 所有状态 -
  • + + + + + + <% if false %> <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 2085a3c5d..6a638ac62 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -18,7 +18,7 @@
  • <%= link_to "全部实训", shixuns_path, :class => "new-nav-a font-16" %>
  • <%= link_to "实训路径", subjects_path, :class => "new-nav-a font-16" %>
  • <%= link_to "在线课堂", courses_path, :class => "new-nav-a font-16" %>
  • -
  • <%= link_to "讨论", forums_path, :class => "new-nav-a font-16" %>
  • +
  • <%= link_to "论坛", forums_path, :class => "new-nav-a font-16" %>
  • From 76b27ffe8320b76d46b9e5cc4557dedb3ab561b7 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 30 Sep 2017 20:42:15 +0800 Subject: [PATCH 04/14] =?UTF-8?q?TPI=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/_shixun_comment_block.html.erb | 4 ++-- app/views/games/_shixun_comment_list.html.erb | 8 ++++++-- app/views/projects/_reply_to.html.erb | 2 +- app/views/student_work/_homework_reply_detail.html.erb | 4 ++-- app/views/users/_reply_to.html.erb | 2 +- app/views/users/_reply_to_comment.html.erb | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/views/games/_shixun_comment_block.html.erb b/app/views/games/_shixun_comment_block.html.erb index 590ca099e..52873b7cf 100644 --- a/app/views/games/_shixun_comment_block.html.erb +++ b/app/views/games/_shixun_comment_block.html.erb @@ -1,13 +1,13 @@ <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false, init_activity: true) %> <% end %> -
  • +
  • -
  • +
  • + + +
  • From 4e2b8184fade67e42490a7498b40368353814c17 Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Sat, 30 Sep 2017 21:27:37 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E7=9A=84=E6=BB=9A=E5=8A=A8=E6=9D=A1=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/_achieve_ways.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shixuns/_achieve_ways.html.erb b/app/views/shixuns/_achieve_ways.html.erb index 966c5ff0b..72471053a 100644 --- a/app/views/shixuns/_achieve_ways.html.erb +++ b/app/views/shixuns/_achieve_ways.html.erb @@ -6,7 +6,7 @@
    -
    - -<% if false %> -
    -
    -
    -
    - <% if @shixun.discusses.blank? %> - <%= render :partial => "welcome/no_data" %> - <% else %> - <% @discusses.each do |dis| %> -
    - <%= link_to image_tag(url_to_avatar(dis.user), :alt => "头像", :width => 35, :height => 35), user_path(dis.user),:class => "fl mt5", :target => '_blank' %> -
    -

    - <%= link_to dis.user.show_name, user_path(dis.user), :class => "fl link-color-grey mr20" ,:style => "display: block" %> - <%= time_from_now dis.created_at %> - <% if dis.try(:challenge_id).present? %> - [第<%= Challenge.find(dis.try(:challenge_id)).try(:position) %>关] - <% end %> - + <% @discusses.each do |dis| %> +

    + <%= link_to image_tag(url_to_avatar(dis.user), :alt => "头像", :width => 35, :height => 35), user_path(dis.user),:class => "fl mt5", :target => '_blank' %> +
    +

    + <%= link_to dis.user.show_name, user_path(dis.user), :class => "fl link-color-grey mr20" ,:style => "display: block" %> + <%= time_from_now dis.created_at %> + <% if dis.try(:challenge_id).present? %> + [第<%= Challenge.find(dis.try(:challenge_id)).try(:position) %>关] + <% end %> + <%= render :partial => "discusses/dis_praise", :locals => {:discuss => dis} %> @@ -138,15 +27,15 @@ <% end %> -

    -

    <%= dis.content %>

    +

    +

    <%= dis.content %>

    -
    - <% dis.children.each do |child| %> -
    -

    - 老师回复 - <%= time_from_now child.created_at %> +

    + <% dis.children.each do |child| %> +
    +

    + 老师回复 + <%= time_from_now child.created_at %> <%= render :partial => "discusses/dis_praise", :locals => {:discuss => child} %> @@ -155,9 +44,9 @@ 删除 <% end %> -

    -

    <%= child.content %>

    - -
    -
    - <% end %> -
    -
    - <% end %> - -
    -
    -
      - <%= pagination_links_full @discusses_pages, @discusses_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> -
    -
    +
    +
    + <% end %>
    <% end %> -
    - -
    + +
    +
    +
      + <%= pagination_links_full @discusses_pages, @discusses_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
    +
    +
    +
    + <% end %>
    +
    -<% end %> +
    +
    + \ No newline at end of file From 0878597cc4311f547cf7640ecd9a6056fa76f52a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 30 Sep 2017 22:34:48 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/forums_controller.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 4cd1b26c7..8abb426a9 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -137,15 +137,16 @@ class ForumsController < ApplicationController @order_str = "reorder_time=desc" end =end - #@memo = Memo.new(:forum => @forum) + @memo = Memo.new(:forum => @forum) @memos = Memo.where("parent_id is null") @topic_count = @memos.count - - @limit = 20 - @is_remote = true - @topic_pages = Paginator.new @topic_count, @limit, params['page'] || 1 - @memos = @memos.includes(:last_reply).reorder(order) - @memos = paginateHelper @memos, @limit + @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] + @memos = @memos.includes(:last_reply). + limit(@topic_pages.per_page). + offset(@topic_pages.offset). + reorder(order). + preload(:author, {:last_reply => :author}). + all #@forums = Forum.find_by_sql("SELECT *,topic_count + memo_count tm FROM `forums` order by tm desc;") @my_forums_count = Memo.where("author_id =? and parent_id is null", User.current.id).count From 61d542012756b6fc7fb536924ebc0dcae710f084 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 30 Sep 2017 22:44:19 +0800 Subject: [PATCH 11/14] =?UTF-8?q?TPI=E6=8A=80=E8=83=BD=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/_games_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/games/_games_list.html.erb b/app/views/games/_games_list.html.erb index 00693b5a3..7d1602c83 100644 --- a/app/views/games/_games_list.html.erb +++ b/app/views/games/_games_list.html.erb @@ -52,7 +52,7 @@ <% gold_score = @myshixun.shixun.status <= 1 ? 0 : (game.answer_open? ? -challenge.score.to_i : game.final_score.to_i) %> 经验值+<%= final_score %> 金币 ml5"><%= gold_score < 0 ? gold_score : "+"+gold_score.to_s %> - 技能标签 ml5"><%= (game.answer_open? || @myshixun.shixun.status <= 1) ? "无" : "+"+challenge.challenge_tags.count.to_s %> + 技能标签 ml5"><%= (game.answer_open? || @myshixun.shixun.status <= 1 || challenge.challenge_tags.count ==0 ) ? "无" : "+"+challenge.challenge_tags.count.to_s %> <% end %>
    From e18e10ba42b8f9bc760b77abcc07d79e1dae0d53 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 30 Sep 2017 22:49:05 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E5=8C=BA=E5=88=86=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E7=89=88=E6=B5=8B=E8=AF=95=E7=89=88domain=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index d8422beaa..ee40a76bd 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -22,6 +22,7 @@ class GamesController < ApplicationController myshixun_user_login = User.where(:id => @myshixun.user_id).first.try(:login) myshixun_rep_identifier = Repository.where(:myshixun_id => @myshixun.id, :type => "Repository::Gitlab").first.try(:identifier) gitlab_address = Redmine::Configuration['gitlab_address'] + myshixun_domain = Redmine::Configuration['myshixun_domain'] gitlab_myshixun_url = git_myshixun_url(@myshixun, @myshixun.try(:user_id)) shixun = @myshixun.shixun gitlab_shixun_url = git_shixun_url(shixun, (shixun.try(:fork_from).blank? ? "educoder" : "eduforge")) @@ -33,7 +34,7 @@ class GamesController < ApplicationController script = "cd #{path} git clone #{gitlab_address.to_s+'/'+myshixun_user_login+'/'+ myshixun_rep_identifier}.git cd #{myshixun_rep_identifier}/ - git remote set-url origin https://#{shixun.fork_from.blank? ? "educoder" : "eduforge"}:xinhu1ji2qu3@testbdgit.trustie.net/#{myshixun_user_login}/#{myshixun_rep_identifier}.git + git remote set-url origin https://#{shixun.fork_from.blank? ? "educoder" : "eduforge"}:xinhu1ji2qu3@#{myshixun_domain}/#{myshixun_user_login}/#{myshixun_rep_identifier}.git git remote add remote_origin #{gitlab_shixun_url} #git pull git pull remote_origin master From 114f57807884501442259a5bfbd737a9ede57a69 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 30 Sep 2017 22:52:45 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E7=AD=94=E9=A2=98=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/student_exercise_list.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/exercise/student_exercise_list.html.erb b/app/views/exercise/student_exercise_list.html.erb index cc9304f7a..103fafdb3 100644 --- a/app/views/exercise/student_exercise_list.html.erb +++ b/app/views/exercise/student_exercise_list.html.erb @@ -17,7 +17,8 @@

    <% unless @exercise.is_public %> - <% end %> + + <% end %> <%= @exercise.exercise_name %>

    <%= link_to "返回", exercise_index_path(:course_id => @course.id), :class => "fr font-12 mr15 mt3 color-grey" %> @@ -42,8 +43,9 @@ <%= link_to "导出成绩", student_exercise_list_exercise_path(@exercise, :course_id => @course.id, :format => 'xls'), :id => "export_exercise_work", :class => "fr white-btn orange-btn ml10 mt8" %>
    - - + + + ×
    From aac531ca540efbcef17c2c079c31a108801110d2 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 30 Sep 2017 23:12:39 +0800 Subject: [PATCH 14/14] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E7=9A=84=E5=AE=9E=E8=AE=AD=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index aa2857ae1..7e54df3f1 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1532,7 +1532,7 @@ end @sub_type = 5 @type = trial_authorization_status params[:type] # sql = select * from apply_actions where dealer_id is null - @authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type,:dealer_id =>'').order("created_at desc") + @authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type).order("created_at desc") search = params[:search] unless search.blank? @authorizations = @authorizations.where(:container_id => Shixun.where(:id => @authorizations.map(&:container_id)).where("name like '%#{search}%'").map(&:id)).order("created_at desc")