diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 22db3d5b4..eeffe8b7b 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -314,7 +314,7 @@ class AccountController < ApplicationController #根据home_url生产正则表达式 eval("code = " + "/^" + home_url.gsub(/\//,"\\\/") + "\\\/*(welcome)?\\\/*(\\\/index\\\/*.*)?\$/") if (code=~params[:back_url] || params[:back_url].to_s.include?('lost_password')) && last_login_on != '' - redirect_to user_activities_path(user) + redirect_to user_activities_path(user,host: Setting.user_domain) else if last_login_on == '' redirect_to my_account_url diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 801d98b0b..babd8cb12 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -797,4 +797,17 @@ module CoursesHelper end result end + + def zh_course_role role + if role == "TeachingAsistant" + result = l(:label_TA) + elsif role == "Teacher" + result = l(:label_teacher) + elsif role == "Student" + result = l(:label_student) + elsif role == "Manager" + result = l(:field_admin) + end + result + end end diff --git a/app/views/courses/_course_members.html.erb b/app/views/courses/_course_members.html.erb index 78dc6c319..9f15405dc 100644 --- a/app/views/courses/_course_members.html.erb +++ b/app/views/courses/_course_members.html.erb @@ -37,7 +37,7 @@ <% @roles.each do |role| %>