Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_winse
杨树明 6 years ago
commit 6f8c315cd2

@ -37,7 +37,7 @@ class Users::BaseController < ApplicationController
end end
def per_page_value def per_page_value
params[:per_page].to_i > 0 && params[:per_page].to_i < 50 ? params[:per_page].to_i : 20 params[:per_page].to_i > 0 && params[:per_page].to_i <= 100 ? params[:per_page].to_i : 20
end end
alias_method :limit_value, :per_page_value alias_method :limit_value, :per_page_value

@ -1,5 +1,6 @@
class Users::VideosController < Users::BaseController class Users::VideosController < Users::BaseController
before_action :private_user_resources!, :check_account, :require_auth_teacher! before_action :private_user_resources!, :check_account
before_action :require_auth_teacher!, except: [:index, :review]
helper_method :current_video helper_method :current_video

@ -21,7 +21,7 @@ if @type == "image"
elsif @type == "html" elsif @type == "html"
json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe
elsif @type == "txt" elsif @type == "txt"
json.contents @contents.html_safe json.contents @contents.to_s
elsif @type =="qrcode" elsif @type =="qrcode"
json.qrcode_str @qrcode_str json.qrcode_str @qrcode_str
elsif @type == "mp3" || @type == "mp4" elsif @type == "mp3" || @type == "mp4"

@ -1,7 +1,6 @@
json.partial! "homework_commons/homework_public_navigation", locals: {homework: @homework, course: @course, user: @current_user} json.partial! "homework_commons/homework_public_navigation", locals: {homework: @homework, course: @course, user: @current_user}
json.work_id @work.id json.work_id @work.id
json.description @work.description json.description @work.description
json.
json.attachments @work.attachments do |atta| json.attachments @work.attachments do |atta|
json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: @work.delete_atta(atta)} json.partial! "attachments/attachment_simple", locals: {attachment: atta, delete: @work.delete_atta(atta)}

@ -10,6 +10,7 @@ json.tidding_count 0
json.user_phone_binded @user.phone.present? json.user_phone_binded @user.phone.present?
json.phone @user.phone json.phone @user.phone
json.profile_completed @user.profile_completed? json.profile_completed @user.profile_completed?
json.professional_certification @user.professional_certification
if @course if @course
json.course_identity @course_identity json.course_identity @course_identity
json.course_name @course.name json.course_name @course.name

@ -45,8 +45,8 @@ namespace :excellent_course_exercise do
end end
if exercise_user && exercise_user.commit_status == 0 if exercise_user && exercise_user.commit_status == 0
exercise_question_ids = exercise_question_ids.sample(rand_num) question_ids = exercise_question_ids.sample(rand_num)
questions = exercise.exercise_questions.where(id: exercise_question_ids) questions = exercise.exercise_questions.where(id: question_ids)
create_exercise_answer questions, member.user_id create_exercise_answer questions, member.user_id
total_score = calculate_student_score(exercise, member.user) total_score = calculate_student_score(exercise, member.user)

@ -69,7 +69,7 @@ class CommonWorkPost extends Component{
status: 'done' status: 'done'
} }
}) })
const _memebers = response.data.members.slice(0); const _memebers = response.data.members ? response.data.members.slice(0) : [];
this._edit_init_memebers = _memebers this._edit_init_memebers = _memebers
delete response.data.members; delete response.data.members;
this.setState({ this.setState({

@ -727,7 +727,7 @@ submittojoinclass=(value)=>{
src={require('./roundedRectangle.png')} src={require('./roundedRectangle.png')}
/> />
</li> </li>
<li className={`${activeMoopCases === true ? 'pr active' : 'pr'}`}><a href={this.props.Headertop===undefined?"":this.props.Headertop.moop_cases_url}>教学案例</a></li> <li className={`${activeMoopCases === true ? 'pr active' : 'pr'}`}><a href={`/moop_cases`}>教学案例</a></li>
<li className={`${activePackages === true ? 'pr active' : 'pr'}`}> <li className={`${activePackages === true ? 'pr active' : 'pr'}`}>
<a href={'/crowdsourcing'}>众包创新</a> <a href={'/crowdsourcing'}>众包创新</a>
</li> </li>

Loading…
Cancel
Save