topic_bank
caicai8 5 years ago
parent 2acba909aa
commit e799208838

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 661 KiB

@ -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) {

@ -555,7 +555,7 @@ class CoursesIndex extends Component{
}></Route> */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id"
<Route path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id"
render={
(props) => (<GraduationTaskssettinglist {...this.props} {...props} {...this.state} {...common}/>)
}

@ -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

@ -52,7 +52,7 @@ class Multiple extends Component{
return(
<p className="clearfix mb15 df">
<Checkbox className="lineh-15 df mr8 setRadioStyle" value={item.choice_id}>
<span className="fl mr3 lineh-20">{prefix}</span>
<span className="fl mr3 lineh-25">{prefix}</span>
<MarkdownToHtml content={item.choice_text} selector={'multiple_' + (this.props.index + 1) + (key + 1)}
className="flex1" style={{display:"inline-block"}}
></MarkdownToHtml>

@ -46,8 +46,8 @@ class single extends Component{
let prefix = isJudge ? undefined : `${tagArray[key]}.`
return(
<p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15" : "fl mr40"}>
<Radio className="df lineh-20 setRadioStyle" value={item.choice_id}>
<span className="fl mr3">{prefix}</span>
<Radio className="df lineh-25 setRadioStyle" value={item.choice_id}>
<span className="fl mr3 lineh-25">{prefix}</span>
<MarkdownToHtml content={item.choice_text} selector={'single_' + (this.props.index + 1) + (key + 1)}
className="flex1" style={{display:"inline-block", 'margin-top': '-1px'}}
></MarkdownToHtml>

@ -215,12 +215,12 @@ class GraduateTaskItem extends Component{
<h6>
{
this.props.isAdmin?<Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list"}
this.props.isAdmin?<Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
{
this.props.isStudent? <Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list"}
this.props.isStudent? <Link to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list"}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
@ -280,7 +280,7 @@ class GraduateTaskItem extends Component{
{this.props.isAdmin?
<div className="mt13">
<WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/setting"} className="colorblue font-16 mrf4 fr">
<WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/setting"} className="colorblue font-16 mrf4 fr">
<a className="btn colorblue">设置</a>
</WordsBtn>
<WordsBtn style="blue" to={"/courses/"+coursesId+"/graduation_tasks/"+taskid+"/edit"} className="colorblue font-16 mr20 fr">

@ -350,9 +350,9 @@ class GraduationTaskDetail extends Component{
<div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white pl30 pr30 graduationTaskMenu">
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link className={tab && tab == "setting" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"}>任务列表</Link>
<Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/questions"}>毕设描述</Link>
<Link className={tab && tab == "setting" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/}
@ -420,19 +420,19 @@ class GraduationTaskDetail extends Component{
</div>
<Switch {...this.props}>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/list"
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list"
render={
(props) => (<GraduationTaskslist {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`list`}/>)
}
></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/setting"
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/setting"
render={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} tab={`setting`}/>)
}
></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/questions"
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/questions"
render={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} tab={`questions`}/>)
}></Route>

@ -570,7 +570,7 @@ class GraduationTasksSubmitedit extends Component{
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">毕设任务</a></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+work_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+work_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}

@ -595,7 +595,7 @@ render(){
{/*<span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
<WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">毕设任务</a></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"} className="color-grey-6">任务详情</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
{/*<WordsBtn style="grey" className="fl">*/}
{/*<Link to={"/courses/"+courseId+"/graduation/graduation_tasks/"+category_id} className="color-grey-6">{workslist&&workslist.task_name}</Link>*/}

@ -176,7 +176,7 @@ class GraduationTasksappraise extends Component{
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id} className="color-grey-9 fl">{datalist&&datalist.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/"+task_id+"/list"} className="color-grey-9 fl">任务详情</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduation_id+"/detail/"+task_id+"/list"} className="color-grey-9 fl">任务详情</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="color-grey-6 fl">{datalist&&datalist.author_name}</span>
</p>

@ -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{
<div className={"educontent mb20"}>
<p className="clearfix mt10">
<WordsBtn style="grey" className="fl"> <a onClick={this.goback} className="color-grey-6">{this.props.current_user&&this.props.current_user.course_name}</a></WordsBtn>
<WordsBtn style="grey" className="fl">
<Link to={`/courses/${graduationtask_id}`} className="color-grey-6">{this.props.current_user&&this.props.current_user.course_name}</Link>
</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+graduationtask_id} className="color-grey-6">毕设任务</Link></WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
{name===""?"":
<WordsBtn style="grey" className="fl">
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">{name}</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+graduationtask_id+"/detail/"+category_id+"/list"} className="color-grey-6">{name}</Link>
<span className="color-grey-9 ml3 mr3">&gt;</span>
</WordsBtn>
}

@ -3792,9 +3792,7 @@ class PollNew extends Component {
this.props.match.params.news === "new" ?
this.state.Newedit === false ?
<div>
<div className=" mb10"></div>
<div style={{"padding": "10px 30px 20px 30px"}}>
<div className="padding20-30">
<ActionBtn style="green" className="mr20" onClick={() => this.addmysingles()}><i
className="iconfont icon-tianjiafangda font-15 mr10"></i></ActionBtn>
<ActionBtn style="green" className="mr20" onClick={() => this.addmydoubles()}><i
@ -3806,8 +3804,7 @@ class PollNew extends Component {
: ""
:
<div>
<div className=" mb10"></div>
<div style={{"padding": "10px 30px 20px 30px"}}>
<div className="padding20-30">
<ActionBtn style="green" className="mr20" onClick={() => this.addmysingles()}><i
className="iconfont icon-tianjiafangda font-15 mr10"></i></ActionBtn>
<ActionBtn style="green" className="mr20" onClick={() => this.addmydoubles()}><i

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { getImageUrl , setImagesUrl } from 'educoder';
import {getImageUrl , setImagesUrl } from 'educoder';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Tooltip } from 'antd';
import axios from 'axios';

@ -7,9 +7,6 @@ import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
import './ShixunPaths.css';
import path from '../../images/path/path.png';
class ShixunPathSearch extends Component{
constructor(props) {
super(props)
@ -123,9 +120,7 @@ class ShixunPathSearch extends Component{
{...this.state}
/>}
<div className="pr">
<div className="pathImg">
<img src={path} width="100%"/>
</div>
<div className="pathImg"></div>
<div className="edu-back-white padding20 pathIndexNav">
<ul className="educontent clearfix">
<li className={select > 0 ? "" : "active"}><a onClick={()=>this.changeSelect(null)}>全部</a></li>

@ -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{

@ -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(){

Loading…
Cancel
Save