From b5c560c1d12b1b7aeb6728aaaa9a474dc909cda2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 16 Aug 2019 17:23:41 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=B8=87=E8=83=BD?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index aa9ddebf0..2524c53d8 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -33,7 +33,7 @@ class AccountsController < ApplicationController uid_logger("start register: verifi_code is #{verifi_code}, code is #{code}, time is #{Time.now.to_i - verifi_code.try(:created_at).to_i}") # check_code = (verifi_code.try(:code) == code.strip && (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60) # todo 上线前请删除万能验证码"513231" - if code != "513231" + unless code == "513231" && request.host == "47.96.87.25" return normal_status(-2, "验证码不正确") if verifi_code.try(:code) != code.strip return normal_status(-2, "验证码已失效") if !verifi_code&.effective? end From a082283212e5b240a39fc19f68b8f2dfc9eb4223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 16 Aug 2019 17:44:14 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/paths/PathDetail/DetailCards.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index e34666294..780ed4071 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -226,10 +226,11 @@ class DetailCards extends Component{ startshixunCombattype:true, }) } else { - window.location.href = "/tasks/" + response.data.game_identifier; + // window.location.href = "/tasks/" + response.data.game_identifier; // window.location.href = path // let path="/tasks/"+response.data.game_identifier; // this.props.history.push(path); + window.open("/tasks/" + response.data.game_identifier); } }).catch((error) => { From 0ed5b9fd68b4e07e756f1481928cf4f158cceb65 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Fri, 16 Aug 2019 17:44:14 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E7=AD=94=E9=A2=98?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=9D=83=E9=99=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercises_controller.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 781ede214..c9162448b 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -1566,15 +1566,22 @@ class ExercisesController < ApplicationController def check_user_id_start_answer #判断用户在开始答题时,是否有用户id传入,如果为老师,则id必需,否则为当前用户的id user_login = params[:login] - # exercise_current_user_id = params[:user_id] if user_login.blank? && @user_course_identity < Course::STUDENT #id不存在,且当前为老师/管理员等 normal_status(-1,"请输入学生登陆名!") else - @ex_answerer = User.find_by(login: user_login) #回答者 + if @user_course_identity < Course::STUDENT || @exercise.score_open + @ex_answerer = user_login.blank? ? current_user : User.find_by(login: user_login) + else + @ex_answerer = current_user + end + if @ex_answerer.blank? normal_status(404,"答题用户不存在") + elsif @user_course_identity > Course::STUDENT && !@exercise.is_public + normal_status(403,"非公开试卷") else - @exercise_current_user_id = @ex_answerer.id || current_user.id + # @exercise_current_user_id = @ex_answerer.id || current_user.id + @exercise_current_user_id = @ex_answerer.id end end end From 871af9e74e1d4144a549bd8f66b95998a13c331c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 16 Aug 2019 17:49:56 +0800 Subject: [PATCH 4/9] hover --- .../user/usersInfo/video/InfosVideo.css | 2 +- .../user/usersInfo/video/VideoUploadList.js | 30 ++++++++++++++++-- .../usersInfo/video/images/upload_hover.png | Bin 0 -> 486 bytes 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 public/react/src/modules/user/usersInfo/video/images/upload_hover.png diff --git a/public/react/src/modules/user/usersInfo/video/InfosVideo.css b/public/react/src/modules/user/usersInfo/video/InfosVideo.css index 169c3802c..4722fde63 100644 --- a/public/react/src/modules/user/usersInfo/video/InfosVideo.css +++ b/public/react/src/modules/user/usersInfo/video/InfosVideo.css @@ -26,7 +26,7 @@ height: 158px; cursor: pointer; } -.nItem.videoItem:hover .playWrap {.videoItem img.play +.nItem.videoItem:hover .playWrap { display: inline-block; } .nItem .mask { diff --git a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js index 06a4029da..56deb212d 100644 --- a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js +++ b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js @@ -10,6 +10,7 @@ import { getUploader } from './AliyunUploaderManager' import { reducer, initialState } from './VideoReducer' import { deleteVideoInCloud } from './VideoUtil' import uploadIcon from './images/upload.png' +import uploadHoverIcon from './images/upload_hover.png' let uploader const files = [] @@ -291,6 +292,26 @@ function VideoUploadList (props) { border-bottom: none; } + .noUploads img { + width: 64px; + height: 48px; + + } + .noUploads .uploadHoverIcon { + display: none; + } + .noUploads .imgWrap:hover .uploadHoverIcon { + display: inline; + } + .noUploads .imgWrap:hover .uploadIcon { + display: none; + } + .noUploads .imgWrap { + width: 72px; + height: 54px; + margin: 0 auto; + cursor: pointer; + } `} {/* noUploads */} - {noUploads &&
- document.getElementById('fileUpload').click()}> + {noUploads &&
+
document.getElementById('fileUpload').click()}> + + +
+ +
@P)C3-Sac2lxvCbGI`9=xU>lOb6c>S7ktee5DXCMO^I5nUi zJdCw(sx$CSl|P4$LM>3gZ1OLb3}oO)K!M%=53{rq11fwV36DhKp)5QW#s|~zXdE8S cgMSZv166bhua{^I3;+NC07*qoM6N<$f<}JB`v3p{ literal 0 HcmV?d00001 From 2dba28b3e7b7d550d81f808e7dfb0a00187f4993 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 16 Aug 2019 17:53:07 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/excellent_course_exercise.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/excellent_course_exercise.rake b/lib/tasks/excellent_course_exercise.rake index a607c24a0..07c33d9e9 100644 --- a/lib/tasks/excellent_course_exercise.rake +++ b/lib/tasks/excellent_course_exercise.rake @@ -38,6 +38,8 @@ namespace :excellent_course_exercise do rand_num = index < pass_count - 1 ? 20 : rand(1..16) elsif exercise_question_ids.length == 17 rand_num = index < pass_count - 1 ? rand(13..17) : rand(1..11) + elsif exercise_question_ids.length == 39 + rand_num = index < pass_count - 1 ? rand(30..39) : rand(1..18) else rand_num = exercise_question_ids.length end From fa38cebc1964456de668b439c61c042ab3700cb1 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 16 Aug 2019 18:02:31 +0800 Subject: [PATCH 6/9] delete --- .../user/usersInfo/video/VideoUploadList.js | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js index 56deb212d..5e1cbeb51 100644 --- a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js +++ b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js @@ -168,21 +168,29 @@ function VideoUploadList (props) { const _input = document.getElementById('fileUpload') _input.value = '' } - // uploader.deleteFile(index); - function cancelUpload(index, isSuccess) { - // TODO 确定取消? + function doDelete(index, isSuccess) { uploader.deleteFile(index) + // uploader.cancelFile(index) if (isSuccess) { deleteVideoInCloud(username, state.videoes[index].videoId) } - // else { - // uploader.cancelFile(index) - // } - clearInput() - + + clearInput() dispatch({type: 'removeVideo', index}) // setVideoes([...videoes.splice(index, 1)]) } + // uploader.deleteFile(index); + function cancelUpload(index, isSuccess) { + props.confirm({ + content:
+
您确认要{isSuccess ? '删除' : '取消上传'}该视频吗?
+
, + onOk: () => { + doDelete(index, isSuccess) + } + }) + + } function onPublish() { if (state.videoes.length == 0) { showNotification('请先上传视频') From 88afa881adc36f1376a515fc541478dcb4dc33a5 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 16 Aug 2019 18:03:40 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/settings.json.jbuilder | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/courses/settings.json.jbuilder b/app/views/courses/settings.json.jbuilder index be4470a66..97083d5f9 100644 --- a/app/views/courses/settings.json.jbuilder +++ b/app/views/courses/settings.json.jbuilder @@ -5,6 +5,7 @@ json.course_id @course.id json.school @course.school&.name json.class_period @course.class_period json.credit @course.credit +json.start_date @course.start_date json.end_date @course.end_date json.is_public @course.is_public json.course_module_types @course.course_modules.where(hidden: 0).pluck(:module_type) From fd65a24d5df48c2822fa1cb732ccd36dc5af47b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 16 Aug 2019 18:12:06 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/coursesDetail/CoursesLeftNav.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index b28472f66..20f46f079 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -722,15 +722,19 @@ class Coursesleftnav extends Component{ let {url}=this.state; if (key === this.props.indexs) { this.props.unlocationNavfun(undefined) + this.props.history.replace(urls); } else { this.props.unlocationNavfun(key) + this.props.history.replace(urls); } if(urls!=url){ this.props.history.replace(urls); } - if(this.props.indexs===undefined){ - this.props.history.replace(urls); - } + // if(this.props.indexs===undefined){ + // + // }else{ + // + // } } maincontent=(item,key)=>{ From 9ee0879f6897e19a95e39be5662f67e3806f12f9 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 16 Aug 2019 18:12:46 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/InfosBanner.js | 8 ++++---- public/react/src/modules/user/usersInfo/InfosCourse.js | 2 +- public/react/src/modules/user/usersInfo/InfosPath.js | 2 +- public/react/src/modules/user/usersInfo/InfosProject.js | 2 +- public/react/src/modules/user/usersInfo/InfosShixun.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js index 7f6cb9659..fe86db2de 100644 --- a/public/react/src/modules/user/usersInfo/InfosBanner.js +++ b/public/react/src/modules/user/usersInfo/InfosBanner.js @@ -29,7 +29,7 @@ class InfosBanner extends Component{
-

头像

+

头像

{data && data.name} @@ -38,9 +38,9 @@ class InfosBanner extends Component{ }

-

+

- + @@ -68,7 +68,7 @@ class InfosBanner extends Component{ : - 私信 + 私信 }

diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index 0149573c5..c4c1c77e0 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -126,7 +126,7 @@ class InfosCourse extends Component{

{ - page == 1 && is_current && + page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ? : "" } { diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js index e3912216b..d2ed2900c 100644 --- a/public/react/src/modules/user/usersInfo/InfosPath.js +++ b/public/react/src/modules/user/usersInfo/InfosPath.js @@ -148,7 +148,7 @@ class InfosPath extends Component{
{ - page == 1 && is_current && + page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ? :"" } { diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index f65db5792..082c18a71 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -121,7 +121,7 @@ class InfosProject extends Component{

{ - page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ? + page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ? :"" } { diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index e8b6eb7c8..b86e69983 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -157,7 +157,7 @@ class InfosShixun extends Component{
{ - page == 1 && is_current && this.props.current_user && this.props.current_user.user_identity != "学生" ? + page == 1 && is_current && !category && this.props.current_user && this.props.current_user.user_identity != "学生" ? :"" } {