From d1bfdde26138e68a3d74ae1e290e91d07566cc86 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Nov 2016 15:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=90=8D=E7=A7=B0=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E5=92=8C=E6=98=BE=E7=A4=BA=E8=A7=84=E8=8C=83=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/controllers/courses_controller.rb | 10 +++++----- app/views/courses/_recommendation.html.erb | 2 -- app/views/courses/new.html.erb | 6 +++--- app/views/courses/settings.html.erb | 5 +++-- app/views/layouts/_course_base_info.html.erb | 4 +--- app/views/layouts/_user_courses.html.erb | 2 +- .../_homework_post_brief.html.erb | 2 -- .../syllabuses/_syllabus_course_list.html.erb | 4 ---- app/views/users/_course_attachment.html.erb | 2 -- app/views/users/_course_create.html.erb | 2 -- app/views/users/_course_homework.html.erb | 2 -- .../users/_course_journalsformessage.html.erb | 2 -- app/views/users/_course_message.html.erb | 2 -- app/views/users/_course_news.html.erb | 2 -- app/views/users/_course_poll.html.erb | 2 -- .../users/_homework_repository_list.html.erb | 2 -- .../users/_manage_homework_list.html.erb | 2 -- .../users/_receive_homework_list.html.erb | 2 -- .../users/_user_homework_detail.html.erb | 2 -- .../20161111070615_update_course_name.rb | 19 +++++++++++++++++++ db/schema.rb | 16 +++++++++++++++- public/javascripts/course.js | 13 ++++++++++++- 22 files changed, 59 insertions(+), 46 deletions(-) create mode 100644 db/migrate/20161111070615_update_course_name.rb diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index dd31d3778..4af7d6644 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -829,11 +829,11 @@ class CoursesController < ApplicationController end if @course #发送微信消息 - count = ShieldWechatMessage.where("container_type='User' and container_id=#{User.current.id} and shield_type='Course' and shield_id=#{@course.id}").count - if count == 0 - ss = SyllabusesService.new - ss.send_wechat_create_class_notice User.current,@course - end + # count = ShieldWechatMessage.where("container_type='User' and container_id=#{User.current.id} and shield_type='Course' and shield_id=#{@course.id}").count + # if count == 0 + # ss = SyllabusesService.new + # ss.send_wechat_create_class_notice User.current,@course + # end respond_to do |format| flash[:notice] = l(:notice_successful_create) format.html {redirect_to course_url(@course)} diff --git a/app/views/courses/_recommendation.html.erb b/app/views/courses/_recommendation.html.erb index cb31db24f..6dffb1da3 100644 --- a/app/views/courses/_recommendation.html.erb +++ b/app/views/courses/_recommendation.html.erb @@ -5,8 +5,6 @@
  • <%= i+1 %>
    - <%= link_to e_course.syllabus.title, syllabus_path(e_course.syllabus_id), :target => '_blank', :class => "sy_class_ltitle"%> -  ·  <%=link_to e_course.name, course_path(e_course.id), :class => "sy_class_ltitle mb10" %>
    diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index da637320e..ec763961b 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -18,13 +18,13 @@
  • - +
  • -
  • 正确示例:计算机系2016秋季A班
  • -
  • 错误示例:软件工程 - 计算机系2016秋季A班
  • +
  • 正确示例:软件工程计算机系2016秋季A班
  • +
  • 错误示例:计算机系2016秋季A班
  • diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb index 519bef7be..82e55328b 100644 --- a/app/views/courses/settings.html.erb +++ b/app/views/courses/settings.html.erb @@ -39,14 +39,15 @@
  • - <%=@course.syllabus.title %> + <%=@course.syllabus.title %> <%#= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"edit_syllabus_id", :class=>"syllabus_input", :style=>'width:210px'} %>
  • - +
    +
  • diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb index 608f08a58..e3041f92c 100644 --- a/app/views/layouts/_course_base_info.html.erb +++ b/app/views/layouts/_course_base_info.html.erb @@ -6,7 +6,7 @@ <%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cgrey') %>  >  <% if @course.syllabus %> - <%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey' %> + <%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey', :title => '课程名称' %>  >  <% end %> <%=link_to @course.name, course_path(@course), :class => 'sy_cgrey' %> @@ -55,8 +55,6 @@

    - <%= link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class =>'c_dark', :target => '_blank'%> -  ·  <%=@course.name %>

    diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index 3e9ba3019..1b4f38ec5 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -3,7 +3,7 @@ <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>

    - <%= link_to course.syllabus.title + course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => 'display:block;'%> + <%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => 'display:block;'%>