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

merge aliyun
dev_daiao
tangjiang 5 years ago
commit 402fc45544

@ -1,7 +1,7 @@
$(document).on('turbolinks:load', function(){
if ($('body.admins-shixun-feedback-messages-index-page').length > 0) {
$(".content-img img").addClass("w-100").addClass("preview-image");
$(".content-img img").addClass("w-20").addClass("preview-image");
var baseOptions = {
autoclose: true,

@ -0,0 +1,7 @@
.admins-shixun-feedback-messages-index-page {
.content-img {
img {
height: 60px;
}
}
}

@ -1409,23 +1409,29 @@ class PollsController < ApplicationController
poll_questions.each do |q|
user_poll_votes = u_user.poll_votes.find_current_vote("poll_question_id",q.id)
if user_poll_votes.present?
user_poll_answer_ids = user_poll_votes.pluck(:poll_answer_id).reject(&:blank?)
user_poll_vote_texts = user_poll_votes.pluck(:vote_text).reject(&:blank?)
if user_poll_answer_ids.count > 0
answer_content = q.poll_answers.find_answer_by_custom("id",user_poll_answer_ids)
if user_poll_answer_ids.count >1
u_answer = answer_content.pluck(:answer_text).join(";")
if q.question_type < 3
user_poll_answer_ids = user_poll_votes.pluck(:poll_answer_id).reject(&:blank?)
if user_poll_answer_ids.count > 0
answer_content = q.poll_answers.find_answer_by_custom("id",user_poll_answer_ids)
if user_poll_answer_ids.count >1
u_answer = answer_content.pluck(:answer_text).join(";")
else
u_answer = answer_content.first&.answer_text
end
else
u_answer = answer_content.first&.answer_text
u_answer = "--"
end
elsif user_poll_vote_texts.count > 0
if user_poll_vote_texts.count > 1
u_answer = user_poll_vote_texts.join(";")
else
user_poll_vote_texts = user_poll_votes.pluck(:vote_text).reject(&:blank?)
if user_poll_vote_texts.count > 0
if user_poll_vote_texts.count > 1
u_answer = user_poll_vote_texts.join(";")
else
u_answer = user_poll_vote_texts.first
end
else
u_answer = user_poll_vote_texts.first
u_answer = "--"
end
else
u_answer = "--"
end
else
u_answer = "--"

@ -6,7 +6,7 @@ class Weapps::CoursesController < Weapps::BaseController
before_action :teacher_or_admin_allowed, only: [:change_member_roles, :delete_course_teachers]
def create
return render_error("只有老师身份才能创建课堂") unless current_user.is_teacher?
# return render_error("只有老师身份才能创建课堂") unless current_user.is_teacher?
course = Course.new(tea_id: current_user.id)
Weapps::CreateCourseService.call(course, course_params)
render_ok

@ -22,6 +22,6 @@ json.question do
end
end
if question_votes.find_vote_text.present?
json.vote_text question_votes.pluck(:vote_text).reject(&:blank?) #问题的回答是否有用户手动输入的内容
json.vote_text question_votes.pluck(:vote_text) #问题的回答是否有用户手动输入的内容
end
end

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -511,13 +511,15 @@ class YslDetailCards extends Component{
</li>
}
<li className={showparagraph===false?"fr status_li":"fr status_li"}>
{this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?"": <li className={showparagraph===false?"fr status_li":"fr status_li"}>
{
showparagraphkey === key && showparagraphindex === index ? "" :
<span className="fr color204">实验任务 <span
className={"color000"}>{line.challenges_count}</span></span>
}
</li>
</li>}
</div>)
})
}

Loading…
Cancel
Save