Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
dev_forum
杨树明 6 years ago
commit 279af48aba

@ -714,10 +714,10 @@ pop_box_new(htmlvalue, 480, 182);
}
testSetUnlock() {
const { game } = this.state;
const url = `/v1/games/${game.identifier}/check_test_sets.json`
const { game, challenge } = this.state;
const url = `/tasks/${game.identifier}/check_test_sets.json`
axios.get(url, {
withCredentials: true,
// withCredentials: true,
})
.then((response) => {
// TODO status -2 重复操作,直接解锁
@ -727,12 +727,12 @@ pop_box_new(htmlvalue, 480, 182);
return;
} else {
// 被扣除的金币,是负数
const deltaScore = response.data.score;
const deltaScore = -challenge.score * 5;
// output_sets
let { output_sets } = this.state;
output_sets = Object.assign({}, output_sets);
const test_sets_array = JSON.parse("[" + response.data.test_sets + "]");
output_sets.test_sets_array = test_sets_array;
// const test_sets_array = JSON.parse("[" + response.data.test_sets + "]");
output_sets.test_sets_array = response.data.test_sets;
this.setState({
output_sets: output_sets,
grade: this.state.grade + deltaScore,

@ -323,11 +323,14 @@ class Comments extends Component {
<div className="comment_content clearfix" id={`reply_content_${item.id}`}>
<div className="color-grey-3" id={`reply_content_${item.id}`}>
{ item.hidden && ((this.props.onlySuperAdminCouldHide && !item.isSuperAdmin)
{/* 改成后端返回了的都是要显示的不管hidden的值是true还是false */}
{/* { item.hidden && ((this.props.onlySuperAdminCouldHide && !item.isSuperAdmin)
|| !this.props.onlySuperAdminCouldHide && item.admin === false && (item.manager === false || item.manager == undefined))
? <p className="color-orange font-16">违规评论已被屏蔽</p>
: <div className={"break_word_comments markdown-body"} dangerouslySetInnerHTML={{__html: _content}}></div>
}
: */}
<div className={"break_word_comments markdown-body"} dangerouslySetInnerHTML={{__html: _content}}></div>
{/* } */}
<div className="cl"></div>
</div>
</div>

@ -659,6 +659,8 @@ render(){
<Form.Item
label="内容"
style={{marginBottom: '4px'}}
className="mdInForm"
>
{getFieldDecorator('description', {
rules: [{

@ -16,7 +16,8 @@ class AccessoryModal extends Component{
ModalCancel:"",
ModalSave:"",
loadtype:false,
updatas:false
updatas:false,
shixunsreplace:false
}
}
@ -103,7 +104,8 @@ class AccessoryModal extends Component{
Modalstype:false,
Modalstopval:"",
ModalSave:this.ModalCancelModalCancel,
loadtype:false
loadtype:false,
shixunsreplace:false,
})
this.props.Cancel()
}
@ -115,11 +117,11 @@ class AccessoryModal extends Component{
for(var list of fileList){
newfileList.push(list.response.id)
}
debugger
if (newfileList.length == 0) {
// this.props.showNotification('请先上传附件')
this.setState({
updatas:true
shixunsreplace:true,
})
return;
}
@ -130,7 +132,7 @@ debugger
attachment_ids:newfileList
}).then((result)=>{
console.log(result)
if(result.data.status===0){
if(result !== undefined){
this.props.setupdate()
this.props.showNotification('提交成功')
// this.setState({
@ -139,7 +141,6 @@ debugger
// ModalSave:this.ModalCancelModalCancel,
// loadtype:true
// })
this.ModalCancelModalCancel()
if(this.props.seeworks!=undefined){
this.props.history.push(this.props.seeworks);
@ -155,6 +156,46 @@ debugger
description:e.target.value
})
}
//确认
hidestartshixunsreplace=()=>{
let id=this.props.categoryid;
let {fileList,description} =this.state;
let newfileList=[];
for(var list of fileList){
newfileList.push(list.response.id)
}
let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json"
axios.post(url,{
description:description,
attachment_ids:newfileList
}).then((result)=>{
console.log(result)
if(result.data.status===0){
this.props.setupdate()
this.props.showNotification('提交成功')
// this.setState({
// Modalstype:true,
// Modalstopval:result.data.message,
// ModalSave:this.ModalCancelModalCancel,
// loadtype:true
// })
this.ModalCancelModalCancel()
if(this.props.seeworks!=undefined){
this.props.history.push(this.props.seeworks);
}
}
}).catch((error)=>{
})
}
//取消
hidestartshixunsreplacetwo=()=>{
this.setState({
shixunsreplace:false,
})
}
render(){
let {settextarea,fileList,
@ -163,6 +204,7 @@ debugger
ModalCancel,
ModalSave,
loadtype,
shixunsreplace,
}=this.state;
let {course_groups}=this.props;
const uploadProps = {
@ -186,6 +228,25 @@ debugger
return(
<React.Fragment>
<Modal
keyboard={false}
title="提示"
visible={shixunsreplace}
closable={false}
footer={null}
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 ">还未上传附件</p>
<p className="task-popup-text-center font-16 pb20">是否确认提交作品?</p>
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr "
onClick={() => this.hidestartshixunsreplace()}>确认</a>
<a className="task-btn fr mr50"
onClick={() => this.hidestartshixunsreplacetwo()}>取消</a>
</div>
</Modal>
{/*提示*/}
<Modals
modalsType={Modalstype}

@ -561,7 +561,7 @@ class Exercisesetting extends Component{
<div className="edu-back-white">
<div className="bor-bottom-greyE" style={{padding: "20px 30px 0px 30px"}}>
<p className="mb30 clearfix">
<span className="font-16 fl">发布设置<span className="color-grey-c font-14">(课堂管理员教师助教拥有发布设置权限</span></span>
<span className="font-16 fl">发布设置<span className="color-grey-c font-14"></span></span>
{
!flagPageEdit&&this.props.isAdmin()===true ?
<a className="fr mr6" onClick={this.editSetting}>
@ -660,7 +660,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('time')
(
<Input disabled={!flagPageEdit} className="mr10" style={{width:"100px" }}
<Input disabled={!flagPageEdit} className="mr10" style={{width:"100px",height:"35px" }}
value={time===-1?"":time}
onInput={this.funlatepenalty}/>
)}

@ -253,7 +253,7 @@ class GraduationTasksappraise extends Component{
<div className={"color-grey-6 mb10 "}>
补交附件
</div>
<div className={"ml20"}>
<div className={"ml20"} style={{"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}}>
补交原因{firelistdata&&firelistdata.revise_reason}
</div>

@ -640,6 +640,7 @@ class GraduationTaskssettinglist extends Component{
title: '姓名',
dataIndex: 'name',
key: 'name',
className:'edu-txt-center'
}, {
title: '学号',

@ -52,7 +52,16 @@ class ShixunWorkReport extends Component {
shixuntypes:type[3]
})
}
jumptopic=(anchorName)=>{
; if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) {
anchorElement.scrollIntoView();
}
}
}
render() {
let{data} =this.state;
let category_id=data===undefined?"":data.category.category_id;
@ -109,6 +118,7 @@ class ShixunWorkReport extends Component {
<OfficialAcademicTranscript
data={data}
jumptopic={this.jumptopic}
/>
</div>
@ -175,9 +185,8 @@ class ShixunWorkReport extends Component {
</style>
{
data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{
// console.log(item)
return(
<div key={key} className={"mb20"}>
<div id={"id"+item.position} key={key} className={"mb20"}>
<div className="font-16 color-dark-21 ml20 mr20">
<p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
@ -185,7 +194,7 @@ class ShixunWorkReport extends Component {
</span>
<span className="fl mt3 font-14">
<span className="font-bd mr15">{item.position}</span>
<Link to={/tasks/+item.game_identifier}>
<Link to={/tasks/+item.game_identifier} >
<span className={"font-14"}>{item.subject}</span>
</Link>
</span>

@ -74,6 +74,9 @@ class ShixunWorkModal extends Component{
response.data. course_groups.group_list&&response.data.group_list.map((item,key)=>{
newgroup_list.push(item)
})
response.data. course_groups.ungroup_list&&response.data.ungroup_list.map((items,keys)=>{
newgroup_list.push(items)
})
this.setState({
course_groups:response.data,
group_list:newgroup_list,
@ -123,6 +126,15 @@ class ShixunWorkModal extends Component{
isSave=()=>{
let{group_ids}=this.state;
if(group_ids&&group_ids.length === 0){
this.props.showNotification(`请先选择分班`);
return
}
if(group_ids&&group_ids.length < 2){
this.props.showNotification(`有效作品数少于2个无法查重`);
return
}
let url="/homework_commons/"+this.props.match.params.homeworkid+"/homework_code_repeat.json";
axios.post(url, {
group_ids: group_ids,

@ -16,6 +16,11 @@ class OfficialAcademicTranscript extends Component {
componentDidMount() {
}
myjumptopic=(e)=>{
console.log("获取到值");
console.log(e);
this.props.jumptopic(e);
}
render() {
@ -54,7 +59,7 @@ class OfficialAcademicTranscript extends Component {
key: 'taskname',
render: (text, record) => (
<span>
<span className={"task-hide"}>{record.taskname.name}</span>
<span className={"task-hide"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} >{record.taskname.name}</a></span>
{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}></span>:""}
</span>
),
@ -155,6 +160,9 @@ class OfficialAcademicTranscript extends Component {
.ant-table-tbody > tr{
height:64px;
}
.tasknameName:link{color:#676767}
.tasknameName:hover{color:#4CACFF}
`}
</style>
{datas===undefined?"":<Table

@ -34,8 +34,8 @@ if (!window['indexHOCLoaded']) {
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`));
// index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`));
// $('head').append($('<link rel="stylesheet" type="text/css" />')

@ -41,11 +41,12 @@ function md_clear_data(k,mdu,id){
var id1 = "#e_tip_"+id;
var id2 = "#e_tips_"+id;
if(k == 'content'){
$(id2).html("");
$(id2).html(" ");
}else{
$(id1).html("");
$(id1).html(" ");
}
}
window.md_clear_data = md_clear_data
// editor 存在了jquery对象上应用不需要自己写md_rec_data方法了
function md_rec_data(k, mdu, id) {
if (window.sessionStorage.getItem(k + mdu) !== null) {
@ -80,8 +81,8 @@ function md_elocalStorage(editor,mdu,id){
var id1 = "#e_tip_"+id;
var id2 = "#e_tips_"+id;
$(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 ");
$(id2).html("");
$(id2).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 ");
// $(id2).html("");
}
},10000);
@ -302,8 +303,8 @@ export default class TPMMDEditor extends Component {
</div>
</div>
<div className={"fr rememberTip"}>
{noStorage == true ? ' ' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? ' ' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? ' ' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"> </p>}
{/* {noStorage == true ? ' ' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"> </p>} */}
</div>
</React.Fragment>
)

Loading…
Cancel
Save