diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 87ab7e683..e76fa31dc 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -500,7 +500,8 @@ class CoursesController < ApplicationController end end - def course + def + course @school_id = params[:school_id] per_page_option = 10 if @school_id == "0" or @school_id.nil? diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 096ce7ad8..8547ef18f 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -114,7 +114,7 @@ module CoursesHelper # 学生人数计算 # add by nwb def studentCount course - searchStudent(course).count.to_s#course.student.count + course.student.count.to_s#course.student.count end #课程成员数计算 diff --git a/app/models/course.rb b/app/models/course.rb index 196e7168d..c11f66d49 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -38,7 +38,7 @@ class Course < ActiveRecord::Base validates_presence_of :password, :term,:name validates_format_of :class_period, :with =>/^[1-9]\d*$/ - validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/ + validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/ validates_length_of :description, :maximum => 10000 before_save :self_validate after_create :create_board_sync diff --git a/app/views/courses/member.html.erb b/app/views/courses/member.html.erb index d199097be..81c469fd8 100644 --- a/app/views/courses/member.html.erb +++ b/app/views/courses/member.html.erb @@ -1,21 +1,19 @@ -
- <%= l(:label_user_joinin) %>: + | + <%= l(:label_user_joinin) %>: | <%= format_time(@user.created_on) %> |
- <%= l(:label_user_login) %>: + | + <%= l(:label_user_login) %>: | <%= format_time(@user.last_login_on) %> @@ -239,8 +239,8 @@ <% unless @user.user_extensions.nil? %> <% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %> |
- <%= l(:field_occupation) %>: + | + <%= l(:field_occupation) %>: | <% unless @user.user_extensions.school.nil? %> @@ -250,8 +250,8 @@ |
- <%= l(:field_occupation) %>: + | + <%= l(:field_occupation) %>: | <%= @user.user_extensions.occupation %> @@ -259,8 +259,8 @@ |
- <%= l(:label_company_name) %>: + | + <%= l(:label_company_name) %>: | <%= @user.firstname %> @@ -268,8 +268,8 @@ |
- <%= l(:label_location) %>: + | + <%= l(:label_location) %>: | <%= @user.user_extensions.location %> @@ -278,8 +278,8 @@ |
- <%= l(:label_technical_title) %>: + | + <%= l(:label_technical_title) %>: | @@ -289,8 +289,8 @@ <% if @user.user_extensions.identity == 1 %> <% if(is_watching?(@user) ) %> |
- <%= l(:label_bidding_user_studentcode)%>: + | + <%= l(:label_bidding_user_studentcode)%>: | <%= @user.user_extensions.student_id %> @@ -298,7 +298,7 @@ |
+ | <%= l(:label_identity)%>: | @@ -309,7 +309,7 @@ <% end %> <% elsif @user.user_extensions.identity == 3 %> |
+ | <%= l(:label_identity)%>: | diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 282b760b2..54e2a17aa 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2912,7 +2912,7 @@ input[class~='ButtonClolr'],.ButtonColor{ input[class~='m3p10'], .m3p10 { margin-top: 5px; - padding: 5px 10px !important; + padding: 5px 10px; height: 20px; display: inline-block; color: #ffffff; |