diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index df3ad315b..c630abf7e 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -46,7 +46,7 @@ debugType = "admin";
// 老师
// debugType="teacher";
// 学生
-debugType="student";
+//debugType="student";
diff --git a/public/react/src/common/TextUtil.js b/public/react/src/common/TextUtil.js
index 8360881e9..ae04e3a1c 100644
--- a/public/react/src/common/TextUtil.js
+++ b/public/react/src/common/TextUtil.js
@@ -6,11 +6,8 @@ export function isImageExtension(fileName) {
}
export function markdownToHTML(oldContent, selector) {
- console.log(oldContent)
- console.log(selector)
- if(oldContent){
+ try {
window.$('#md_div').html('')
- // markdown to html
if (selector && oldContent && oldContent.startsWith('
{
- if (item.insert['image']) {
- item.insert['image'] = Object.assign({}, item.insert['image'], { style: { cursor: 'pointer' }, onclick: (url) => showUploadImage(url) });
- }
- });
+ try {
+ const ops = value.ops || [];
+ ops.forEach((item, i) => {
+ if (item.insert['image']) {
+ item.insert['image'] = Object.assign({}, item.insert['image'], { style: { cursor: 'pointer' }, onclick: (url) => showUploadImage(url) });
+ }
+ });
+ }catch (e) {
+
+ }
}
const current = value
diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
index 9f60b3481..483769f62 100644
--- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
+++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
@@ -13,6 +13,7 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import QuillForEditor from "../../../common/quillForEditor";
import Multiple from './question/multiple';
import Single from './question/single';
+import Progques from './question/Progques';
import FillEmpty from './question/fillEmpty';
import SimpleAnswer from './question/simpleAnswer';
import ShixunAnswer from './question/shixunAnswer';
@@ -1014,6 +1015,22 @@ class ExerciseReviewAndAnswer extends Component{
handleShowUploadImage={(u)=>this.handleShowUploadImage(u)}
>
}
+ {
+ //编程题
+ item.question_type == 6 &&
+ this.handleShowUploadImage(u)}
+ >
+
+ }
{
//调分理由部分
diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js
index 000859e39..26f30212c 100644
--- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js
+++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js
@@ -1,7 +1,6 @@
import React, {Component} from "react";
-import {WordsBtn,markdownToHTML, MarkdownToHtml} from 'educoder';
-import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Pagination} from "antd";
-import {Link,Switch,Route,Redirect} from 'react-router-dom';
+import {QuillForEditor, MarkdownToHtml} from 'educoder';
+import {Checkbox,Pagination} from "antd";
import axios from 'axios';
import Exercisetablesmubu from './Exercisetablesmubu';
import Exercisestatisticalresulttabel from './Exercisestatisticalresulttabel';
@@ -287,6 +286,9 @@ class Exercisestatisticalresult extends Component {
.Exermubu .editormd-html-preview, .Exermubu .editormd-preview-container {
background: transparent;
}
+ .ql-editor{
+ padding:0px !important;
+ }
`}
{data&&data.commit_results.map((item,key)=>{
@@ -299,9 +301,14 @@ class Exercisestatisticalresult extends Component {
{/*Q{item.ques_position}:*/}
{/*
*/}
-
:
+ >}
{/*
*/}
@@ -319,8 +326,9 @@ class Exercisestatisticalresult extends Component {
正确率 {ite.challenge_percent}%
{
+ let newvalue;
+ try {
+ newvalue=JSON.parse(value);
+ }catch (e) {
+ newvalue={"ops":[{"insert":value}]};
+ }
+ if(value===undefined){
+ newvalue={"ops":[{"insert":""}]};
+ }
+ return newvalue
+ }
+
render() {
- let {data,type,effictive_counts,choicetype, tableNum}=this.props;
- let datas=[];
+ let {datass,type,effictive_counts,choicetype, tableNum}=this.props;
+ let list=[];
- data&&data.forEach((item,key)=>{
- datas.push({
+ datass&&datass.forEach((item,key)=>{
+ list.push({
commit_percent:{
num:item.choice_position,
value:type===4||type===5?choicetype[item.choice_text-1]:item.choice_text,
@@ -40,33 +52,38 @@ class Exercisetablesmubus extends Component {
max_score:item.choice_percent,
})
})
- datas.push({
+ list.push({
commit_percent: {num:null,value:"有效填写量"},
min_score:{value:effictive_counts},
})
let columns=[]
- if(datas.length!=0){
+ if(list.length!=0){
columns=[{
title: '选项',
dataIndex: 'commit_percent',
key: 'commit_percent',
render: (text, record, index) => {
const _content =
- {text.value!="有效填写量"&&text.value!="wrong" &&
-
+ {text.value>0&&text.value!="有效填写量"&&text.value!="wrong"||!text.value&&text.value!="有效填写量"&&text.value!="wrong"?text.value:text.value!="有效填写量"&&text.value!="wrong" &&
+ this.props&&this.props.data.is_md===false?:text.value!="有效填写量"&&text.value!="wrong"&&
}
{text.value==="wrong" && "填写了错误答案" }
- {text.value==="有效填写量" && "有效填写量" }
+ {text.value==="有效填写量" && "有效填写量" }
return (
-
+
(text._type === 0 || text._type === 1) ?
{{tagArray[index]}.}
{_content}
: {_content}
)
-
+
},
}, {
title: '小计',
@@ -122,13 +139,15 @@ class Exercisetablesmubus extends Component {
.Exermubu .ant-table-tbody> tr > td{
border-bottom: transparent;
}
-
+ .ql-editor{
+ padding:0px !important;
+ }
`}
-
- {datas===undefined?"":{
+ let newvalue;
+ try {
+ newvalue=JSON.parse(value);
+ }catch (e) {
+ newvalue={"ops":[{"insert":value}]};
+ }
+ if(value===undefined){
+ newvalue={"ops":[{"insert":""}]};
+ }
+ return newvalue
+ }
render() {
let { question_choices,
question_id, index
} = this.props;
const qNumber = `question_${index}`;
-
+ console.log(this.props)
return(
+
+
+
+
+ )
+ }
+}
+export default Progques