From 756d703b5a6d67c73ea6634523331a552df26d0a Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 1 Sep 2015 15:34:08 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=A1=86=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=98=BE=E7=A4=BA=E6=96=87=E5=AD=97=E7=B1=BB=E4=BC=BC?= =?UTF-8?q?=E4=BA=8E=E2=80=9C=E8=AF=B7=E9=80=89=E6=8B=A9=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9A=84=E8=AF=BE=E7=A8=8B=E2=80=9D=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=8D=B3=E5=BC=B9=E5=87=BA=E4=BE=9B=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=E5=90=8E=E8=BF=98=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=98=BE=E7=A4=BA=E5=BC=80=E8=AF=BE=E5=AD=A6=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/users_helper.rb | 15 ++++++++++++++- app/views/users/_user_homework_form.html.erb | 7 ++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index e7ab001da..d9458bdaa 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -541,7 +541,7 @@ module UsersHelper end end - #获取指定用户作为老师的课程 +=begin def get_as_teacher_courses user type = [] user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course| @@ -552,5 +552,18 @@ module UsersHelper end type end +=end + + #获取指定用户作为老师的课程 + def get_as_teacher_courses_terms user + type = [] + user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course| + option = [] + option << course.name+"("+course.time.to_s+course.term+")" + option << course.id + type << option + end + type + end end diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index 7cd4da414..9ff31a9d2 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -27,7 +27,7 @@
- <%= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w708",:value => "请选择发布作业的课程"} %> + <%= select_tag :course_id, options_for_select(get_as_teacher_courses_terms(User.current), homework.course_id), {:class => "InputBox w708"} %>
@@ -43,3 +43,8 @@
+ \ No newline at end of file From da9c374ed9b2d530ac080c91d2ac395556912b5d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 1 Sep 2015 16:21:00 +0800 Subject: [PATCH 02/16] 111 --- app/views/comments/create.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb index d55b714ad..dd3c3dfb2 100644 --- a/app/views/comments/create.js.erb +++ b/app/views/comments/create.js.erb @@ -1,3 +1,3 @@ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); -init_KindEditor_data(<%= @user_activity_id%>); +init_KindEditor_data('<%= @user_activity_id%>'); From 56644ca17342cddd8cccd266dab752499fca1e93 Mon Sep 17 00:00:00 2001 From: suntao <719450423@qq.com> Date: Tue, 1 Sep 2015 16:25:05 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_activities.html.erb | 2 +- public/stylesheets/new_user.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 6e03bb43d..2dcdd04cf 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -61,4 +61,4 @@ <% end %> <% end %> -<%= link_to "加载更多",user_activities_path(@user.id),:id => "show_more_activities",:remote => "true"%> \ No newline at end of file + <%= link_to "点击展开更多",user_activities_path(@user.id),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 4fbcb4139..04195e7c3 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -528,6 +528,7 @@ a.menuGrey {color:#808080;} a.menuGrey:hover {color:#fe7d68;} .navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;} #navSearchAlert {display:none;} +.loadMore {font-size:14px;width:748px; text-align:center; display:block; border:1px solid #dddddd; background-color:#ffffff; float:right;padding:5px 0; letter-spacing: 1px;} /*个人主页右部分*/ .homepagePostType {width:180px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-170px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;} From 313ee0f9d8c9e92e877bc9121cc0837f71d693cb Mon Sep 17 00:00:00 2001 From: suntao <719450423@qq.com> Date: Tue, 1 Sep 2015 16:30:10 +0800 Subject: [PATCH 04/16] =?UTF-8?q?footer=E5=AF=B9=E9=BD=90=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/new_user.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 8639d7834..4c2c3584c 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -675,7 +675,7 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} -.footerAbout{ width:455px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px; } +.footerAbout{ width:365px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px; } .languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} .departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;} .copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} From e4559dce78db678367e3e6b7a54f75f1bca5a08d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 1 Sep 2015 16:30:39 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=EF=BC=8C=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8F=96=E6=B6=88=E8=87=AA=E5=8A=A8=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8A=A0=E8=BD=BD=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_homework_form.html.erb | 1 + app/views/users/_user_homework_list.html.erb | 3 ++- app/views/users/user_homeworks.html.erb | 13 ------------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index 9b4bfb903..7a9e55205 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -72,6 +72,7 @@ +
diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index faa09ef70..e1bbf6e1c 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -53,4 +53,5 @@ <% end%> - \ No newline at end of file + +<%= link_to "加载更多",user_homeworks_user_path(User.current.id),:id => "user_show_more_homework",:remote => "true",:class => "loadMore mt10 f_grey"%> \ No newline at end of file diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index d401ea314..bc314565a 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -1,17 +1,4 @@ \ No newline at end of file diff --git a/app/views/users/add_exist_file_to_course.js.erb b/app/views/users/add_exist_file_to_course.js.erb index 08737f5ca..c61790c40 100644 --- a/app/views/users/add_exist_file_to_course.js.erb +++ b/app/views/users/add_exist_file_to_course.js.erb @@ -1,4 +1,9 @@ <% if @flag == true%> +$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>'); +$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); +$("#res_count").html(0); +$("#checkboxAll").attr('checked',false); +$("#res_all_count").html(<%= @atta_count%>); closePopUp(); <% else%> <% end %> \ No newline at end of file diff --git a/app/views/users/add_exist_file_to_project.js.erb b/app/views/users/add_exist_file_to_project.js.erb index 08737f5ca..c61790c40 100644 --- a/app/views/users/add_exist_file_to_project.js.erb +++ b/app/views/users/add_exist_file_to_project.js.erb @@ -1,4 +1,9 @@ <% if @flag == true%> +$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>'); +$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); +$("#res_count").html(0); +$("#checkboxAll").attr('checked',false); +$("#res_all_count").html(<%= @atta_count%>); closePopUp(); <% else%> <% end %> \ No newline at end of file diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb index 556069a1f..e331b49e7 100644 --- a/app/views/users/user_newfeedback.html.erb +++ b/app/views/users/user_newfeedback.html.erb @@ -1,11 +1,6 @@ - - - - - - - +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor","user" %> -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %> - - - -
diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index 2ecda7758..c0049db88 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -4,9 +4,9 @@ <%= stylesheet_link_tag 'leftside' %> <%= javascript_include_tag 'attachments'%> - - - + + + diff --git a/config/routes.rb b/config/routes.rb index 20ef2f406..f508a74fc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -171,7 +171,7 @@ RedmineApp::Application.routes.draw do resources :contests, only: [:index] do resources :contestnotifications do # get 'preview', on: :collection - resources :notificationcomments + resources :notificationcomments end collection do @@ -232,7 +232,7 @@ RedmineApp::Application.routes.draw do end end end - + resources :shares @@ -369,7 +369,7 @@ RedmineApp::Application.routes.draw do get 'user_resource_type' get 'user_ref_resource_search' post 'import_resources_to_homework' - # end + # end end end match 'users/:id/user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "feedback" @@ -483,7 +483,7 @@ RedmineApp::Application.routes.draw do collection do match "getattachtype" , :via => [:get, :post] match "search_project",:via => [:post,:get] - #match 'getattachtype/:attachtype', :to => 'files#getattachtype', :via => [:get, :post] + #match 'getattachtype/:attachtype', :to => 'files#getattachtype', :via => [:get, :post] end end @@ -513,7 +513,7 @@ RedmineApp::Application.routes.draw do resources :repositories, :except => [:index, :show] do member do get 'newrepo', :via => [:get, :post] - # get 'create', :via=>[:get, :post] + # get 'create', :via=>[:get, :post] end end match 'wiki/index', :via => :get @@ -544,6 +544,9 @@ RedmineApp::Application.routes.draw do match 'bulk_edit', :via => [:get, :post] post 'bulk_update' end + member do + post 'add_journal' + end resources :time_entries, :controller => 'timelog' do collection do get 'report' @@ -600,8 +603,8 @@ RedmineApp::Application.routes.draw do :controller => 'repositories', :format => false, :constraints => { - :action => /(browse|show|entry|raw|annotate|diff)/, - :rev => /[a-z0-9\.\-_]+/ + :action => /(browse|show|entry|raw|annotate|diff)/, + :rev => /[a-z0-9\.\-_]+/ } get 'projects/:id/repository/statistics', :to => 'repositories#stats' @@ -618,8 +621,8 @@ RedmineApp::Application.routes.draw do :controller => 'repositories', :format => false, :constraints => { - :action => /(browse|show|entry|raw|annotate|diff)/, - :rev => /[a-z0-9\.\-_]+/ + :action => /(browse|show|entry|raw|annotate|diff)/, + :rev => /[a-z0-9\.\-_]+/ } get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))', :controller => 'repositories', @@ -722,7 +725,7 @@ RedmineApp::Application.routes.draw do get 'test_connection', :as => 'try_connection' end collection do - get 'autocomplete_for_new_user' + get 'autocomplete_for_new_user' end end @@ -784,7 +787,7 @@ RedmineApp::Application.routes.draw do collection do match 'chang_read_flag', :via => :get end - end + end end # end of resources :courses match 'courses/:id/feedback', :to => 'courses#feedback', :via => :get, :as => 'course_feedback' diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png index 4478af0708c8fb71961a090f11331279d253e4c2..d39624a2e24f10323817e45686e5090365e7f4d7 100644 GIT binary patch delta 7224 zcmZ8mc|26__n$FYvR8J4l%*1~#8?_dk_sW&sSsJmzUG<_@v%fqvQrdUGK8@+5gLpk zMq%uO>^n0Ie$)5+{p)xCxUc)V_dMr3&pGG0=Y8G}*=X=#MGGqsp?~|jTg1bMV~{0RERRL%lZc;eR%x$(TCsWz2A{yBSN+uWQOc@{lZ0)uzVH0c z1*+sEt&fT)XFvJ?JiKZ0i`|<=qCJ^iPZ5ek&>tLODbtTW78Vw2o0_8JD>$B9wg;{5 z-winBS~aq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fVPAu;^g95)&igT|B0-r-h!hUlN?!1 zu~a5&0q?z7&w_T8X8l(qAAZTGqa0aLp0Hub=2qYVj_dxCpX;$9dOTN&NQVocC&L@i9#?~?pw-8wIMX*$6ql8{fmD_O1 zwb*Pwkg=D>?3=wuG&!1|3oh;fWWu*qZex<%AsM9>^MGMwSXeJ8x9hXTx4U0EQJT9- zJoytgE4s*XBYp#10mD^KIUCuaUy>TLc&w->K8%|Sp9kV&Fi#=0wMIecAz3yyfHi`v zh{cOX@_1z0I(Ouw2gcB{f^$=a2B2m0eV;U_&c)oqo}HJR_;rt=uo96LG#e*@Oo17@}Go8EF~Dw0S@e@QV}q$b?-C?FmVpVr}xluoySBgkD0q!>5U^Jge^=RB1Vi0 rG5i%-A$$lo&wqIEiQX?gIs*deO>;.ke-toolbar-icon",toolbar).append('表情'); - params.toolbar_container.append(toolbar); - } - }).loadPlugin('paste'); - return editor; - } - - function nh_check_field(params){ - var result=true; - if(params.content!=undefined){ - if(params.content.isEmpty()){ - result=false; - } - if(params.content.html()!=params.textarea.html() || params.issubmit==true){ - params.textarea.html(params.content.html()); - params.content.sync(); - if(params.content.isEmpty()){ - params.contentmsg.html('内容不能为空'); - params.contentmsg.css({color:'#ff0000'}); - }else{ - params.contentmsg.html('填写正确'); - params.contentmsg.css({color:'#008000'}); - } - params.contentmsg.show(); - } - } - return result; - } - function init_form(params){ - params.form.submit(function(){ - var flag = false; - if(params.form.attr('data-remote') != undefined ){ - flag = true - } - var is_checked = nh_check_field({ - issubmit:true, - content:params.editor, - contentmsg:params.contentmsg, - textarea:params.textarea - }); - if(is_checked){ - if(flag){ - return true; - }else{ - $(this)[0].submit(); - return false; - } - } - return false; - }); - } - function nh_reset_form(params){ - params.form[0].reset(); - params.textarea.empty(); - if(params.editor != undefined){ - params.editor.html(params.textarea.html()); - } - params.contentmsg.hide(); - } - KindEditor.ready(function(K){ $("a[nhname='reply_btn']").live('click',function(){ var params = {}; @@ -167,110 +98,4 @@ $(function(){ }); }); }); -function init_list_more_div(params){ - var p=params; - p.exbtn.click(function(){ - var isclose = p.container.data('isclose'); - var hasmore = p.container.data('hasmore'); - if(isclose == '1'){ - $("div[nhname='rec']",p.container).show(); - p.container.data('isclose','0'); - change_status_4_list_more_div(params); - return; - } - if(hasmore == '0'){ - change_status_4_list_more_div(params,'get'); - return; - } - var url = p.container.data('url'); - if($("div[nhname='rec']",p.container).length > 0){ - var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id'); - url += "?lastid="+lastid; - var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time'); - if(lasttime != undefined){ - url += "&lasttime="+lasttime; - } - } - $.ajax( {url:url,dataType:'text',success:function(data){ - var html = $("
"+data+"
"); - var lens = $("div[nhname='rec']",html).length; - if(lens < p.size){ - p.container.data('hasmore','0'); - } - if(lens>0){ - var currpage = parseInt(p.container.data('currpage'))+1; - p.container.data('currpage',currpage); - p.container.append(html.html()) - } - change_status_4_list_more_div(params,'get'); - p.div.show(); - }} ); - }); - p.clbtn.click(function(){ - var i=0; - $("div[nhname='rec']",p.container).each(function(){ - i++; - if(i> p.size){ - $(this).hide(); - } - }); - p.container.data('isclose','1'); - change_status_4_list_more_div(params); - }); - p.exbtn.click(); -} -function change_status_4_list_more_div(params,opt){ - var p=params; - if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){ - p.exbtn.click(); - return; - } - var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length; - if( show_lens > p.size ){ - p.clbtn.show(); - }else{ - p.clbtn.hide(); - } - if($("div[nhname='rec']",p.container).length == 0){ - p.exbtn.html(p.nodatamsg); - }else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){ - p.exbtn.html('点击展开更多'); - }else{ - p.exbtn.html('没有更多了'); - } -} -function init_list_more_div_params(div){ - var params = {}; - params.div = div; - params.container = $("div[nhname='container']",div); - params.exbtn = $("a[nhname='expand']",div); - params.clbtn = $("a[nhname='close']",div); - params.size = params.container.data('pagesize'); - params.nodatamsg = params.container.data('nodatamsg'); - if( params.size == undefined ){ - params.size = 13; - } - return params; -} -$(function(){ - $("div[nhname='list_more_div']").each(function(){ - var params = init_list_more_div_params($(this)); - init_list_more_div(params) - }); -}); - -$(function(){ - $(".newsType").mouseover(function(){ - $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"}); - }); - $(".newsType").mouseout(function(){ - $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"}); - }); - $(".resourcesSelected").mouseover(function(){ - $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"}); - }); - $(".resourcesSelected").mouseout(function(){ - $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"}); - }); -}); //个人动态 end \ No newline at end of file From de1708b8dfbac7eeaa9342ff222635cb58558958 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 1 Sep 2015 16:41:49 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=A1=86=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=98=BE=E7=A4=BA=E6=96=87=E5=AD=97=E7=B1=BB=E4=BC=BC?= =?UTF-8?q?=E4=BA=8E=E2=80=9C=E8=AF=B7=E9=80=89=E6=8B=A9=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9A=84=E8=AF=BE=E7=A8=8B=E2=80=9D=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=8D=B3=E5=BC=B9=E5=87=BA=E4=BE=9B=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=E5=90=8E=E8=BF=98=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=98=BE=E7=A4=BA=E5=BC=80=E8=AF=BE=E5=AD=A6=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/users_helper.rb | 2 +- app/views/users/_user_homework_form.html.erb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 3f3cacae3..b9f762f69 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -546,7 +546,7 @@ module UsersHelper type = [] user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course| option = [] - option << course.name + option << course.name+"("+course.time.to_s+course.term+")" option << course.id type << option end diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index 7a9e55205..86b8d7af7 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -74,7 +74,11 @@
- + diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index bc314565a..18238bf8f 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -1,8 +1,8 @@