|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
import {Input,InputNumber,Spin,Statistic} from "antd";
|
|
|
|
import {Input,InputNumber,Spin,Statistic} from "antd";
|
|
|
|
|
|
|
|
|
|
|
@ -7,7 +8,7 @@ import '../poll/pollStyle.css';
|
|
|
|
import '../css/Courses.css';
|
|
|
|
import '../css/Courses.css';
|
|
|
|
|
|
|
|
|
|
|
|
import moment from 'moment';
|
|
|
|
import moment from 'moment';
|
|
|
|
import { WordsBtn, markdownToHTML, ActionBtn, getImageUrl, MarkdownToHtml } from 'educoder';
|
|
|
|
import { WordsBtn,ActionBtn,getImageUrl, MarkdownToHtml } from 'educoder';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
|
|
|
|
|
|
|
@ -90,6 +91,7 @@ class ExerciseReviewAndAnswer extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
componentDidUpdate (prevProps) {
|
|
|
|
componentDidUpdate (prevProps) {
|
|
|
|
|
|
|
|
// 需要等get_user_info执行完才能getInfo
|
|
|
|
if (!prevProps.coursedata.name && this.props.coursedata.name) {
|
|
|
|
if (!prevProps.coursedata.name && this.props.coursedata.name) {
|
|
|
|
this.getInfo()
|
|
|
|
this.getInfo()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -197,11 +199,9 @@ class ExerciseReviewAndAnswer extends Component {
|
|
|
|
let isAdmin=this.props.isAdmin();
|
|
|
|
let isAdmin=this.props.isAdmin();
|
|
|
|
if(isAdmin){
|
|
|
|
if(isAdmin){
|
|
|
|
let url=`/exercises/${eId}/review_exercise.json`
|
|
|
|
let url=`/exercises/${eId}/review_exercise.json`
|
|
|
|
axios.get((url), {
|
|
|
|
axios.get((url),{params:{
|
|
|
|
params: {
|
|
|
|
|
|
|
|
login:user_id
|
|
|
|
login:user_id
|
|
|
|
}
|
|
|
|
}}).then((result)=>{
|
|
|
|
}).then((result) => {
|
|
|
|
|
|
|
|
if(result){
|
|
|
|
if(result){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
data:result.data,
|
|
|
|
data:result.data,
|
|
|
@ -239,11 +239,9 @@ class ExerciseReviewAndAnswer extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
let url=`/exercises/${eId}/start_answer.json`
|
|
|
|
let url=`/exercises/${eId}/start_answer.json`
|
|
|
|
axios.get((url), {
|
|
|
|
axios.get((url),{params:{
|
|
|
|
params: {
|
|
|
|
|
|
|
|
login:user_id
|
|
|
|
login:user_id
|
|
|
|
}
|
|
|
|
}}).then((result)=>{
|
|
|
|
}).then((result) => {
|
|
|
|
|
|
|
|
if(result.status==200){
|
|
|
|
if(result.status==200){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
data:result.data,
|
|
|
|
data:result.data,
|
|
|
@ -644,7 +642,8 @@ class ExerciseReviewAndAnswer extends Component {
|
|
|
|
// console.log(data&&data.exercise.user_name)
|
|
|
|
// console.log(data&&data.exercise.user_name)
|
|
|
|
document.title=courseName&&courseName;
|
|
|
|
document.title=courseName&&courseName;
|
|
|
|
|
|
|
|
|
|
|
|
return (<div className="newMain" style={{ paddingTop: "0px" }}>
|
|
|
|
return(
|
|
|
|
|
|
|
|
<div className="newMain" style={{paddingTop:"0px"}}>
|
|
|
|
<Spin size="large" spinning={isSpin}>
|
|
|
|
<Spin size="large" spinning={isSpin}>
|
|
|
|
<style>{`
|
|
|
|
<style>{`
|
|
|
|
.inputNumber30{
|
|
|
|
.inputNumber30{
|
|
|
@ -981,6 +980,11 @@ class ExerciseReviewAndAnswer extends Component {
|
|
|
|
id={`${"input_"+item.q_position+"_"+item.question_type}`}
|
|
|
|
id={`${"input_"+item.q_position+"_"+item.question_type}`}
|
|
|
|
></InputNumber>
|
|
|
|
></InputNumber>
|
|
|
|
<span className="ml5">分</span>
|
|
|
|
<span className="ml5">分</span>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
parseInt(item.answer_status) == 0 && item.question_type == 4 ? <span className="color-red ml10 font-16">未评分</span> : ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
<ActionBtn style="blue" className="middle ml20" onClick={()=>this.setAction(key,item.question_id,item.question_score,item.user_score)}>确认</ActionBtn>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
list && list.length > 0 && list[0].setTip !="" ? <p className="color-red edu-txt-left">{ list[0].setTip }</p> :""
|
|
|
|
list && list.length > 0 && list[0].setTip !="" ? <p className="color-red edu-txt-left">{ list[0].setTip }</p> :""
|
|
|
|
}
|
|
|
|
}
|
|
|
|