From 2cd6edbcdca6bc905e19aa1d079200f0ffebb2ce Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Tue, 25 Jul 2017 09:19:35 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E6=97=A0=E8=AE=BA=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=88=9B=E5=BB=BA=E4=BA=86=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=EF=BC=8C=E5=9D=87=E5=8F=AF=E4=BB=A5=E6=96=B0=E5=BB=BA=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E5=A5=97=E4=BB=B6=20(=E6=96=B0=E9=A1=B5=E9=9D=A2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/_subject_createnew.html | 46 ++++++++++++++++++++++ public/stylesheets/css/edu-public.css | 1 + 2 files changed, 47 insertions(+) create mode 100644 app/views/subjects/_subject_createnew.html diff --git a/app/views/subjects/_subject_createnew.html b/app/views/subjects/_subject_createnew.html new file mode 100644 index 000000000..a86d57578 --- /dev/null +++ b/app/views/subjects/_subject_createnew.html @@ -0,0 +1,46 @@ + + +
+ + + + + + +@@ -44,39 +44,44 @@
-| 序号 | +姓名 | +用户ID | +学号 | +分班 | +操作 | +
|---|---|---|---|---|---|
| <%= index + 1 + (@page - 1) * 20 %> | +<%= link_to user.show_real_name, user_path(user), :class => 'edu-txt-w140 task-hide mt5', :target => '_blank' %> | +<%= user.login %> | +<%= user.user_extensions ? user.user_extensions.student_id : '' %> | +<%= member.course_group_id == 0 ? '未分班' : member.course_group.name %> | +<% if user == User.current %> - 删除 + 删除 <% else %> -- <% end %> - - + | +
@@ -48,41 +48,41 @@
-| 序号 | +姓名 | +用户ID | +学号 | +操作 | +
|---|---|---|---|---|
| <%= index + 1 + (@page -1) * 20 %> | +<%= link_to user.show_real_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %> | +<%= user.login %> | +<%= user.user_extensions ? user.user_extensions.student_id : '' %> | +<% if user == User.current %> - 移除 + 移除 <% else %> -- <% end %> - - + | +
@@ -44,41 +44,44 @@
-| 序号 | +姓名 | +用户ID | +学号 | +操作 | +
|---|---|---|---|---|
| <%= index + 1 + (@page -1) * 20 %> | +<%= link_to user.show_real_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %> | +<%= user.login %> | +<%= user.user_extensions ? user.user_extensions.student_id : '' %> | +<% if user == User.current %> - 删除 + 删除 <% if @course.choose_group_allow %> - 加入分班 + 加入分班 <% end %> <% else %> -- <% end %> - - + | +
- 序号 - 姓名 - 用户ID - 角色 -
-| 序号 | +姓名 | +用户ID | +角色 | +
|---|---|---|---|
| <%= index + 1 + (@page-1) * 20 %> | ++ <%= link_to user.show_real_name, user_path(user), :target => '_blank', :class => 'edu-txt-w140 task-hide mt5' %> + | +<%= user.try(:login) %> | +<%= zh_course_role(h teacher.roles.where("name != 'Student'").first.name) %> | +
+ + <%= link_to User.current.show_name, user_path(User.current) %> > <%= link_to "实训套件", subjects_path() %> + > 新建 +
+阶段名称不能为空
+阶段名称不能为空
+至少选择一个实训 diff --git a/app/views/subjects/_subject_top.html.erb b/app/views/subjects/_subject_top.html.erb index cdd006272..8e10310ca 100644 --- a/app/views/subjects/_subject_top.html.erb +++ b/app/views/subjects/_subject_top.html.erb @@ -7,7 +7,8 @@ <%= @subject.user.show_name %>
<%= @subject.name %>
+<%= @subject.name %>
+ <% if @subject.status > 1 %>简介
+本课程适合没有基础、或者初学C++的同学进行学习,本课程适合没有基础、或者初学C++的同学进行学习,本课程适合没有基础、或者初学C++的同学进行学习,本课程适合没有基础、或者初学C++的同学进行学习
+第1章 基础入门
+程序是对数据的处理,一般程序可以分解为:“数据输入”程序是对数据的处理,一般程序可以分解为:“数据输入”程序是对数据的处理,一般程序可以分解为:“数据输入”程序是对数据的处理,一般程序可以分解为:“数据输入”
+第1章 基础入门
+程序是对数据的处理,一般程序可以分解为:“数据输入”
+阶段名称不能为空
+阶段名称不能为空
+至少选择一个实训 @@ -122,13 +202,21 @@ edithtml+="保存"; edithtml+="
阶段名称不能为空
"; + edithtml+="阶段名称不能为空
"; + edithtml+="至少选择一个实训选择实训后,在页面上通过拖拽进行排序调整
"; + edithtml+=""; + edithtml+="至少选择一个实训"; + edithtml+="选择实训后,在页面上通过拖拽进行排序调整
"; edithtml+="阶段名称不能为空
<% if @status == 0 %>
已发布过申请,请等待管理员审核
- <% else %>
+ <% elsif @status == 1 %>
发布申请已提交,请等待管理员的审核
• 我们将在1-2个工作日内完成审核
+ <% elsif @status == 2 %>
+ 项目实训全部发布后,才能申请发布
<% end %>
<%= @subject.name %>
- - <% if @subject.status > 1 %> -<%= @subject.name %>
+ <% if User.current.manager_of_subject?(@subject) && @subject.status == 0 %> + + <% end %> + <% if !User.current.manager_of_subject?(@subject) || @subject.status > 1 %> +简介
-本课程适合没有基础、或者初学C++的同学进行学习,本课程适合没有基础、或者初学C++的同学进行学习,本课程适合没有基础、或者初学C++的同学进行学习,本课程适合没有基础、或者初学C++的同学进行学习
-+ 简介 + <% if User.current.manager_of_subject?(@subject) && @subject.status == 0 %> + + <% end %> +
+<%= @subject.description.blank? ? "暂未填写" : @subject.description %>
+第1章 基础入门
-程序是对数据的处理,一般程序可以分解为:“数据输入”程序是对数据的处理,一般程序可以分解为:“数据输入”程序是对数据的处理,一般程序可以分解为:“数据输入”程序是对数据的处理,一般程序可以分解为:“数据输入”
-第1章 基础入门
-程序是对数据的处理,一般程序可以分解为:“数据输入”
-<%= shixun.shixun_trainee %>
++ + <%= stage.name %> + <% if @subject.status == 0 && User.current.manager_of_subject?(@subject) %> + + + <% end %> +
+<%= stage.description %>
+ <% stage.stage_shixuns.each_with_index do |stage_shixun, index| %> + <% shixun = stage_shixun.shixun %> +"; @@ -248,12 +222,12 @@ } else{ $("#stage_name_notice").hide(); } - if($("input[name='shixun_id[]']").length == 0){ - status = false; - $("#sx_none_notice").show(); - } else{ - $("#sx_none_notice").hide(); - } +// if($("input[name='shixun_id[]']").length == 0){ +// status = false; +// $("#sx_none_notice").show(); +// } else{ +// $("#sx_none_notice").hide(); +// } if(status && flag){ flag = false; $("#new_stage_form").submit(); diff --git a/config/routes.rb b/config/routes.rb index 4dcd2a279..63d99e310 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -37,6 +37,7 @@ RedmineApp::Application.routes.draw do get 'choose_subject_shixun' get 'publish' get 'cancel_publish' + post 'update_attr' end collection do From fc7b2b5945872fc3fe020f5c49155ba88d6d8740 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 26 Jul 2017 14:42:39 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E5=85=B3=E5=8D=A1=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/_content_list.html.erb | 8 ++++---- app/views/games/_repository.html.erb | 2 +- public/stylesheets/css/taskstyle.css | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/challenges/_content_list.html.erb b/app/views/challenges/_content_list.html.erb index 3b199c484..7a36fa413 100644 --- a/app/views/challenges/_content_list.html.erb +++ b/app/views/challenges/_content_list.html.erb @@ -5,10 +5,10 @@ <%= @challenges.count %> <% end %> <% if User.current.manager_of_shixun?(@shixun) && @shixun.status == 0 %> - - - - 新建阶段 + +单选任务 + +多选任务 + +编程任务 + <% end %>