From d1c6129271ecf273229f0e2bde029f08f98ed48a Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Mon, 18 Sep 2017 08:41:06 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E3=80=81=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E9=A2=98=E5=BA=93tab=E4=BD=8D=E7=BD=AE=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8Ctip=E4=BD=8D=E7=BD=AE=E7=9A=84=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_bank/_homework_bank_list.html.erb | 2 +- app/views/users/search_shixuns_or_courses.html.erb | 4 ++-- app/views/users/shixuns.html.erb | 2 +- public/javascripts/edu/application.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/homework_bank/_homework_bank_list.html.erb b/app/views/homework_bank/_homework_bank_list.html.erb index 5cdc44cd7..6d3f1c55a 100644 --- a/app/views/homework_bank/_homework_bank_list.html.erb +++ b/app/views/homework_bank/_homework_bank_list.html.erb @@ -74,7 +74,7 @@ <% end %> - - \ No newline at end of file + + + diff --git a/app/views/homework_bank/_new_group_homework.html.erb b/app/views/homework_bank/_new_group_homework.html.erb index 15325ba42..1d0815838 100644 --- a/app/views/homework_bank/_new_group_homework.html.erb +++ b/app/views/homework_bank/_new_group_homework.html.erb @@ -4,7 +4,7 @@

<%= edit_mode ? '编辑' : '新建' %>分组作业

- + 3 处问题导致无法保存 @@ -87,4 +87,6 @@
- \ No newline at end of file + + +< \ No newline at end of file diff --git a/app/views/homework_bank/_new_program_homework.html.erb b/app/views/homework_bank/_new_program_homework.html.erb index 62a0a84fb..3fedddcbc 100644 --- a/app/views/homework_bank/_new_program_homework.html.erb +++ b/app/views/homework_bank/_new_program_homework.html.erb @@ -2,7 +2,7 @@

<%= edit_mode ? '编辑' : '新建' %>编程作业

- + 3 处问题导致无法保存
-
- -
    - <% if @is_admin %> - <% if @homework.homework_type != 4 %> -
  • - <%= link_to l(:button_edit), edit_homework_bank_path(@homework) %> -
  • - <% else %> -
  • - <%= link_to '进入实训', shixun_path(@homework.homework_bank_shixun.shixun), :target => "_blank" %> -
  • - <% end %> -
  • - <%= link_to '发送', choose_user_course_homework_bank_index_path(:check_homework_bank => ["#{@homework.id}"]), :remote => true %> -
  • - <% unless @homework.is_public %> -
  • - 设为公开 -
  • - <% end %> -
  • - 删除 -
  • - <% elsif @homework.is_public %> -
  • - <%= link_to '发送', choose_user_course_homework_bank_index_path(:check_homework_bank => ["#{@homework.id}"]), :remote => true %> -
  • - <% end %> -
