diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 81093dc12..d43aa5e2d 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -86,7 +86,7 @@ module TidingDecorator def teacher_join_course_content name = Course.find_by(id: container_id)&.name - I18n.t(locale_format extra) % [user.show_real_name, name] + I18n.t(locale_format extra) % [trigger_user&.show_real_name, name] end def apply_add_department_content diff --git a/public/images/educoder/path.png b/public/images/educoder/path.png index 057838222..594358959 100644 Binary files a/public/images/educoder/path.png and b/public/images/educoder/path.png differ diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index 3d3053805..8098e4f38 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -56,7 +56,7 @@ export function getUploadActionUrl(path, goTest) { return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` } export function getUploadActionUrlOfAuth(id) { - return `${getUrl()}/api/users/accounts/${id}/auth_attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` + return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}` } export function test(path) { diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index 1b26dbf91..de437bbe1 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -555,7 +555,7 @@ class CoursesIndex extends Component{ }> */} - () } diff --git a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js index e2a209cb7..043d02470 100644 --- a/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js +++ b/public/react/src/modules/courses/completetaskdetails/Completetaskpage.js @@ -78,7 +78,7 @@ class Completetaskpage extends Component { {to:`/banks/gtask/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'}, ], category:'gtask',//毕设选题 - tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}`, + tos:`/banks/gtask/${workids}/edit/${this.props.match.params.type}?tab=0`, id:workids, is_public:response && response.data && response.data.is_public, type:this.props.match.params.type, diff --git a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js index a9bec86b0..818a141d2 100644 --- a/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js +++ b/public/react/src/modules/courses/comtopicdetails/CompletetopicdePage.js @@ -73,7 +73,7 @@ class CompletetopicdePage extends Component { {to:`/banks/gtopic/${workids}/${this.props.match.params.type}?tab=0`,content:'内容详情'}, ], category:'gtopic',//毕设选题 - tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}`, + tos:`/banks/gtopic/${workids}/edit/${this.props.match.params.type}?tab=0`, id:workids, is_public:response && response.data && response.data.is_public, type:this.props.match.params.type, diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 2a29474d2..0965a19f1 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -548,7 +548,7 @@ class ExerciseReviewAndAnswer extends Component{ } .setRadioStyle .ant-radio,.setRadioStyle .ant-checkbox{ height:16px; - margin-top:2px; + margin-top:4px; } .standardAnswer.editormd-html-preview,.answerStyle.editormd-html-preview{ width:100%!important diff --git a/public/react/src/modules/courses/exercise/question/multiple.js b/public/react/src/modules/courses/exercise/question/multiple.js index 4e74b68ce..2e1023faa 100644 --- a/public/react/src/modules/courses/exercise/question/multiple.js +++ b/public/react/src/modules/courses/exercise/question/multiple.js @@ -52,7 +52,7 @@ class Multiple extends Component{ return(

- {prefix} + {prefix} diff --git a/public/react/src/modules/courses/exercise/question/single.js b/public/react/src/modules/courses/exercise/question/single.js index 5156019d4..5cfd8a902 100644 --- a/public/react/src/modules/courses/exercise/question/single.js +++ b/public/react/src/modules/courses/exercise/question/single.js @@ -46,8 +46,8 @@ class single extends Component{ let prefix = isJudge ? undefined : `${tagArray[key]}.` return(

- - {prefix} + + {prefix} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index c18ef8062..f3b98f927 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -215,12 +215,12 @@ class GraduateTaskItem extends Component{

{ - this.props.isAdmin?{discussMessage.name}:"" } { - this.props.isStudent? {discussMessage.name}:"" } @@ -280,7 +280,7 @@ class GraduateTaskItem extends Component{ {this.props.isAdmin?
- + 设置 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js index 1c969b3c4..2c74547af 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskDetail.js @@ -350,9 +350,9 @@ class GraduationTaskDetail extends Component{
- 任务列表 - 毕设描述 - 设置 + 任务列表 + 毕设描述 + 设置 {/*导出成绩*/} {/*{this.props.isAdmin()?导出成绩:""}*/} @@ -420,19 +420,19 @@ class GraduationTaskDetail extends Component{
- () } > - () } > - () }> diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index d5c6dd9c2..36ab0fbeb 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -570,7 +570,7 @@ class GraduationTasksSubmitedit extends Component{ {/*>*/} 毕设任务 > - 任务详情 + 任务详情 > {/**/} {/*{workslist&&workslist.task_name}*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index e383d4843..4f9093709 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -595,7 +595,7 @@ render(){ {/*>*/} 毕设任务 > - 任务详情 + 任务详情 > {/**/} {/*{workslist&&workslist.task_name}*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js index c03ffc1e0..55dfd9855 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraise.js @@ -176,7 +176,7 @@ class GraduationTasksappraise extends Component{ > {datalist&&datalist.graduation_name} > - 任务详情 + 任务详情 > {datalist&&datalist.author_name}

diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 7f750ad70..962edcde5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -28,6 +28,7 @@ class GraduationTasksedit extends Component{ name:"", description:undefined, shixunsreplace:false, + graduationtask_id:undefined } } @@ -73,7 +74,8 @@ class GraduationTasksedit extends Component{ data:result.data, title_num:namelength, attachments:result.data.attachments, - fileList:fileList, + fileList:fileList, + graduationtask_id:result.data.graduation_id }) @@ -300,7 +302,7 @@ class GraduationTasksedit extends Component{ render(){ const { getFieldDecorator } = this.props.form; let {title_num,pageType,name,description,Loadtype,attachments,fileList, - Modalstype,Modalstopval,ModalCancel,ModalSave,shixunsreplace} =this.state; + Modalstype,Modalstopval,ModalCancel,ModalSave,shixunsreplace ,graduationtask_id} =this.state; let {coursedata}=this.props; let courseId=this.props.match.params.coursesId; @@ -361,13 +363,15 @@ class GraduationTasksedit extends Component{

- {this.props.current_user&&this.props.current_user.course_name} + + {this.props.current_user&&this.props.current_user.course_name} + > - 毕设任务 + 毕设任务 > {name===""?"": - {name} + {name} > } diff --git a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js index c50b3a9a2..f8853703f 100644 --- a/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js +++ b/public/react/src/modules/courses/groupjobbank/GroupjobbankPage.js @@ -83,7 +83,7 @@ class GroupjobbankPage extends Component { {to:`/banks/group/${workids}/${this.props.match.params.type}/answer?tab=1`,content:'参考答案'} ], category:'group',//毕设选题 - tos:`/banks/group/${workids}/edit/${this.props.match.params.type}`, + tos:`/banks/group/${workids}/edit/${this.props.match.params.type}?tab=0`, id:workids, is_public:response && response.data && response.data.is_public, type:this.props.match.params.type, diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 16db651b0..9d34b7036 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -3792,9 +3792,7 @@ class PollNew extends Component { this.props.match.params.news === "new" ? this.state.Newedit === false ?

-
- -
+
this.addmysingles()}>单选题 this.addmydoubles()}> -
-
+
this.addmysingles()}>单选题 this.addmydoubles()}>}
-
- -
+
  • 0 ? "" : "active"}>this.changeSelect(null)}>全部
  • diff --git a/public/react/src/modules/paths/ShixunPaths.css b/public/react/src/modules/paths/ShixunPaths.css index ba7ba198b..dc2b21a05 100644 --- a/public/react/src/modules/paths/ShixunPaths.css +++ b/public/react/src/modules/paths/ShixunPaths.css @@ -18,10 +18,19 @@ line-height: 32px; margin:5px 0px; } -.pathIndexNav ul li.active a{ +.pathIndexNav ul li.active a,.pathIndexNav ul li:hover a{ background: #DDECF9; color: #4CACFF } +.pathImg{ + width: 100%; + height: 300px; + background-image: url(../../images/path/path.png); + background-color: #000a4f; + /* background-size: cover; */ + background-position: center; + background-repeat: no-repeat; +} /* 首页-最新最热 */ .mainPageArray span{ @@ -61,9 +70,9 @@ border-radius: 6px; } .squareCard .squareImg img{ - transition: all 0.6s; - -webkit-transition: all 0.6s; - -o-transition: all 0.6s; + transition: all 1s; + -webkit-transition: all 1s; + -o-transition: all 1s; width: 100%; } .squareCard .squareImg img:hover{ diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index c4965cfbc..8f9c394a5 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -524,8 +524,8 @@ class InfosTopics extends Component{ category==="group"?`/banks/group/${item.id}/${types}?tab=0`: category==="poll"?`/banks/poll/${item.id}/${types}`: category==="exercise"?`/banks/exercise/${item.id}/${types}`: - category==="gtask"?`/banks/gtask/${item.id}/${types}`: - category==="gtopic"?`/banks/gtopic/${item.id}/${types}`:"" + category==="gtask"?`/banks/gtask/${item.id}/${types}?tab=0`: + category==="gtopic"?`/banks/gtopic/${item.id}/${types}?tab=0`:"" } > {item.name} diff --git a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js index f18626f3a..15331a2e7 100644 --- a/public/react/src/modules/user/usersInfo/banks/BanksIndex.js +++ b/public/react/src/modules/user/usersInfo/banks/BanksIndex.js @@ -82,6 +82,7 @@ class BanksIndex extends Component{ this.setState({ publicly:pathname.indexOf("/publicly") > -1 }) + } initPublic = (crumbData) =>{ @@ -90,12 +91,26 @@ class BanksIndex extends Component{ }) } - componentDidUpdate=()=>{ - let { publicly }=this.state - - if(this.props.current_user && this.props.current_user.professional_certification == false && publicly){ - this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`); + componentDidUpdate(prevProps) { + if(prevProps.current_user!=this.props.current_user){ + let { publicly }=this.state; + if( this.props.checkIfLogin()) { + if (this.props.current_user && this.props.current_user.professional_certification == false && publicly){ + this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`); + } + } else { + this.props.showLoginDialog() + } } + // let { publicly }=this.state; + // if(this.props.current_user && this.props.current_user.professional_certification == false && publicly){ + // if( this.props.checkIfLogin()) { + // this.props.history.push(`/topicbank/${this.props.current_user.login}/publicly`); + // } else { + // this.props.showLoginDialog() + // } + // // console.log(`/topicbank/${this.props.current_user.login}/publicly`); + // } } render(){ diff --git a/public/react/src/modules/user/usersInfo/banks/GtaskBanksEdit.js b/public/react/src/modules/user/usersInfo/banks/GtaskBanksEdit.js index 4aa29a4c4..16ecea151 100644 --- a/public/react/src/modules/user/usersInfo/banks/GtaskBanksEdit.js +++ b/public/react/src/modules/user/usersInfo/banks/GtaskBanksEdit.js @@ -59,7 +59,7 @@ class GtaskBanksEdit extends Component { }); } toWorkDetail = () => { - this.props.history.push(`/banks/gtask/${this.props.match.params.workId}/${this.props.match.params.type}`); + this.props.history.push(`/banks/gtask/${this.props.match.params.workId}/${this.props.match.params.type}?tab=0`); this.props.initPublic(undefined); } onCancel = () => { diff --git a/public/react/src/modules/user/usersInfo/banks/GtopicBanksEdit.js b/public/react/src/modules/user/usersInfo/banks/GtopicBanksEdit.js index 2ebf753d7..4a9163304 100644 --- a/public/react/src/modules/user/usersInfo/banks/GtopicBanksEdit.js +++ b/public/react/src/modules/user/usersInfo/banks/GtopicBanksEdit.js @@ -47,7 +47,7 @@ class GtopicBanksEdit extends Component{ axios.put(url,params).then((result)=>{ if(result){ this.props.showNotification('保存成功!'); - this.props.history.push(`/banks/gtopic/${bankId}/${this.props.match.params.type}`); + this.props.history.push(`/banks/gtopic/${bankId}/${this.props.match.params.type}?tab=0`); } }).catch((error)=>{ console.log(error); @@ -56,7 +56,7 @@ class GtopicBanksEdit extends Component{ // 取消 editCancel = () =>{ - this.props.history.push(`/banks/gtopic/${this.props.match.params.bankId}/${this.props.match.params.type}`); + this.props.history.push(`/banks/gtopic/${this.props.match.params.bankId}/${this.props.match.params.type}?tab=0`); this.props.initPublic(undefined); } diff --git a/public/react/src/modules/user/usersInfo/banks/HomeworkBanksEdit.js b/public/react/src/modules/user/usersInfo/banks/HomeworkBanksEdit.js index 1768101c8..fa48361f6 100644 --- a/public/react/src/modules/user/usersInfo/banks/HomeworkBanksEdit.js +++ b/public/react/src/modules/user/usersInfo/banks/HomeworkBanksEdit.js @@ -64,7 +64,7 @@ class HomeworkBanksEdit extends Component { return this.props.isGroup ? 'group' : 'normal' } toWorkDetail = () => { - this.props.history.push(`/banks/${this.getModuleName()}/${this.props.match.params.workId}/${this.props.match.params.type}`) + this.props.history.push(`/banks/${this.getModuleName()}/${this.props.match.params.workId}/${this.props.match.params.type}?tab=0`) this.props.initPublic(undefined); } onCancel = () => {