+
<% if User.current.logged? && User.current.member_of_course?(@course) && @group %>
<% if !@canShowCode %>
<%= join_in_course_group(@course.course_groups,@group, User.current) %>
<% end %>
- <%= @group.name %><%= @subPage_title %>
+ <%= l(:label_current_group)%>: <%= @group.name %>
+ <% end %>
+ <%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %>
+ <%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%>
+ <%= submit_tag l(:label_search), :class => "f_2"%>
+ <%#= link_to l(:label_search),'' , :class => 'f_2' %>
+ <% end %>
-<% end %>
-
+
<% if members.any? %>
<% if @result_count %>
<%= l(:label_search_member_count) %><%= @result_count %><%= l(:label_member_people) %>
diff --git a/app/views/courses/member.html.erb b/app/views/courses/member.html.erb
index 5d596efeb..fb317acf6 100644
--- a/app/views/courses/member.html.erb
+++ b/app/views/courses/member.html.erb
@@ -3,20 +3,14 @@
<%= @subPage_title %>
- <% if @subPage_title == l(:label_student_list) %>
- <%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:remote=>true) do %>
- <%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1'%>
- <%= submit_tag l(:label_search), :class => "f_2"%>
- <%#= link_to l(:label_search),'' , :class => 'f_2' %>
- <% end %>
- <% end %>
+
-
+ <% if @subPage_title == l(:label_student_list) %>
<%= render :partial => 'groups_name', locals: {:course_groups => @course_groups} %>
-
+ <% end %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index ce3181864..7efd6a4f0 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -572,6 +572,7 @@ zh:
label_member:
label_search_member_count: 共搜索到
label_member_people: 人
+ label_current_group: 当前分班
label_limit_groupname: 组别名不能超出20字符
label_limit_groupname_null: 组别名不能为空
label_member_new: 添加成员
@@ -1906,7 +1907,9 @@ zh:
label_bids_task_list: 作业列表
label_join_course: 加入
label_exit_course: 退出
+ label_exit_group: 退出当前分班
label_new_join: 加入
+ label_new_join_group: 加入当前分班
label_new_course_password: 课程密码
label_new_course_school: 开课学校
label_new_course_description: 课程描述
diff --git a/public/stylesheets/course_group.css b/public/stylesheets/course_group.css
index 10d69f384..ebc861b0f 100644
--- a/public/stylesheets/course_group.css
+++ b/public/stylesheets/course_group.css
@@ -20,9 +20,9 @@ a:hover{ }
.c_red{ color:#ec0016;}
.w90{width:90px;}
.ml10{margin-left:10px;}
-.st_search input.f_2 {
+input.f_2 {
width:60px !important;
- height:28px !important;
+ height:24px !important;
color:#fff !important;
margin-right:5px !important;
border:none !important;
@@ -81,16 +81,17 @@ a:hover.st_add{ color:#ff8e15;}
.submit_2{height:21px;border:0; cursor:pointer; background:url(../images/btn1.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.group_in {
- width:60px !important;
+ width:90px !important;
height:28px !important;
- color:#fff !important;
+ color:#1c9ec7!important;
margin-right:5px !important;
border:none !important;
+ font-size: 14px !important;
margin-left:0px !important;
box-shadow: none !important;
-
+ float: right;
border-radius: 0 !important;
text-shadow: none !important;
- border:1px solid #1c9ec7;
- background:#1c9ec7;
+ padding: 0px !important;
+ background:#ffffff !important;
}
\ No newline at end of file
From b5d007ccf7d1b29f4e479f1da432174938bd75ad Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Sat, 6 Dec 2014 00:52:06 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E3=80=8A=E7=82=B9?=
=?UTF-8?q?=E5=87=BB=E5=88=86=E7=BB=84=E5=90=8D=EF=BC=8C=E8=AF=A5=E5=88=86?=
=?UTF-8?q?=E7=BB=84=E5=90=8D=E5=BA=95=E8=89=B2=E5=8F=91=E7=94=9F=E6=94=B9?=
=?UTF-8?q?=E5=8F=98=E3=80=8B=20Signed-off-by:=20alan=20<547533434@qq.com>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_groups_name.html.erb | 33 +++++++++++++++++--------
public/stylesheets/course_group.css | 1 +
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/app/views/courses/_groups_name.html.erb b/app/views/courses/_groups_name.html.erb
index 7bff77a79..096e84372 100644
--- a/app/views/courses/_groups_name.html.erb
+++ b/app/views/courses/_groups_name.html.erb
@@ -5,6 +5,18 @@
alert('<%= l(:label_limit_groupname) %>');
}
}
+ function checkclass(value) {
+
+ for(var i = 0; i < document.getElementsByName("check_group_name").length; i++) {
+ if(document.getElementsByName("check_group_name")[i].id == value) {
+ document.getElementById(value).className = "selected";
+ }
+ else {
+ document.getElementsByName("check_group_name")[i].className = "classbox";
+ }
+
+ }
+ }
function validate_groupname_null(value1) {
value1 = value1.trim();
if(value1.length == 0 ) {
@@ -16,25 +28,26 @@
validate_groupname(value1);
}
- function validate_add_group() {
- value1 = document.getElementById('group_name').value;
- validate_groupname(value1);
- validate_groupname_null(value1);
+ function validate_add_group() {
+ value1 = document.getElementById('group_name').value;
+ validate_groupname(value1);
+ validate_groupname_null(value1);
- }
+ }
- -
+
-
<% course_member_count = l(:label_all) + " ( " + @membercount.to_s + "人)" %>
- <%= link_to course_member_count, searchgroupmembers_course_path(@course,:group_id => 0), method: 'get', remote: true,:style => " border:0px; color: #0d90c3; float:left;"%>
+ <%= link_to course_member_count, searchgroupmembers_course_path(@course,:group_id => 0), :onclick => "checkclass('group_name_0')", method: 'get', remote: true,:style => " border:0px; color: #0d90c3; float:left;"%>
<% if course_groups.any? %>
<% course_groups.each do |group| %>
- <% group_display = group.name + " (" + group.members.count.to_s + "人)" %>
- -
- <%= link_to group_display, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true, :onclick => "$asign_id(#{group.id})",:style => " border:0px; color: #0d90c3; float:left;"%>
+ <% group_display = group.name + " ( " + group.members.count.to_s + "人)" %>
+
-
+ <%= link_to group_display, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true,
+ :onclick => "checkclass('group_name_#{group.id}')",:style => " border:0px; color: #0d90c3; float:left;"%>
<% if @canShowCode %>
<% end %>
diff --git a/public/stylesheets/course_group.css b/public/stylesheets/course_group.css
index ebc861b0f..edfcb9091 100644
--- a/public/stylesheets/course_group.css
+++ b/public/stylesheets/course_group.css
@@ -45,6 +45,7 @@ input.f_2 {
/*.st_search input.f_2{ background:#1c9ec7; padding: 3px; margin-left: 3px; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:45px; height:28px; font-size:12px; }*/
.classbox{ border:1px solid #f8df8c; background:#fffce6; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
+.st_addclass ul li.selected { border:1px solid #f8df8c; background:#f8df8c; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
.st_addclass{ margin-top:5px;}
.st_addclass ul li{ margin-bottom:10px;}
.st_addclass ul li,.st_addclass a,.st_addclass img{ float:left;}
From b51cd1aabbd4721949b6e1edaca26b8d94cc7939 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 6 Dec 2014 11:00:15 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=95=99=E5=B8=88?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/courses_controller.rb | 1 +
app/views/courses/_member_list.html.erb | 10 ++++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index f83a5657f..3b5afae08 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -290,6 +290,7 @@ class CoursesController < ApplicationController
@role = params[:role]
@course_groups = @course.course_groups if @course.course_groups
@course_group_id = params[:@course_group_id] unless params[:@course_group_id].nil?
+ @show_serch = params[:role] == '2'
case params[:role]
when '1'
@subPage_title = l :label_teacher_list
diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb
index 6de228fd2..1c71d915a 100644
--- a/app/views/courses/_member_list.html.erb
+++ b/app/views/courses/_member_list.html.erb
@@ -5,10 +5,12 @@
<% end %>
<%= l(:label_current_group)%>: <%= @group.name %>
<% end %>
- <%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %>
- <%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%>
- <%= submit_tag l(:label_search), :class => "f_2"%>
- <%#= link_to l(:label_search),'' , :class => 'f_2' %>
+ <% if @show_serch%>
+ <%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %>
+ <%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%>
+ <%= submit_tag l(:label_search), :class => "f_2"%>
+ <%#= link_to l(:label_search),'' , :class => 'f_2' %>
+ <% end %>
<% end %>
From 03a8d8ccc918e784d92aa12cdb62d4cc563571c6 Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Sat, 6 Dec 2014 12:34:02 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E6=95=99?=
=?UTF-8?q?=E5=B8=88=E5=88=97=E8=A1=A8=E4=B8=AD=E4=B8=8D=E5=BA=94=E8=AF=A5?=
=?UTF-8?q?=E6=9C=89=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD=E3=80=8B=20Signed?=
=?UTF-8?q?-off-by:=20alan=20<547533434@qq.com>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/courses_controller.rb | 7 +++++++
app/views/courses/_member_list.html.erb | 3 ++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index f83a5657f..8eab83fef 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -199,6 +199,7 @@ class CoursesController < ApplicationController
end
def searchmembers
+ @subPage_title = l :label_student_list
@render_file = 'member_list'
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@@ -211,6 +212,7 @@ class CoursesController < ApplicationController
end
def addgroups
+ @subPage_title = l :label_student_list
if params[:group_name]
group = CourseGroup.new
group.name = params[:group_name]
@@ -225,6 +227,7 @@ class CoursesController < ApplicationController
end
def updategroupname
+ @subPage_title = l :label_student_list
if params[:group_name]
group = CourseGroup.find(params[:group_id])
group.name = params[:group_name]
@@ -237,6 +240,7 @@ class CoursesController < ApplicationController
@course_groups = @course.course_groups
end
def join_group
+ @subPage_title = l :label_student_list
group = CourseGroup.find(params[:object_id])
member = Member.where(:course_id => @course.id, :user_id => User.current.id).first
member.course_group_id = group.id
@@ -248,6 +252,7 @@ class CoursesController < ApplicationController
search_group_members group
end
def unjoin_group
+ @subPage_title = l :label_student_list
group = CourseGroup.find(params[:object_id])
member = Member.where(:course_id => @course.id, :user_id => User.current.id).first
member.course_group_id = 0
@@ -259,6 +264,7 @@ class CoursesController < ApplicationController
search_group_members group
end
def searchgroupmembers
+ @subPage_title = l :label_student_list
@render_file = 'member_list'
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
@@ -273,6 +279,7 @@ class CoursesController < ApplicationController
@results = paginateHelper @results
end
def search_group_members group
+ @subPage_title = l :label_student_list
@render_file = 'member_list'
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
@is_remote = true
diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb
index 6de228fd2..b7a3926f8 100644
--- a/app/views/courses/_member_list.html.erb
+++ b/app/views/courses/_member_list.html.erb
@@ -5,12 +5,13 @@
<% end %>
<%= l(:label_current_group)%>: <%= @group.name %>
<% end %>
+ <% if @subPage_title == l(:label_student_list) %>
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %>
<%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%>
<%= submit_tag l(:label_search), :class => "f_2"%>
<%#= link_to l(:label_search),'' , :class => 'f_2' %>
<% end %>
-
+ <% end %>