-
+
-
+
<%= @homework.description.html_safe %>
diff --git a/app/views/layouts/base_shixun.html.erb b/app/views/layouts/base_shixun.html.erb index 223d2687b..8c9fa67de 100644 --- a/app/views/layouts/base_shixun.html.erb +++ b/app/views/layouts/base_shixun.html.erb @@ -39,7 +39,7 @@ <% end %>
  • ">合作者
  • - +
  • ">学员统计
  • <% if User.current.manager_of_shixun?(@shixun) %>
  • ">配置
  • <% end %> diff --git a/app/views/shixuns/settings.html.erb b/app/views/shixuns/settings.html.erb index f70b954c3..9b63c8900 100644 --- a/app/views/shixuns/settings.html.erb +++ b/app/views/shixuns/settings.html.erb @@ -1,7 +1,7 @@ <%= 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'%> -
    +
    -
    +
    diff --git a/app/views/shixuns/statistics.html.erb b/app/views/shixuns/statistics.html.erb index e8ebca821..a7501b6a0 100644 --- a/app/views/shixuns/statistics.html.erb +++ b/app/views/shixuns/statistics.html.erb @@ -187,7 +187,7 @@
    第<%= latest_myshixun.current_stage %>关/共<%= latest_myshixun.games.count %>关 - <%= sum_myshixun_score(latest_myshixun.id) %>分 + <%= latest_myshixun.games.count %>分 给TA送花 <% end %> @@ -197,3 +197,6 @@
    <% end %> + \ No newline at end of file diff --git a/app/views/shixuns/statistics_students.html.erb b/app/views/shixuns/statistics_students.html.erb index 98ad09f90..82c85a8d8 100644 --- a/app/views/shixuns/statistics_students.html.erb +++ b/app/views/shixuns/statistics_students.html.erb @@ -1,197 +1,51 @@ +
    -
    +
    -

    学员广场

    - +

    学员列表

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <% @statistics.each do |statistics| %> + + + + + + + + <% end %>
    1 - 胡莎莎学员 - / - Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第3关/共10关 -
    100分给TA送花
    2 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    3 - 胡莎莎学员 - / - Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第3关/共10关 -
    100分给TA送花
    4 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    4 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    4 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    4 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    4 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    4 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    4 - 胡莎莎学员 - / - Helloworld:Java入门实训项目Helloworld:Java入门实训项目 -
    -
    -
    - -
    - 第6关/共10关 -
    100分给TA送花
    + + <%= link_to image_tag(url_to_avatar(statistics.owner), :width => "36", :height => "36", :alt => "头像"), user_path(statistics.owner), :target => '_blank', :class => "" %> + + <%= link_to statistics.owner.try(:show_name), user_path(statistics.owner), :class => "panel-table-name hide fl color-grey" %> + <%= format_time(statistics.created_at) %> 开启 +
    +
    + +
    +
    + 挑战至第<%= statistics.current_stage %>关/共<%= statistics.games.count %>关 +
    + + <% if statistics.total_score == 0 %> + -- + <% else %> + + <%= statistics.total_score %> 经验值 + <% end %> + +
    -
    - 上一页 - 1 - 2 - 3 - ... - 31 - 下一页 -
    -
    - +
    +
    +
      + <%= pagination_links_full @statistic_pages, @statistics_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
    +
    +
    -
    \ No newline at end of file +
      +
    diff --git a/app/views/student_work/_student_work_score.html.erb b/app/views/student_work/_student_work_score.html.erb index a3bc383b7..e5dd906ce 100644 --- a/app/views/student_work/_student_work_score.html.erb +++ b/app/views/student_work/_student_work_score.html.erb @@ -11,7 +11,7 @@ (<%= student_work_score_role score%>) <%= format_time score.updated_at %> <% unless score.score.nil? %> - <%= show_real_score ? score.score : "**" %>分 + <%= show_real_score ? score.score : "**" %>  分 <% end %> <% if @is_teacher && score.user == User.current && score.reviewer_role != 3 %> <% scores = User.current.student_works_scores.where("student_work_id = #{score.student_work_id} and reviewer_role != 3").order("created_at desc") %> diff --git a/app/views/student_work/show.html.erb b/app/views/student_work/show.html.erb index 9c031f709..f68b1a93e 100644 --- a/app/views/student_work/show.html.erb +++ b/app/views/student_work/show.html.erb @@ -1,9 +1,9 @@ <%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/edit/matchbrackets.js", "/codemirror/mode/clike/clike" %> <%= stylesheet_link_tag "/codemirror/lib/codemirror" %> -

    <%= @course.name %> > <%= @homework.homework_type_ch %>作业 > - #<%= link_to (get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1), student_work_index_path(:homework => @homework.id) %> > + <%#= link_to get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1, student_work_index_path(:homework => @homework.id) %> > + #<%= get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1 %> <% if @is_teacher || @work.user == User.current || (@homework.homework_detail_manual.comment_status != 3 && @homework.homework_detail_manual.comment_status != 4) %> <%= link_to @work.user.try(:show_real_name), user_path(@work.user) %> <% else %> diff --git a/app/views/users/_user_fans_or_watch.html.erb b/app/views/users/_user_fans_or_watch.html.erb index 18735a823..75fac301b 100644 --- a/app/views/users/_user_fans_or_watch.html.erb +++ b/app/views/users/_user_fans_or_watch.html.erb @@ -5,15 +5,15 @@

    <%= link_to user.show_name, user_path(user), :target => '_blank', :class => "mr15 fl fans-name color-grey3" %> <% if user.authentication %> -
  • -
  • +
  • +
  • <% else %> <% if user.apply_user_authentication.last.try(:status) == 0 %> -
  • -
  • +
  • +
  • <% else %> -
  • -
  • +
  • +
  • <% end %> <% end %>
    diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index 23d963607..edc5bb134 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -14,7 +14,7 @@
    -
    +
    <%= render :partial => "user_watcher_or_fans_list", :locals => {:users => @user_fanlist, :user_count => @user_fanlist_count, :user_pages => @fans_pages} %>
    diff --git a/app/views/users/user_watchlist.html.erb b/app/views/users/user_watchlist.html.erb index 258acbd7b..26ddf5bab 100644 --- a/app/views/users/user_watchlist.html.erb +++ b/app/views/users/user_watchlist.html.erb @@ -14,7 +14,7 @@
    -
    +
    <%= render :partial => "user_watcher_or_fans_list", :locals => {:users => @user_watchlist, :user_count => @user_watchlist_count, :user_pages => @watchlist_pages} %>
    diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js index 6f0c828a7..84e232b05 100644 --- a/public/javascripts/edu/application.js +++ b/public/javascripts/edu/application.js @@ -53,32 +53,37 @@ $(function(){ LeaveTitle($("[data-tip-left]"),$(".data-tip-right")); $("[data-tip-down]").live("mouseenter",function(){ var $tool = $(this).attr("data-tip-down"); - $(".data-tip-down").show().html($tool); - $desc.show().css({ - left:$(this).offset().left -($desc.width()-$(this).outerWidth())/2, - opacity:0.7, - top:$(this).offset().top + $(this).height() +10 - }); + if($tool != ""){ + $(".data-tip-down").show().html($tool); + $desc.show().css({ + left:$(this).offset().left -($desc.width()-$(this).width())/2, + opacity:0.7, + top:$(this).offset().top + $(this).height() +10 + }); + } }); $("[data-tip-right]").live("mouseenter",function(){ var $tool = $(this).attr("data-tip-right"); - $(".data-tip-left").show().html($tool); - $desc.show().css({ - left:$(this).offset().left +30, - opacity:0.7, - top:$(this).offset().top-($desc.height()-$(this).height())/2 - }); + if($tool != ""){ + $(".data-tip-left").show().html($tool); + $desc.show().css({ + left:$(this).offset().left +30, + opacity:0.7, + top:$(this).offset().top-($desc.height()-$(this).height())/2 + }); + } }); $("[data-tip-left]").live("mouseenter",function(){ var $tool = $(this).attr("data-tip-left"); - $(".data-tip-right").show().html($tool); - $desc.show().css({ - left:$(this).offset().left-$desc.width()-10, - opacity:0.7, - top:$(this).offset().top-($desc.height()-$(this).height())/2 - }); + if($tool != ""){ + $(".data-tip-right").show().html($tool); + $desc.show().css({ + left:$(this).offset().left-$desc.width()-10, + opacity:0.7, + top:$(this).offset().top-($desc.height()-$(this).height())/2 + }); + } }); - //下拉框 $("[select-for]").append(""); $("[select-for]").hover(function(){ diff --git a/public/stylesheets/css/edu-class.css b/public/stylesheets/css/edu-class.css index 07a95fc40..2192364f0 100644 --- a/public/stylesheets/css/edu-class.css +++ b/public/stylesheets/css/edu-class.css @@ -347,10 +347,10 @@ a:hover.edu-class-inner-list{color:#FF7500!important;} /* 评分插件 */ .ui-slider{position:relative;width:400px;float:left;margin-right:20px;margin-left:7px;height:14px; margin-top:12px;background:#e2e2e2; } -.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.0em;height:1.2em;top:-.2em;margin-left:-.5em;cursor:pointer;background:#3498db;} -.ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus{background:#3498db;} +.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.0em;height:1.2em;top:-.2em;margin-left:-.5em;cursor:pointer;background:#29bd8b;} +.ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus{background:#29bd8b;} .ui-slider .ui-slider-handle:active{background-image:none;} -.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#3498db;left:0;} +.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#29bd8b;left:0;} /* 我的实训我的课堂 20170608byLB */ .edu-class-inner-max a.edu-class-inner-list{ max-width:84%;} diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css index dff21d46b..beffb5ec8 100644 --- a/public/stylesheets/css/edu-common.css +++ b/public/stylesheets/css/edu-common.css @@ -432,14 +432,7 @@ input::-ms-clear{display:none;} .bor-gray-c{border:1px solid #ccc;} .bor-grey-e{border:1px solid #eee;} .bor-grey01{border:1px solid #E6EAEB;} -.bor-blue{border:1px solid #5faee3;}/*-------------------------tip样式-------------------------*/ -/*.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;}*/ -/*.-task-desc-title{background:#000;color:#fff;box-shadow:0px 0px 8px #194a81;max-width:300px;word-wrap: break-word;text-align:center;border-radius:10px;padding:0 10px;}*/ -/*.-title-zhixiang{color:#000;position:absolute;display:none;}*/ -/*.tip-down{left:50%;top:-13px;margin-left:-3px;}*/ -/*.tip-left{left:-4px;top:50%;margin-top:-14px;}*/ -/*.tip-right{right:-4px;top:50%;margin-top:-14px;}*/ - +.bor-blue{border:1px solid #5faee3;} /* tip公共样式的设置: tip整体的背景色的设置在 2、7、10、13行。要统一修改 diff --git a/public/stylesheets/css/edu-subject.css b/public/stylesheets/css/edu-subject.css index 93afd9fe0..d7df95ef5 100644 --- a/public/stylesheets/css/edu-subject.css +++ b/public/stylesheets/css/edu-subject.css @@ -10,7 +10,7 @@ .subject-box{padding: 20px;background: #fff;text-align: center;position: relative;} .unit-name{line-height: 17px;height: 17px;width:196px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} -.active-class .content .sub-con{width:23.69%;border:1px solid #eee;background:#fff;margin: 0 1.5% 30px 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} +.active-class .content .sub-con{width:23.87%;background:#fff;margin: 0 1.5% 30px 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} .active-class .content .sub-con:nth-child(4n+0){margin:0 0 30px 0;} .active-class .content .sub-con:hover{box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;} @-webkit-keyframes bounce-down { diff --git a/public/stylesheets/css/ketang.css b/public/stylesheets/css/ketang.css index 6f5e0a6e6..9ae311b51 100644 --- a/public/stylesheets/css/ketang.css +++ b/public/stylesheets/css/ketang.css @@ -4,7 +4,7 @@ .active-class .search .open{padding-top:6px;} .active-class .search b{cursor:pointer;} .active-class .search span input{border:none;outline:none;padding-right:80px;display:none;} -.active-class .content .sub-con{width:23.7%;border:1px solid #eee;background:#fff;margin: 0 1.5% 1.5% 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} +.active-class .content .sub-con{width:23.7%;background:#fff;margin: 0 1.5% 1.5% 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} .active-class .content .sub-con:nth-child(4n+0){margin:0 0 1.5% 0;} .active-class .content .sub-con:hover{box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;} .active-class .content .sub-con .top{height:154px;} diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 2df5eb015..e996313af 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -245,7 +245,7 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f .task-index-list{ width: 1200px;} -.task-index-list-box{ width:23.69%;margin: 0 1.5% 30px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } +.task-index-list-box{ width:23.87%;margin: 0 1.5% 30px 0px; border-radius:2px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } .task-index-list-box:hover{-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1; } .task-index-list-box:nth-child(4n+0) {margin: 0 0 30px 0;} .task-mg8{ margin:0 15px 15px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } @@ -417,3 +417,11 @@ html>body #ajax-indicator-base { position: fixed; } .empty{background: #494A4C;display: inline; margin: 0 2px; padding: 0 3px;} .tab-key{background: #494A4C;display: inline; margin: 0 2px; padding: 0 6px;} .nav_check_item li{padding: 0px 17px!important;} + +/*二次回复的提示语的样式*/ +.points-data-tip-top{position:absolute;left:100px;top:-30px;opacity:.7;width:150px;height:30px;z-index:9999;display:none;} +.data-tip-top{position:relative;box-shadow:0px 0px 8px #000;background:#000;color:#fff;word-wrap: break-word; + text-align:center;border-radius:4px;padding:0 10px;border:1px solid #000;} +.data-tip-top:after,.data-tip-top:before{position: absolute;content:'';width:0;height:0;left: 45%;bottom:-10px;border-left: 5px solid transparent; + border-right: 5px solid transparent;border-top: 10px solid #000;} +.data-tip-top:before{bottom:-11px;} \ No newline at end of file From 41ec6a483815bd4456a142cee4e7b1c297109114 Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Fri, 22 Sep 2017 16:40:58 +0800 Subject: [PATCH 05/23] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E7=BC=A9=E5=B0=8F=E5=90=8E=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E4=BA=86=EF=BC=8Ctpm=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=9D=BF=E5=9D=97=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixuns/_statistics_student_list.html.erb | 51 +++++++++++++++++ app/views/shixuns/settings.html.erb | 6 +- .../shixuns/statistics_students.html.erb | 55 ++----------------- app/views/shixuns/statistics_students.js.erb | 1 + public/stylesheets/css/edu-subject.css | 2 +- public/stylesheets/css/taskstyle.css | 2 +- 6 files changed, 62 insertions(+), 55 deletions(-) create mode 100644 app/views/shixuns/_statistics_student_list.html.erb create mode 100644 app/views/shixuns/statistics_students.js.erb diff --git a/app/views/shixuns/_statistics_student_list.html.erb b/app/views/shixuns/_statistics_student_list.html.erb new file mode 100644 index 000000000..f1e1c3073 --- /dev/null +++ b/app/views/shixuns/_statistics_student_list.html.erb @@ -0,0 +1,51 @@ + +
    +
    +
    +

    学员列表

    +
    + + + <% @statistics.each do |statistics| %> + + + + + + + + <% end %> + +
    + + <%= link_to image_tag(url_to_avatar(statistics.owner), :width => "36", :height => "36", :alt => "头像"), user_path(statistics.owner), :target => '_blank', :class => "", :style => "border-radius:18px;"%> + + <%= link_to statistics.owner.try(:show_name), user_path(statistics.owner), :class => "panel-table-name hide fl color-grey" %> + <%= format_time(statistics.created_at) %> 开启 +
    +
    + +
    +
    + 挑战至第<%= statistics.current_stage %>关/共<%= statistics.games.count %>关 +
    + + <% if statistics.total_score == 0 %> + -- + <% else %> + + <%= statistics.total_score %> 经验值 + <% end %> + +
    +
    +
    +
      + <%= pagination_links_full @statistic_pages, @statistics_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
    +
    +
    +
    +
      +
    \ No newline at end of file diff --git a/app/views/shixuns/settings.html.erb b/app/views/shixuns/settings.html.erb index 03a3e965e..a38867733 100644 --- a/app/views/shixuns/settings.html.erb +++ b/app/views/shixuns/settings.html.erb @@ -2,9 +2,9 @@ <%= 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'%>
    -
      -
    • - 配置 +
        +
      • + 配置
      • diff --git a/app/views/shixuns/statistics_students.html.erb b/app/views/shixuns/statistics_students.html.erb index 82c85a8d8..d33aadf1c 100644 --- a/app/views/shixuns/statistics_students.html.erb +++ b/app/views/shixuns/statistics_students.html.erb @@ -1,51 +1,6 @@ - -
        -
        -
        -

        学员列表

        -
        - - - <% @statistics.each do |statistics| %> - - - - - - - - <% end %> - -
        - - <%= link_to image_tag(url_to_avatar(statistics.owner), :width => "36", :height => "36", :alt => "头像"), user_path(statistics.owner), :target => '_blank', :class => "" %> - - <%= link_to statistics.owner.try(:show_name), user_path(statistics.owner), :class => "panel-table-name hide fl color-grey" %> - <%= format_time(statistics.created_at) %> 开启 -
        -
        - -
        -
        - 挑战至第<%= statistics.current_stage %>关/共<%= statistics.games.count %>关 -
        - - <% if statistics.total_score == 0 %> - -- - <% else %> - + <%= statistics.total_score %> 经验值 - <% end %> - -
        -
        -
        -
          - <%= pagination_links_full @statistic_pages, @statistics_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> -
        -
        -
        -
        -
          + +
        + <%= render "statistics_student_list" %>
        + + diff --git a/app/views/shixuns/statistics_students.js.erb b/app/views/shixuns/statistics_students.js.erb new file mode 100644 index 000000000..dd125b724 --- /dev/null +++ b/app/views/shixuns/statistics_students.js.erb @@ -0,0 +1 @@ +$("#statistics_student").html('<%= escape_javascript( render :partial => 'shixuns/statistics_student_list') %>'); \ No newline at end of file diff --git a/public/stylesheets/css/edu-subject.css b/public/stylesheets/css/edu-subject.css index d7df95ef5..3d1a1c774 100644 --- a/public/stylesheets/css/edu-subject.css +++ b/public/stylesheets/css/edu-subject.css @@ -10,7 +10,7 @@ .subject-box{padding: 20px;background: #fff;text-align: center;position: relative;} .unit-name{line-height: 17px;height: 17px;width:196px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} -.active-class .content .sub-con{width:23.87%;background:#fff;margin: 0 1.5% 30px 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} +.active-class .content .sub-con{box-sizing:border-box;border:1px solid #eee;width:23.87%;background:#fff;margin: 0 1.5% 30px 0px;box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);} .active-class .content .sub-con:nth-child(4n+0){margin:0 0 30px 0;} .active-class .content .sub-con:hover{box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1;} @-webkit-keyframes bounce-down { diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 78194c3ca..680d48333 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -245,7 +245,7 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f .task-index-list{ width: 1200px;} -.task-index-list-box{ width:23.87%;margin: 0 1.5% 30px 0px; border-radius:2px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } +.task-index-list-box{box-sizing:border-box; width:23.87%;margin: 0 1.5% 30px 0px; border-radius:2px;border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } .task-index-list-box:hover{-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1; } .task-index-list-box:nth-child(4n+0) {margin: 0 0 30px 0;} .task-mg8{ margin:0 15px 15px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; } From 758d1bf39d21925df9692311a0d921c7362fbc70 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 22 Sep 2017 17:04:40 +0800 Subject: [PATCH 06/23] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 2 +- .../homework_common/_edit_anon_setting.html.erb | 1 + .../homework_common/_show_anon_setting.html.erb | 2 ++ app/views/student_work/_student_work_score.html.erb | 4 ++-- .../student_work/_student_work_score_div.html.erb | 8 ++++---- .../student_work/_work_attachments_status.html.erb | 2 +- app/views/student_work/index.html.erb | 2 +- app/views/student_work/show.html.erb | 13 ++++++++++--- public/stylesheets/css/edu-common.css | 1 + 9 files changed, 23 insertions(+), 12 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 218fd4562..6e56e44c6 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -251,7 +251,7 @@ class HomeworkCommonController < ApplicationController @homework_detail_programing.ta_proportion = 0 if @homework_detail_programing end if @homework_detail_manual.comment_status < 4 - if params[:homework_anonymous_comment] && params[:homework_anonymous_appeal] + if @homework.anonymous_comment == 0 && params[:homework_anonymous_appeal] @homework.anonymous_appeal = 1 @homework_detail_manual.appeal_time = params[:homework_appeal_time] if params[:homework_appeal_time] @homework_detail_manual.appeal_penalty = params[:homework_appeal_penalty] if params[:homework_appeal_penalty] diff --git a/app/views/homework_common/_edit_anon_setting.html.erb b/app/views/homework_common/_edit_anon_setting.html.erb index b4dc37007..8619e1be4 100644 --- a/app/views/homework_common/_edit_anon_setting.html.erb +++ b/app/views/homework_common/_edit_anon_setting.html.erb @@ -5,6 +5,7 @@
        • + = 3 ? 'disabled' : '' %> type="checkbox" value="1" name="homework_anonymous_comment" <%= @homework.anonymous_comment == 1 ? '' : 'checked' %>> <% end %> -
          +
          <%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => @student_work_scores} %>
          -
          <% end %> <% unless @work.student_work_tests.blank? %> -
          +

          评测历史

          @@ -172,7 +179,7 @@ <% end %> <% end %> <% end %> - <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 3 && @work.user != User.current ) %> + <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 3 && @work.user != User.current) || !@student_work_scores.blank? %>
          <%= render :partial => 'student_work_score_div' %>
          diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css index 60af8ff89..e9ebf326d 100644 --- a/public/stylesheets/css/edu-common.css +++ b/public/stylesheets/css/edu-common.css @@ -55,6 +55,7 @@ a.color-orange05:hover,i.color-orange05:hover{color:#ff7500!important;} .color-yellow2{color:#ff9933!important;} .color-light-grey{color:#afafaf!important;} +.color-grey-no-a{color:#888!important;} .color-grey{color:#888!important;} .color-grey9{color:#999!important;} a.color-grey:hover{color: #FF7500!important;}/*a标签,移入变橙色*/ From 8e9b719b0f5582db81447412ae166f05511de251 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 22 Sep 2017 17:29:25 +0800 Subject: [PATCH 07/23] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=9A=84=E6=AF=8F?= =?UTF-8?q?=E4=B8=80=E5=85=B3=E8=A6=81=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E7=8E=A9=E3=80=81=E7=8E=A9=E7=9A=84=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/challenges_helper.rb | 8 ++++---- app/views/challenges/_content_list.html.erb | 14 +++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/helpers/challenges_helper.rb b/app/helpers/challenges_helper.rb index a0d8dd13f..1d0f815ea 100644 --- a/app/helpers/challenges_helper.rb +++ b/app/helpers/challenges_helper.rb @@ -16,13 +16,13 @@ module ChallengesHelper game = Game.where(:challenge_id => challenge_id, :user_id => User.current.id).first case game.try(:status) when 0 - "待完成  ".html_safe + "待完成  ".html_safe when 1 - "".html_safe + "".html_safe when 2 - "已完成  ".html_safe + "已完成  ".html_safe when 3,nil - "未解锁  ".html_safe + "未开始  ".html_safe end end end diff --git a/app/views/challenges/_content_list.html.erb b/app/views/challenges/_content_list.html.erb index ef5cd8335..71fb21030 100644 --- a/app/views/challenges/_content_list.html.erb +++ b/app/views/challenges/_content_list.html.erb @@ -61,7 +61,19 @@ <%= challenge.score %>经验值 <% end %> <% if @shixun.status == 2 %> - <%= find_game_status challenge.id %> + <% game = Game.where(:challenge_id => challenge.id, :user_id => User.current.id).first %> + + <% case game.try(:status) %> + <% when 0 %> + 待完成   + <% when 1 %> + + <% when 2 %> + 已完成   + <% when 3,nil %> + 未开始   + <% end %> + <% end %>

          From 5cd22581bafd389d2c0edbd0b7eb7d531ed8cda2 Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Fri, 22 Sep 2017 18:40:22 +0800 Subject: [PATCH 08/23] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 5 +- app/controllers/managements_controller.rb | 48 ++++++++++++------- app/controllers/my_controller.rb | 2 +- app/views/courses/destroy.js.erb | 2 +- app/views/layouts/base_management.html.erb | 2 +- .../_audit_pro_authentication_list.html.erb | 1 + .../_auto_users_authorization_list.html.erb | 25 +++++++--- .../_classroom_classment_list.html.erb | 2 - .../managements/_create_department.html.erb | 2 +- .../_pro_authentication_list.html.erb | 1 + .../managements/auto_users_trial.html.erb | 6 +-- app/views/managements/auto_users_trial.js.erb | 1 + app/views/managements/leave_message.js.erb | 1 + app/views/managements/messages_list.js.erb | 1 + app/views/managements/shixuns.html.erb | 1 + public/javascripts/application.js | 2 +- 16 files changed, 66 insertions(+), 36 deletions(-) create mode 100644 app/views/managements/auto_users_trial.js.erb create mode 100644 app/views/managements/leave_message.js.erb create mode 100644 app/views/managements/messages_list.js.erb diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 12cd48c94..c684da9f5 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -36,7 +36,7 @@ class CoursesController < ApplicationController before_filter :require_login, :only => [:join, :unjoin] #before_filter :allow_join, :only => [:join] require 'bundler/setup' - require 'simple_xlsx_reader' + #require 'simple_xlsx_reader' # params[:search] 搜索课程的名称 # params[:select] "join" "create" "all" 参与的 创建的 所有的课程 @@ -1668,10 +1668,9 @@ class CoursesController < ApplicationController @course_id = @course.id syllabus = @course.syllabus @course.delete! - @course = nil respond_to do |format| format.js - format.html{redirect_to syllabuses_path()} + format.html{redirect_to courses_path()} end # redirect_to :back diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 86f9d8fd4..6ea3e5d55 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -235,6 +235,7 @@ class ManagementsController < ApplicationController @jour = paginateHelper @jour, limit respond_to do |format| format.html + format.js end end @@ -251,6 +252,7 @@ class ManagementsController < ApplicationController @memo = paginateHelper @memo, limit respond_to do |format| format.html + format.js end end @@ -758,10 +760,11 @@ end def classroom_classment @menu_type = 2 @sub_type = 2 - @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] + @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] @courses = Course.where(:is_delete => 0) - @timing=Course.where(:is_end=>false).count - @end=Course.where(:is_end=>true).count + @timing = Course.where(:is_end=>false).count + @end = Course.where(:is_end=>true).count + @course_lists = CourseList.where(:id => Course.where(:is_delete => 0 ).map(&:course_list_id) ) unless params[:school_id] || params[:search] || params[:keyword] || params[:status] user_exs=UserExtensions.where(:school_id=> @courses.map(&:school_id)) @schools = School.where(:id =>user_exs.map(&:school_id)) @@ -780,7 +783,7 @@ end @courses = @courses.where(:homepage_show => params[:homepage_show].to_i) end - if params[:course_list] && params[:course_list] != '' + if courselist && courselist != '' @courses = @courses.where(:course_list_id => courselist) end @@ -928,23 +931,24 @@ end condition = (params[:research_condition].nil? || params[:research_condition] == "name") ? "concat(lastname, firstname)" : params[:research_condition] if 0 == status if params[:research_condition] == "phone" && params[:research_contents].blank? - @users = User.order("#{@order_key} #{@us_order}").all + @users = User.order("#{@order_key} #{@us_order}") else - @users = User.where("#{condition} like '%#{params[:research_contents]}%'").order("#{@order_key} #{@us_order}").all + @users = User.where("#{condition} like '%#{params[:research_contents]}%'").order("#{@order_key} #{@us_order}") end else if params[:research_condition] == "phone" && params[:research_contents].blank? - @users = User.where(:status => status).order("#{@order_key} #{@us_order}").all + @users = User.where(:status => status).order("#{@order_key} #{@us_order}") else - @users = User.where("status = #{status} and #{condition} like '%#{params[:research_contents]}%'").order("#{@order_key} #{@us_order}").all + @users = User.where("status = #{status} and #{condition} like '%#{params[:research_contents]}%'").order("#{@order_key} #{@us_order}") end end + if params[:school] && params[:school] != '' school_name = params[:school] - school = School.where("name like '%#{school_name}%'") - school_id = school.map(&:id) - user_id = UserExtensions.where(:school_id => school_id).map(&:user_id) - @users = User.where(:id => user_id) + school = School.where("name like '%#{school_name}%'") + school_id = school.map(&:id) + user_id = UserExtensions.where(:school_id => school_id).map(&:user_id) + @users = @users.where(:id => user_id).order("#{@order_key} #{@us_order}") end @users_count = @users.count @@ -966,6 +970,7 @@ end keyword = params[:keyword].blank? ? "u_name" : params[:keyword] # 根据姓名/实训名搜索 search = params[:search] # 搜索的字 @sx_order = params[:sx_order].blank? ? "desc" : params[:sx_order] # 排序 + if "u_name" == keyword # 如果用户搜索为空,不用遍历user表,直接查找所有实训, 有搜索时才查找user if search.blank? @@ -975,7 +980,13 @@ end @shixuns = Shixun.where(:user_id => user_id, :status => sx_status).order("created_at #{@sx_order}") end else - @shixuns = Shixun.where("name like '%#{search}%'").where(:status => sx_status).order("created_at #{@sx_order}") + if params[:keyword] == "sx_name" + @shixuns = Shixun.where("name like '%#{search}%'").where(:status => sx_status).order("created_at #{@sx_order}") + else + school_id = School.where("name like '%#{search}%'").map(&:id) + user_id = UserExtensions.where(:school_id => school_id).map(&:user_id) + @shixuns = Shixun.where(:user_id => user_id).where(:status => sx_status).order("created_at #{@sx_order}") + end end @edit_sx_num = Shixun.where(:status => 0).count @audit_sx_num = Shixun.where(:status => 1).count @@ -1090,13 +1101,19 @@ end def auto_users_trial @menu_type = 7 @sub_type = 3 - @users = User.where(:status => 1).order("last_login_on #{@sx_order}").all + @schools = School.where("0=0") + @schools_count = @schools.count + limit = 20 + @is_remote = true + @schools_pages = Paginator.new @schools_count, limit, params['page'] || 1 + @offset ||= @schools_pages.offset + @schools = paginateHelper @schools, limit respond_to do |format| format.html + format.js end end - def search_user =begin @@ -1506,5 +1523,4 @@ end book.write xls_report xls_report.string end - end diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index c5bd1e2cd..b2ae7e65c 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -412,7 +412,7 @@ class MyController < ApplicationController } layout[group] = group_items @user.pref[:my_page_layout] = layout - @user.pref.save + @user.pref.saveaccount end end render :nothing => true diff --git a/app/views/courses/destroy.js.erb b/app/views/courses/destroy.js.erb index 8a48dca95..537a40bd5 100644 --- a/app/views/courses/destroy.js.erb +++ b/app/views/courses/destroy.js.erb @@ -1 +1 @@ -$("#management_course_" + <%= @course_id %>).remove() \ No newline at end of file +$("#management_course_<%= @course_id %>").remove(); \ No newline at end of file diff --git a/app/views/layouts/base_management.html.erb b/app/views/layouts/base_management.html.erb index fbf761404..a61425574 100644 --- a/app/views/layouts/base_management.html.erb +++ b/app/views/layouts/base_management.html.erb @@ -87,7 +87,7 @@
          • <%= link_to "用户列表", users_managements_path %>
          • <%= link_to "试用授权列表", users_trial_managements_path %>
          • - +
          • <%= link_to "自动授权列表", auto_users_trial_managements_path %>
        • diff --git a/app/views/managements/_audit_pro_authentication_list.html.erb b/app/views/managements/_audit_pro_authentication_list.html.erb index e9aba882b..792ad8512 100644 --- a/app/views/managements/_audit_pro_authentication_list.html.erb +++ b/app/views/managements/_audit_pro_authentication_list.html.erb @@ -18,6 +18,7 @@ <% if user.user_extensions && user.user_extensions.identity %> <% if user.user_extensions.identity == 1 && user.user_extensions.try(:student_id) %> + <%= "学生" %> <%= user.user_extensions.try(:student_id) %> <% else %> <%= user.user_extensions.try(:technical_title) %> diff --git a/app/views/managements/_auto_users_authorization_list.html.erb b/app/views/managements/_auto_users_authorization_list.html.erb index cacbc5f4e..07a340803 100644 --- a/app/views/managements/_auto_users_authorization_list.html.erb +++ b/app/views/managements/_auto_users_authorization_list.html.erb @@ -5,21 +5,32 @@ 单位 学生 已授权学生 - 授权时间 + 授权时间 操作 - <% @users.each do |user| %> + <% @schools.each_with_index do |school,index| %> + <%= index + 1 %> + <%= school.name %> + <%= UserExtensions.where(:school_id =>school.id).count %> + <%= User.where(:status => 1) && UserExtensions.where(:school_id =>school.id).count %> - - - - - + + 删除 + <% end %> +
          +
          +
            + <%= pagination_links_full @schools_pages, @schools_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
          +
          +
          +
          + diff --git a/app/views/managements/_classroom_classment_list.html.erb b/app/views/managements/_classroom_classment_list.html.erb index 35ece07a4..4dc7e8ee5 100644 --- a/app/views/managements/_classroom_classment_list.html.erb +++ b/app/views/managements/_classroom_classment_list.html.erb @@ -32,9 +32,7 @@ <%= course.teacher ? link_to(course.teacher.try(:lastname)+course.teacher.try(:firstname), user_path(course.teacher)) : "" %> <%= format_time(course.updatetime) %> - 删除  - class="ml-3 mr5 magic-checkbox" id="join_course_role_<%= course.id %>"> diff --git a/app/views/managements/_create_department.html.erb b/app/views/managements/_create_department.html.erb index 8a20a2692..785689032 100644 --- a/app/views/managements/_create_department.html.erb +++ b/app/views/managements/_create_department.html.erb @@ -12,7 +12,7 @@
          - 子单位名称: + 子单位名称:
          请输入子单位名称
          diff --git a/app/views/managements/_pro_authentication_list.html.erb b/app/views/managements/_pro_authentication_list.html.erb index bb7fd86c1..ec21fd371 100644 --- a/app/views/managements/_pro_authentication_list.html.erb +++ b/app/views/managements/_pro_authentication_list.html.erb @@ -19,6 +19,7 @@ <% end %> <% if user.user_extensions && user.user_extensions.identity %> <% if user.user_extensions.identity == 1 && user.user_extensions.try(:student_id) %> + <%= "学生" %> <%= user.user_extensions.try(:student_id) %> <% else %> <%= user.user_extensions.try(:technical_title) %> diff --git a/app/views/managements/auto_users_trial.html.erb b/app/views/managements/auto_users_trial.html.erb index 5e51ee550..1fd06ab47 100644 --- a/app/views/managements/auto_users_trial.html.erb +++ b/app/views/managements/auto_users_trial.html.erb @@ -4,8 +4,8 @@ 搜索 清除
        -
        - <%= render :partial => "auto_users_authorization_list" %> -
        +
        +
        + <%= render :partial => "auto_users_authorization_list" %>
        diff --git a/app/views/managements/auto_users_trial.js.erb b/app/views/managements/auto_users_trial.js.erb new file mode 100644 index 000000000..72adef55e --- /dev/null +++ b/app/views/managements/auto_users_trial.js.erb @@ -0,0 +1 @@ +$(".edu-con-bg01").html('<%= escape_javascript( render :partial => 'managements/auto_users_authorization_list') %>'); \ No newline at end of file diff --git a/app/views/managements/leave_message.js.erb b/app/views/managements/leave_message.js.erb new file mode 100644 index 000000000..8d7d4a188 --- /dev/null +++ b/app/views/managements/leave_message.js.erb @@ -0,0 +1 @@ +$("#leave_message").html('<%= escape_javascript( render :partial => 'managements/leave_message_list') %>'); \ No newline at end of file diff --git a/app/views/managements/messages_list.js.erb b/app/views/managements/messages_list.js.erb new file mode 100644 index 000000000..e43e63bb0 --- /dev/null +++ b/app/views/managements/messages_list.js.erb @@ -0,0 +1 @@ +$("#leave_message").html('<%= escape_javascript( render :partial => 'managements/message_list') %>'); \ No newline at end of file diff --git a/app/views/managements/shixuns.html.erb b/app/views/managements/shixuns.html.erb index 88acd86b5..bd94c78e3 100644 --- a/app/views/managements/shixuns.html.erb +++ b/app/views/managements/shixuns.html.erb @@ -11,6 +11,7 @@
      • diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 76362007e..e624220f1 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1972,7 +1972,7 @@ function delete_confirm_box(url, str){ pop_box_new(htmlvalue, 300, 140); } -//点击删除时的确认弹框: 走destroy方法,remote为true +//点击删除时的确认弹框: d走estroy方法,remote为true function delete_confirm_box_2(url, str){ var htmlvalue = '

        提示

        '+ '

        ' + str + '

        确定'+ From 9b42441e50a0be5c37838fa8342d105543edc6be Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 22 Sep 2017 18:47:05 +0800 Subject: [PATCH 09/23] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=88=A0=E9=99=A4=EF=BC=8C=E6=97=A0=E6=B3=95=E5=B1=80=E9=83=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/discusses_controller.rb | 1 + app/views/discusses/destroy.js.erb | 2 +- app/views/games/_shixun_comment_list.html.erb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index e99d7b374..37f3bb165 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -22,6 +22,7 @@ class DiscussesController < ApplicationController @shixun = @discuss.dis end @discuss.destroy + @game_challenge = Challenge.find(params[:challenge_id]) end end diff --git a/app/views/discusses/destroy.js.erb b/app/views/discusses/destroy.js.erb index 971d4cc8d..ee900a21a 100644 --- a/app/views/discusses/destroy.js.erb +++ b/app/views/discusses/destroy.js.erb @@ -1,3 +1,3 @@ <% if @shixun %> -$.get('<%= shixun_discuss_shixun_path(@shixun) %>'); +$.get('<%= shixun_discuss_shixun_path(@shixun, :challenge_id => @game_challenge.try(:id)) %>'); <% end %> \ No newline at end of file diff --git a/app/views/games/_shixun_comment_list.html.erb b/app/views/games/_shixun_comment_list.html.erb index 6c860bd8a..2707561a3 100644 --- a/app/views/games/_shixun_comment_list.html.erb +++ b/app/views/games/_shixun_comment_list.html.erb @@ -23,7 +23,7 @@ 回复 <% end %> <% if (User.current.manager_of_shixun?(@shixun) || User.current == dis.user) && dis.children.count == 0 %> - 删除 + 删除 <% end %> From 759cda61b93ca9bd5fe208357fa0adf8990ab205 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Sep 2017 19:05:37 +0800 Subject: [PATCH 10/23] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=8F=8A=E5=A4=8D=E5=88=B6=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=B2=A1=E6=9C=89=E5=A4=8D=E5=88=B6=E9=80=82=E7=94=A8?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- app/controllers/shixuns_controller.rb | 6 ++++++ app/views/shixuns/_shixun_top.html.erb | 6 +++--- db/migrate/20170922091816_change_copy_from_in_shixuns.rb | 9 +++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20170922091816_change_copy_from_in_shixuns.rb diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 42f1241bc..064a19c91 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -36,7 +36,7 @@ class CoursesController < ApplicationController before_filter :require_login, :only => [:join, :unjoin] #before_filter :allow_join, :only => [:join] require 'bundler/setup' - #require 'simple_xlsx_reader' + require 'simple_xlsx_reader' # params[:search] 搜索课程的名称 # params[:select] "join" "create" "all" 参与的 创建的 所有的课程 diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index d02293a6c..422edc28d 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -540,6 +540,12 @@ class ShixunsController < ApplicationController new_shixun.status = 0 new_shixun.fork_from = @shixun.id new_shixun.save! + shixun_major_courses = ShixunMajorCourse.where(:shixun_id => @shixun.id) + if shixun_major_courses.present? + shixun_major_courses.each do |smc| + ShixunMajorCourse.create!(:shixun_id => new_shixun.id, :major_id => smc.major_id, :course_list_id => smc.course_list_id) + end + end # 同步复制版本库,先fork再修改版本库名 # eduforge用户作为版本库的创建者 repository = Repository.new diff --git a/app/views/shixuns/_shixun_top.html.erb b/app/views/shixuns/_shixun_top.html.erb index e13c99d5d..ac983ef65 100644 --- a/app/views/shixuns/_shixun_top.html.erb +++ b/app/views/shixuns/_shixun_top.html.erb @@ -35,10 +35,10 @@ <% end %> 已关闭 <% end %> - <%# if @shixun.can_copy && User.current.manager_of_shixun?(@shixun) %> + <% if @shixun.can_copy || User.current.manager_of_shixun?(@shixun) %> <%#= link_to "复制", copy_shixun_path(@shixun), :class => "fr shixun-task-btn task-btn-green mr15" %> - - <%# end %> + 复制 + <% end %> <% end %>
        <% unless User.current.manager_of_shixun?(@shixun) %> diff --git a/db/migrate/20170922091816_change_copy_from_in_shixuns.rb b/db/migrate/20170922091816_change_copy_from_in_shixuns.rb new file mode 100644 index 000000000..269f5f220 --- /dev/null +++ b/db/migrate/20170922091816_change_copy_from_in_shixuns.rb @@ -0,0 +1,9 @@ +class ChangeCopyFromInShixuns < ActiveRecord::Migration + def up + remove_column :shixuns, :can_copy + add_column :shixuns, :can_copy, :boolean, :default => false + end + + def down + end +end From 6e2135c0cf4aece5e6bffd412669427a5ca3aa19 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Sep 2017 19:08:00 +0800 Subject: [PATCH 11/23] =?UTF-8?q?excel=E5=AF=BC=E5=85=A5=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/sync_students.js.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/courses/sync_students.js.erb b/app/views/courses/sync_students.js.erb index f81be12be..5201ada5b 100644 --- a/app/views/courses/sync_students.js.erb +++ b/app/views/courses/sync_students.js.erb @@ -1,6 +1,6 @@ $("#setting_teacher_list").hide(); $("#setting_student_list").html("<%= j(render :partial => 'courses/settings/all_student_list') %>").show(); -<% if @had_import_count > 0 %> -var htmlvalue = '<%= escape_javascript(render :partial => 'courses/settings/import_students_result', :locals => {:course => @course}) %>'; -pop_box_new(htmlvalue, 440, 490); -<% end %> \ No newline at end of file +<%# if @had_import_count > 0 %> +//var htmlvalue = '<%#= escape_javascript(render :partial => 'courses/settings/import_students_result', :locals => {:course => @course}) %>'; +//pop_box_new(htmlvalue, 440, 490); +<%# end %> \ No newline at end of file From 85deee6276cb4d818fb6cbf87f20de4f40d82fdc Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Fri, 22 Sep 2017 19:09:22 +0800 Subject: [PATCH 12/23] =?UTF-8?q?=E5=AD=A6=E5=91=98=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=97=A0=E6=95=B0=E6=8D=AE=E6=9D=BF=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/_statistics_student_list.html.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/shixuns/_statistics_student_list.html.erb b/app/views/shixuns/_statistics_student_list.html.erb index f1e1c3073..5b79f7747 100644 --- a/app/views/shixuns/_statistics_student_list.html.erb +++ b/app/views/shixuns/_statistics_student_list.html.erb @@ -1,6 +1,11 @@ +<% if @statistics.blank? %> +
        + <%= render :partial => "welcome/no_data" %> +
        +<% else %>
        @@ -48,4 +53,5 @@
          -
        \ No newline at end of file +
        +<% end %> \ No newline at end of file From 87dee8cd9d49ade08d76896c3b3a6d4c09b12554 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 22 Sep 2017 19:16:22 +0800 Subject: [PATCH 13/23] cursor --- app/views/courses/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 21b61ec95..529ef165b 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -13,12 +13,12 @@
      • <%= link_to '成员管理', members_course_path(@course),:class => "color-orange03" %> <% apply_count = CourseMessage.where(:course_id => @course.id,:course_message_type => 'JoinCourseRequest', :status => 0).count %> <% if apply_count > 0 %> - <%= apply_count %> + <%= apply_count %> <% end %>
      • <%= link_to '+ 发布普通作业'.html_safe, new_homework_common_path(:course => @course.id, :homework_type => 1),:class => "color-orange03" %>
      • <%= link_to '+ 发布实训作业'.html_safe, shixuns_homework_common_index_path(:course => @course.id),:class => "color-orange03", :remote => true %>
      • -
      • + 发布资源
      • +
      • + 发布资源
      • <% course_board = @course.boards.where("parent_id is NULL").first %>
      • <%= link_to '+ 发布帖子'.html_safe, new_board_message_path(:board_id => course_board.id),:class => "color-orange03" %>
      From 00eba5cc70b9c5bc02a087cb8351926f17b40c04 Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Fri, 22 Sep 2017 19:31:07 +0800 Subject: [PATCH 14/23] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=9B=E5=BB=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 4 ++++ app/views/managements/_create_department.html.erb | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 6ea3e5d55..8326deba5 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -383,6 +383,10 @@ end # 新增 def create_departments + dep = Department.order("created_at desc").first + @latest_school = School.find(dep.try(:school_id)).try(:name) + @school_id = dep.try(:school_id) + respond_to do |format| format.js end diff --git a/app/views/managements/_create_department.html.erb b/app/views/managements/_create_department.html.erb index 785689032..4cd6664bd 100644 --- a/app/views/managements/_create_department.html.erb +++ b/app/views/managements/_create_department.html.erb @@ -4,15 +4,16 @@
    - 单位全称: - + 单位全称: + +
    请选择单位
    - 子单位名称: + 子单位名称:
    请输入子单位名称
    From 60739117c4e850761ffcf5204b90cf0f3cbda1b6 Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Fri, 22 Sep 2017 19:34:22 +0800 Subject: [PATCH 15/23] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20170918014832_update_course_lists.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 db/migrate/20170918014832_update_course_lists.rb diff --git a/db/migrate/20170918014832_update_course_lists.rb b/db/migrate/20170918014832_update_course_lists.rb new file mode 100644 index 000000000..2b66f795a --- /dev/null +++ b/db/migrate/20170918014832_update_course_lists.rb @@ -0,0 +1,8 @@ +class UpdateCourseLists < ActiveRecord::Migration + def up + CourseList.where("user_id is null").update_all(:user_id => 1) + end + + def down + end +end From 236da38444cb96f2fbc5cd79f3fbff5900c5e08a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 22 Sep 2017 19:41:42 +0800 Subject: [PATCH 16/23] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E5=8A=A0?= =?UTF-8?q?=E9=81=AE=E7=BD=A9=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/commits.html.erb | 2 +- app/views/repositories/shixun_commit_diff.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/repositories/commits.html.erb b/app/views/repositories/commits.html.erb index 0103552db..12d5d21ed 100644 --- a/app/views/repositories/commits.html.erb +++ b/app/views/repositories/commits.html.erb @@ -1,4 +1,4 @@ -
    +
      <%= render :partial => 'shixun_navigation' %> diff --git a/app/views/repositories/shixun_commit_diff.html.erb b/app/views/repositories/shixun_commit_diff.html.erb index 9e87166c6..12844f067 100644 --- a/app/views/repositories/shixun_commit_diff.html.erb +++ b/app/views/repositories/shixun_commit_diff.html.erb @@ -1,4 +1,4 @@ -
      +
      <%=link_to "返回提交历史".html_safe, From a249e74526d49edbb0479e139d06ac4255374d4a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 22 Sep 2017 19:51:03 +0800 Subject: [PATCH 17/23] =?UTF-8?q?=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/challenge.rb | 2 +- public/stylesheets/css/edu-common.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 1e389f070..980711d59 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -44,7 +44,7 @@ class Challenge < ActiveRecord::Base def choose_score score = 0 self.challenge_chooses.each do |choose| - score += choose.score + score += choose.score.to_i end return score end diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css index f7f4f00e3..e79899e4b 100644 --- a/public/stylesheets/css/edu-common.css +++ b/public/stylesheets/css/edu-common.css @@ -279,7 +279,7 @@ a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498 .edu-pop-table tr td{border-bottom:1px solid #eee;} .edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;} .edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;} -.edu-pop-table tr td .alink-name{color: #666666!important;} +.edu-pop-table tr td .alink-name{color: #333!important;} .edu-pop-table tr td .alink-name:hover{color: #FF7500!important;} .edu-pop-table tr td .alink-operate{color: #cccccc!important;} .edu-pop-table tr td .alink-operate:hover{color: #FF7500!important;} From a95cef05993469699abe5876829cb9849f22e39e Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Sep 2017 20:04:09 +0800 Subject: [PATCH 18/23] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=94=B9=E6=88=90=E9=99=A4=E4=BA=86=E8=B6=85=E7=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E5=A4=96=EF=BC=8C=E5=85=B6=E4=BB=96=E6=88=90?= =?UTF-8?q?=E5=91=98=E4=B8=8D=E5=85=81=E8=AE=B8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 6ea3e5d55..e1a16a7c1 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1462,6 +1462,15 @@ end shixun.update_column('status', 2) apply_action.update_attributes(:status => 1, :dealer_id => User.current.id) shixun_modify_status_without_publish shixun, 1 + # 实训发布后则不允许修改代码 + g = Gitlab.client + shixun.shixun_members.each do |member| + gid = User.find(member.user_id).try(:gid) + g.edit_team_member(shixun.gpid, gid, 10) # 3代表角色master + end + # 加入超级管理员 + admin_gid = User.where(:admin => 1).first.try(:gid) + g.add_team_member(shixun.gpid, admin_gid, 40) # 30代表角色master end @authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => 0) @authorizations_count = @authorizations.count From 7cc12f034dacec4ac95d40e45f4bdbb5e3447bad Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Sep 2017 20:04:32 +0800 Subject: [PATCH 19/23] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E7=89=88=E6=9C=AC=E5=BA=93=E6=8E=A7=E5=88=B6=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0922112450_sync_publish_game_for_gitlab.rb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 db/migrate/20170922112450_sync_publish_game_for_gitlab.rb diff --git a/db/migrate/20170922112450_sync_publish_game_for_gitlab.rb b/db/migrate/20170922112450_sync_publish_game_for_gitlab.rb new file mode 100644 index 000000000..e91a6cd12 --- /dev/null +++ b/db/migrate/20170922112450_sync_publish_game_for_gitlab.rb @@ -0,0 +1,22 @@ +class SyncPublishGameForGitlab < ActiveRecord::Migration + def up + begin + g = Gitlab.client + shixuns = Shixun.where(:status => 2) + shixuns.each do |shixun| + shixun.shixun_members.each do |member| + gid = User.find(member.user_id).try(:gid) + g.edit_team_member(shixun.gpid, gid, 10) # 3代表角色master + end + # 加入超级管理员 + admin_gid = User.where(:admin => 1).first.try(:gid) + g.add_team_member(shixun.gpid, admin_gid, 40) # 30代表角色master + end + rescue Exception => e + puts e.message + end + end + + def down + end +end From 0e253c4e9ff49390be670977e22ac6231493cc45 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 22 Sep 2017 20:05:48 +0800 Subject: [PATCH 20/23] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=85=B3=E5=8D=A1?= =?UTF-8?q?=E5=BE=97=E5=88=86=E9=BB=98=E8=AE=A4=E5=80=BC=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=BA100=E5=88=86=EF=BC=8C=E5=B9=B6=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E4=BB=A5=E5=BE=80=E5=88=86=E6=95=B0=E4=B8=BA=E7=A9=BA=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- ...0922114504_add_score_default_value_for_challenge.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20170922114504_add_score_default_value_for_challenge.rb diff --git a/Gemfile b/Gemfile index d29d5c856..2a11f7477 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ unless RUBY_PLATFORM =~ /w32/ gem 'nokogiri' end -gem 'simple_xlsx_reader' +#gem 'simple_xlsx_reader' gem 'wechat',path: 'lib/wechat' gem 'grack', path:'lib/grack' gem 'gitlab', path: 'lib/gitlab-cli' diff --git a/db/migrate/20170922114504_add_score_default_value_for_challenge.rb b/db/migrate/20170922114504_add_score_default_value_for_challenge.rb new file mode 100644 index 000000000..bb3494e2d --- /dev/null +++ b/db/migrate/20170922114504_add_score_default_value_for_challenge.rb @@ -0,0 +1,10 @@ +class AddScoreDefaultValueForChallenge < ActiveRecord::Migration + def up + challenges = Challenge.where(:score => nil) + challenges.update_all(:score => 100) + change_column :challenges, :score, :integer, :default => 100 + end + + def down + end +end From 6a142641b668046bdab13b676e449e7e14910bb1 Mon Sep 17 00:00:00 2001 From: XuCheng642 <287102909@qq.com> Date: Fri, 22 Sep 2017 20:24:43 +0800 Subject: [PATCH 21/23] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=B6=88=E6=81=AF=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 4 ++-- app/views/managements/_leave_message_list.html.erb | 2 +- app/views/managements/_message_list.html.erb | 2 +- app/views/managements/_shixun_feedback_list.html.erb | 2 +- app/views/student_work/_shixun_work_show.html.erb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 8326deba5..89de0d47a 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -226,7 +226,7 @@ class ManagementsController < ApplicationController def leave_message @menu_type = 8 @sub_type = 1 - @jour = JournalsForMessage.where(:jour_type => 'HomeworkCommon') + @jour = JournalsForMessage.where(:jour_type => 'HomeworkCommon').order("created_on desc") @jour_count = @jour.count limit = 20 @is_remote = true @@ -243,7 +243,7 @@ class ManagementsController < ApplicationController def messages_list @menu_type = 8 @sub_type = 3 - @memo = Memo.where("0=0") + @memo = Memo.where("0=0").order("created_at desc") @memo_count = @memo.count limit = 20 @is_remote = true diff --git a/app/views/managements/_leave_message_list.html.erb b/app/views/managements/_leave_message_list.html.erb index c57ece754..f65fbf4c8 100644 --- a/app/views/managements/_leave_message_list.html.erb +++ b/app/views/managements/_leave_message_list.html.erb @@ -4,7 +4,7 @@ 序号 来源(课程或用户ID) 留言人 - 留言时间 + 留言时间 留言内容 回复数 diff --git a/app/views/managements/_message_list.html.erb b/app/views/managements/_message_list.html.erb index 58b0587ad..48696e67e 100644 --- a/app/views/managements/_message_list.html.erb +++ b/app/views/managements/_message_list.html.erb @@ -4,7 +4,7 @@ 序号 来源(贴吧ID) 作者 - 时间 + 时间 标题 回复数 diff --git a/app/views/managements/_shixun_feedback_list.html.erb b/app/views/managements/_shixun_feedback_list.html.erb index f531178ac..b53e234d7 100644 --- a/app/views/managements/_shixun_feedback_list.html.erb +++ b/app/views/managements/_shixun_feedback_list.html.erb @@ -4,7 +4,7 @@ 实训名称 评论内容 评论者 - 评论时间 + 评论时间 diff --git a/app/views/student_work/_shixun_work_show.html.erb b/app/views/student_work/_shixun_work_show.html.erb index c61e5ed7a..ebec25778 100644 --- a/app/views/student_work/_shixun_work_show.html.erb +++ b/app/views/student_work/_shixun_work_show.html.erb @@ -23,7 +23,7 @@
    • 通关情况:<%= had_passed_changllenge_num(@shixun, @work.user).to_s+" / "+@shixun.challenges.count.to_s %>
    • -
    •     总耗时:<%=had_passed_changllenge_num(@shixun, @work.user) > 0 ? game_spend_time(@myshixun.total_spend_time) : '- -' %>
    • +
    •   总耗时:<%=had_passed_changllenge_num(@shixun, @work.user) > 0 ? game_spend_time(@myshixun.total_spend_time) : '- -' %>
    From 60d04af7c6fef02a8034c2d4a9a438bfd0fb3eca Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Fri, 22 Sep 2017 20:35:09 +0800 Subject: [PATCH 22/23] =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixuns/_statistics_student_list.html.erb | 80 +++++++++---------- app/views/student_work/show.html.erb | 2 +- app/views/syllabuses/_syllabus_index.html.erb | 3 +- app/views/syllabuses/index.html.erb | 4 + 4 files changed, 46 insertions(+), 43 deletions(-) diff --git a/app/views/shixuns/_statistics_student_list.html.erb b/app/views/shixuns/_statistics_student_list.html.erb index 5b79f7747..02340d7f0 100644 --- a/app/views/shixuns/_statistics_student_list.html.erb +++ b/app/views/shixuns/_statistics_student_list.html.erb @@ -6,32 +6,32 @@ <%= render :partial => "welcome/no_data" %>
    <% else %> -
    -
    -
    -

    学员列表

    -
    - - - <% @statistics.each do |statistics| %> - - - - - - + + <% end %> + +
    - - <%= link_to image_tag(url_to_avatar(statistics.owner), :width => "36", :height => "36", :alt => "头像"), user_path(statistics.owner), :target => '_blank', :class => "", :style => "border-radius:18px;"%> - - <%= link_to statistics.owner.try(:show_name), user_path(statistics.owner), :class => "panel-table-name hide fl color-grey" %> - <%= format_time(statistics.created_at) %> 开启 -
    -
    - -
    -
    - 挑战至第<%= statistics.current_stage %>关/共<%= statistics.games.count %>关 -
    +
    +
    +
    +

    学员列表

    +
    + + + <% @statistics.each do |statistics| %> + + + + + + - - <% end %> - -
    + + <%= link_to image_tag(url_to_avatar(statistics.owner), :width => "36", :height => "36", :alt => "头像"), user_path(statistics.owner), :target => '_blank', :class => "", :style => "border-radius:18px;"%> + + <%= link_to statistics.owner.try(:show_name), user_path(statistics.owner), :class => "panel-table-name hide fl color-grey" %> + <%= format_time(statistics.created_at) %> 开启 +
    +
    + +
    +
    + 挑战至第<%= statistics.current_stage %>关/共<%= statistics.games.count %>关 +
    <% if statistics.total_score == 0 %> -- @@ -39,19 +39,19 @@ + <%= statistics.total_score %> 经验值 <% end %> -
    -
    -
    -
      - <%= pagination_links_full @statistic_pages, @statistics_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> -
    -
    -
    +
    +
    +
    +
      + <%= pagination_links_full @statistic_pages, @statistics_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %> +
    +
    +
    +
    +
     
    -
      -
    <% end %> \ No newline at end of file diff --git a/app/views/student_work/show.html.erb b/app/views/student_work/show.html.erb index a2c0e5cf4..ce7a77f2d 100644 --- a/app/views/student_work/show.html.erb +++ b/app/views/student_work/show.html.erb @@ -2,7 +2,7 @@ <%= stylesheet_link_tag "/codemirror/lib/codemirror" %>

    <%= @course.name %> > <%= @homework.homework_type_ch %>作业 > - <%#= link_to get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1, student_work_index_path(:homework => @homework.id) %> > + <%#= link_to get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1, student_work_index_path(:homework => @homework.id) %> #<%= get_hw_index(@homework, @is_teacher, @homework.homework_type) + 1 %> <% if @is_teacher || @work.user == User.current || (@homework.homework_detail_manual.comment_status != 3 && @homework.homework_detail_manual.comment_status != 4) %> <%= link_to @work.user.try(:show_real_name), user_path(@work.user) %> diff --git a/app/views/syllabuses/_syllabus_index.html.erb b/app/views/syllabuses/_syllabus_index.html.erb index 0902977a8..aec9892c2 100644 --- a/app/views/syllabuses/_syllabus_index.html.erb +++ b/app/views/syllabuses/_syllabus_index.html.erb @@ -2,8 +2,7 @@

    正在进行 已结束 - + 新建 - + 加入课堂 +

    <%= render :partial => "syllabuses/my_syllabuses" %> diff --git a/app/views/syllabuses/index.html.erb b/app/views/syllabuses/index.html.erb index 9b117cb3f..992c326c5 100644 --- a/app/views/syllabuses/index.html.erb +++ b/app/views/syllabuses/index.html.erb @@ -15,6 +15,10 @@
  • <%=link_to "我参与的", syllabuses_path(:tab => 3), :class => "tab_type font-16", :remote => true %>
  • +
  • + + 新建 + + 加入课堂 +
  • From ecd081030b7b5044c4d609d843ef2e1e98596671 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 22 Sep 2017 20:42:58 +0800 Subject: [PATCH 23/23] =?UTF-8?q?=E6=88=90=E5=91=98=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/_choose_tab.html.erb | 2 +- app/views/challenges/_choose_type.html.erb | 9 +++++---- app/views/courses/show.html.erb | 2 +- app/views/student_work/show.html.erb | 2 +- public/stylesheets/css/structure.css | 5 +++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/views/challenges/_choose_tab.html.erb b/app/views/challenges/_choose_tab.html.erb index 3787f5985..260bb4296 100644 --- a/app/views/challenges/_choose_tab.html.erb +++ b/app/views/challenges/_choose_tab.html.erb @@ -2,7 +2,7 @@ 本关任务 <% @challenge.challenge_chooses.each_with_index do |choose, index| %> -
  • " style="<%= @index == index ? "width:110px" : "flex:1" %>"> +
  • " style="<%= @challenge.challenge_chooses.count > 7 ? (@index == index ? "width:110px" : "flex:1") : "" %>"> <%= (index + 1).to_s + (choose.category == 1 ? ".单选题" : ".多选题") %> diff --git a/app/views/challenges/_choose_type.html.erb b/app/views/challenges/_choose_type.html.erb index 6bce64f2d..1947a3760 100644 --- a/app/views/challenges/_choose_type.html.erb +++ b/app/views/challenges/_choose_type.html.erb @@ -73,11 +73,14 @@ var html="
  • "+li_con+"
  • "; $(".stage-part-2").find(".nav_option li").removeClass("check_nav"); $(".stage-part-2").find(".nav_option li").removeAttr("style"); - for(var i=1;i<$(".stage-part-2").find(".nav_option li").length;i++){ - $(".stage-part-2").find(".nav_option li").eq(i).attr("style","flex:1"); + if($(".stage-part-2").find(".nav_option li").length>7){ + for(var i=1;i<$(".stage-part-2").find(".nav_option li").length;i++){ + $(".stage-part-2").find(".nav_option li").eq(i).attr("style","flex:1"); + } } + $(".stage-part-2").find(".nav_option li").eq(length-1).after(html); $.ajax({ @@ -116,8 +119,6 @@ if($(".nav_option li").length>1){ $(".nav_option li").removeClass("check_nav"); $(this).parent().addClass("check_nav"); - $(this).parent().removeAttr("style") - $(this).parent().attr("style","flex:1"); } }) diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 529ef165b..4d7fc2d04 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -13,7 +13,7 @@
  • <%= link_to '成员管理', members_course_path(@course),:class => "color-orange03" %> <% apply_count = CourseMessage.where(:course_id => @course.id,:course_message_type => 'JoinCourseRequest', :status => 0).count %> <% if apply_count > 0 %> - <%= apply_count %> + <%= apply_count %> <% end %>
  • <%= link_to '+ 发布普通作业'.html_safe, new_homework_common_path(:course => @course.id, :homework_type => 1),:class => "color-orange03" %>
  • diff --git a/app/views/student_work/show.html.erb b/app/views/student_work/show.html.erb index a2c0e5cf4..9d34b346f 100644 --- a/app/views/student_work/show.html.erb +++ b/app/views/student_work/show.html.erb @@ -59,7 +59,7 @@
    补交原因:<%= revise_attachment.description %>
    -
      +
        <%= render :partial => 'work_attachments_status', :locals => {:attachments => @work.attachments.where("attachtype = 7"), :status => @homework.homework_detail_manual.comment_status} %>
      • <%= format_time(revise_attachment.created_on) %> 提交
      diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 270678131..7052dd715 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -539,5 +539,6 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex .activities_btn li{flex: 1;height: 50px;line-height: 50px;float: left;text-align: center;border-right: 1px solid #FF7500;} .activities_btn li:last-child{border: none;} .activities_btn li:hover{color:#fff!important;background: #FF7500;} -.activities_btn li:hover a{color: #fff!important;} -.activities_btn li:hover .edu-cir-orange{background: #fff;color: #FF7500} \ No newline at end of file +.activities_btn li:hover .color-orange03{color: #fff!important;} +.activities_btn li .edu-cir-orange{color: #fff!important;} +.activities_btn li:hover .edu-cir-orange{background: #fff;color: #FF7500!important;} \ No newline at end of file