diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index ba639a7bf..d5522b898 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -22,6 +22,7 @@ class GamesController < ApplicationController myshixun_user_login = User.where(:id => @myshixun.user_id).first.try(:login) myshixun_rep_identifier = Repository.where(:myshixun_id => @myshixun.id, :type => "Repository::Gitlab").first.try(:identifier) gitlab_address = Redmine::Configuration['gitlab_address'] + myshixun_domain = Redmine::Configuration['myshixun_domain'] gitlab_myshixun_url = git_myshixun_url(@myshixun, @myshixun.try(:user_id)) shixun = @myshixun.shixun gitlab_shixun_url = git_shixun_url(shixun, (shixun.try(:fork_from).blank? ? "educoder" : "eduforge")) @@ -33,7 +34,7 @@ class GamesController < ApplicationController script = "cd #{path} git clone #{gitlab_address.to_s+'/'+myshixun_user_login+'/'+ myshixun_rep_identifier}.git cd #{myshixun_rep_identifier}/ - git remote set-url origin https://#{shixun.fork_from.blank? ? "educoder" : "eduforge"}:xinhu1ji2qu3@testbdgit.trustie.net/#{myshixun_user_login}/#{myshixun_rep_identifier}.git + git remote set-url origin https://#{shixun.fork_from.blank? ? "educoder" : "eduforge"}:xinhu1ji2qu3@#{myshixun_domain}/#{myshixun_user_login}/#{myshixun_rep_identifier}.git git remote add remote_origin #{gitlab_shixun_url} #git pull git pull remote_origin master diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index aa2857ae1..7e54df3f1 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1532,7 +1532,7 @@ end @sub_type = 5 @type = trial_authorization_status params[:type] # sql = select * from apply_actions where dealer_id is null - @authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type,:dealer_id =>'').order("created_at desc") + @authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type).order("created_at desc") search = params[:search] unless search.blank? @authorizations = @authorizations.where(:container_id => Shixun.where(:id => @authorizations.map(&:container_id)).where("name like '%#{search}%'").map(&:id)).order("created_at desc") diff --git a/app/views/exercise/student_exercise_list.html.erb b/app/views/exercise/student_exercise_list.html.erb index cc9304f7a..103fafdb3 100644 --- a/app/views/exercise/student_exercise_list.html.erb +++ b/app/views/exercise/student_exercise_list.html.erb @@ -17,7 +17,8 @@
<% unless @exercise.is_public %> - <% end %> + + <% end %> <%= @exercise.exercise_name %>
<%= link_to "返回", exercise_index_path(:course_id => @course.id), :class => "fr font-12 mr15 mt3 color-grey" %> @@ -42,8 +43,9 @@ <%= link_to "导出成绩", student_exercise_list_exercise_path(@exercise, :course_id => @course.id, :format => 'xls'), :id => "export_exercise_work", :class => "fr white-btn orange-btn ml10 mt8" %> diff --git a/app/views/games/_games_list.html.erb b/app/views/games/_games_list.html.erb index 00693b5a3..7d1602c83 100644 --- a/app/views/games/_games_list.html.erb +++ b/app/views/games/_games_list.html.erb @@ -52,7 +52,7 @@ <% gold_score = @myshixun.shixun.status <= 1 ? 0 : (game.answer_open? ? -challenge.score.to_i : game.final_score.to_i) %> 经验值+<%= final_score %> 金币 ml5"><%= gold_score < 0 ? gold_score : "+"+gold_score.to_s %> - 技能标签 ml5"><%= (game.answer_open? || @myshixun.shixun.status <= 1) ? "无" : "+"+challenge.challenge_tags.count.to_s %> + 技能标签 <% end %>