Merge branch 'dev_aliyun' into dev_tj

merge aliyun
chromesetting
tangjiang 5 years ago
commit eacdfc81fa

@ -52,7 +52,7 @@ class CommentsController < ApplicationController
def hidden
if current_user.admin_or_business?
@discuss = @hack.discusses.where(id: params[:id]).first
@discuss.update_attribute(:hidden, params[:hidden] == "1")
@discuss.update_attribute(:hidden, params[:hidden].to_i == 1)
sucess_status
else
Educoder::TipException(403, "..")

@ -5,7 +5,9 @@ json.data_sets do
json.author set.author.real_name
json.created_on set.created_on
json.filesize number_to_human_size(set.filesize)
json.file_path "#{@absolute_folder}/#{set.relative_path_filename}"
# 这里需要去除shixunfiles目录后的标识因为Jupyter代码里面会写死这样的路径当实训fork后这个版本库的路径无法修改因此给用户展示的
# 还是/data/shixunfiles/+文件名这种形式
json.file_path "#{@absolute_folder}/#{set.relative_path_filename}".gsub("/#{@shixun.identifier}", "")
end
end
json.data_sets_count @data_count
Loading…
Cancel
Save