You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
694 lines
45 KiB
694 lines
45 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[3360],{
|
|
|
|
/***/ 30892:
|
|
/*!***********************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Export/index.less?modules ***!
|
|
\***********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___GW1u0","flex_space_between":"flex_space_between___XhK9z","flex_box_vertical_center":"flex_box_vertical_center___NKIbp","flex_box_center_end":"flex_box_center_end___V3qhT","flex_box_column":"flex_box_column___b4G29","bg":"bg___exMJB","paginationWrapper":"paginationWrapper___ROsRI","totalText":"totalText___PGE6D","num":"num___jLrBF","title":"title___yiXeD","questionIcons":"questionIcons___v75Tz","green":"green___HRGef","orange":"orange___tdW4E","greenTip":"greenTip___f2SpQ","redTip":"redTip___jc8UE","orangeTip":"orangeTip___VMO_s","flexRow":"flexRow___Jshv2","simpleWrap":"simpleWrap___ul6oi","divider":"divider___Of_8z","modal":"modal___oAD7F","programTitle":"programTitle___ybswa","simpleBg":"simpleBg___yLrQy","exportBtn":"exportBtn___x5fcE","export_type_modal":"export_type_modal___hmW4i","export_type_modal_con":"export_type_modal_con___R2S3f","type_item":"type_item___NsmrH","img_warp":"img_warp___LUfHa","img_warp_active":"img_warp_active____uL7y"});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 45615:
|
|
/*!*********************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/index.less?modules ***!
|
|
\*********************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___VAUts","flex_space_between":"flex_space_between___gx5ZV","flex_box_vertical_center":"flex_box_vertical_center___HV_tL","flex_box_center_end":"flex_box_center_end___fVsIw","flex_box_column":"flex_box_column___F5DHk","shixunWrp":"shixunWrp___pinaF","s":"s___mtpV4","fillComment":"fillComment___WEgkI","commentContent":"commentContent___v_Ebo","commentText":"commentText___fyDle","simpleWrap":"simpleWrap___uwIie","fillBg":"fillBg___iyMsm","simpleBg":"simpleBg___UqElF","lookCode":"lookCode___xKifS"});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 16632:
|
|
/*!***********************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/index.less?modules ***!
|
|
\***********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___D6Qly","flex_space_between":"flex_space_between___ZA98O","flex_box_vertical_center":"flex_box_vertical_center___aST6E","flex_box_center_end":"flex_box_center_end___kJ_eQ","flex_box_column":"flex_box_column___ZOkyZ","bg":"bg___rbSyL","circularBlue":"circularBlue___qvnla","circularRed":"circularRed___jo0FU","circularOrange":"circularOrange___GteY7","circularGreen":"circularGreen___PW_tz","circularGrey":"circularGrey___Nt7Wc","title":"title___Volf5","questionIcons":"questionIcons___MIxzq","grey":"grey___XquYB","green":"green___sjsXt","blue":"blue___Jwa9H","orange":"orange___cGfa7","red":"red___NensB","greenTip":"greenTip___lDmky","redTip":"redTip___Yp9nM","cccTip":"cccTip___Uzudc","orangeTip":"orangeTip___gA104","flexRow":"flexRow___GsOMs","simpleWrap":"simpleWrap___jppmP","userPhoto":"userPhoto___LUsoO","CCCIcons":"CCCIcons___STbxr","buttonFixed":"buttonFixed___aUnd3","progress":"progress___w_inO","typeTitle":"typeTitle___i1hJu","answerResult":"answerResult___kLknn","questionsInfo":"questionsInfo___spnx1","leftBar":"leftBar___AjrjB","greenBg":"greenBg___nlTOV","blueBg":"blueBg___nYACT","redBg":"redBg___WTgtT","orangeBg":"orangeBg___mMAXu","greyBg":"greyBg___eAdgQ","commentText":"commentText___smAVm","full":"full____Rgkm","answerInfo":"answerInfo___iSSvg","listType":"listType___fUHyn","userInfo":"userInfo___sc77e","userImg":"userImg___mL2tk","userInfoTitle":"userInfoTitle___U2d5B","userInfoValue":"userInfoValue___DBOCD","status":"status___yZSrO","result":"result___TOeTF","evaluate":"evaluate___CJGFj","analysis":"analysis___NuY61","userInfoModel":"userInfoModel___jHeA_","width":"width___UtVF4","Title":"Title___BfkeS","Value":"Value___sj9SB","userInfoModelbody":"userInfoModelbody___nQNbP","answerError":"answerError___kJTJu","export_type_modal":"export_type_modal___UwY7W","export_type_modal_con":"export_type_modal_con___iD92j","type_item":"type_item___hBzOc","img_warp":"img_warp___ijcxd","img_warp_active":"img_warp_active___VUIa8","scoreByBlankRadio":"scoreByBlankRadio___Z7ZDy","newProgramBg":"newProgramBg___zKYmY"});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 18476:
|
|
/*!*****************************************************!*\
|
|
!*** ./src/components/MathsLatexKeybords/index.tsx ***!
|
|
\*****************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less?modules */ 67373);
|
|
/* harmony import */ var mathlatex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mathlatex */ 48136);
|
|
/* harmony import */ var _keybords__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./keybords */ 23010);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 43418);
|
|
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
|
|
|
|
|
|
const MathsLatex = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({ callback, width, onChange, disabled, readOnly, type = "", value = "" }, ref) => {
|
|
const GraphicsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
const KeybordsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
const getData = () => {
|
|
var dom = document.createElement("div");
|
|
dom.innerHTML = GraphicsRef.current.getValue();
|
|
var str = dom.innerText;
|
|
callback && callback(str);
|
|
return str;
|
|
};
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, () => ({
|
|
getData
|
|
}));
|
|
const showInput = () => {
|
|
if (disabled || readOnly)
|
|
return;
|
|
antd__WEBPACK_IMPORTED_MODULE_4__["default"].confirm({
|
|
content: /* @__PURE__ */ React.createElement(_keybords__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { value, ref: KeybordsRef, onChange, showSaveButton: false }),
|
|
width: 860,
|
|
icon: null,
|
|
title: "\u8F93\u5165LATEX\u516C\u5F0F",
|
|
onOk: () => {
|
|
const val = KeybordsRef.current.getData();
|
|
GraphicsRef.current.setValue(val);
|
|
onChange(val);
|
|
}
|
|
});
|
|
};
|
|
return /* @__PURE__ */ React.createElement("div", { style: { width: width || "100%" }, className: `${_index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.mathFillWrap} ${disabled || readOnly ? "cursorDefault" : ""}`, onClick: () => showInput() }, /* @__PURE__ */ React.createElement("math-field", { disabled, locale: "zh_cn", class: `${_index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.mathField} ${type}`, readOnly, placeholder: "\u8BF7\u8F93\u5165latex\u516C\u5F0F", ref: GraphicsRef, style: { width: "100%", fontSize: value ? 18 : 14 }, value: value || "" }));
|
|
});
|
|
/* harmony default export */ __webpack_exports__.Z = (MathsLatex);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 24039:
|
|
/*!***************************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.tsx + 1 modules ***!
|
|
\***************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ component_AnswerComments; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var AnswerCommentsmodules = ({"flex_box_center":"flex_box_center___hzSR8","flex_space_between":"flex_space_between___Mscip","flex_box_vertical_center":"flex_box_vertical_center___Uckau","flex_box_center_end":"flex_box_center_end___Kw1tf","flex_box_column":"flex_box_column___udgQE","comments":"comments___He0El","line":"line___P3zVB"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(19351);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
const AnswerComments = ({
|
|
list,
|
|
hideScore = false,
|
|
newuserCommentVisible
|
|
}) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, list == null ? void 0 : list.map((v) => {
|
|
var _a, _b, _c, _d;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt20 mb20" }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle", key: (_a = v == null ? void 0 : v.user) == null ? void 0 : _a.user_id }, /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: env/* default */.Z.API_SERVER + "/images/" + ((_b = v == null ? void 0 : v.user) == null ? void 0 : _b.image_url), width: "40", style: { borderRadius: 40 } }), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "ml10 font16" }, (_c = v == null ? void 0 : v.user) == null ? void 0 : _c.name)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: AnswerCommentsmodules.comments }, (_d = v == null ? void 0 : v.comments) == null ? void 0 : _d.map((e, i) => {
|
|
var _a2, _b2, _c2, _d2, _e;
|
|
if (newuserCommentVisible && e.question_type !== 5) {
|
|
if (i === 0) {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { key: ((_a2 = v == null ? void 0 : v.user) == null ? void 0 : _a2.user_id) + "-" + i }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle", justify: "space-between" }, !!e.shixun_chanllge_position && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flexShrink: 0, marginRight: 10 } }, "\u7B2C", e.shixun_chanllge_position, "\u5173"), !hideScore && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flex: 1 } }, "\u539F\u59CB\u5F97\u5206", e == null ? void 0 : e.origin_score, "\u5206\uFF0C\u4FEE\u6B63\u4E3A", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-light-primary" }, e == null ? void 0 : e.score), "\u5206"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flexShrink: 0 } }, dayjs_min_default()(e.updated_at).format("YYYY-MM-DD HH:mm"))), !!e.comment && /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u8BC4\u8BED\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-light-primary" }, e.comment)), ((_b2 = v == null ? void 0 : v.comments) == null ? void 0 : _b2.length) - 1 > i && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: AnswerCommentsmodules.line }));
|
|
}
|
|
} else {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { key: ((_c2 = v == null ? void 0 : v.user) == null ? void 0 : _c2.user_id) + "-" + i }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle", justify: "space-between" }, !!e.shixun_chanllge_position && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flexShrink: 0, marginRight: 10 } }, "\u7B2C", e.shixun_chanllge_position, "\u5173"), !hideScore && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flex: 1 } }, "\u539F\u59CB\u5F97\u5206", e == null ? void 0 : e.origin_score, "\u5206\uFF0C\u4FEE\u6B63\u4E3A", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-light-primary" }, e == null ? void 0 : e.score), "\u5206"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { flexShrink: 0 } }, dayjs_min_default()(e.updated_at).format("YYYY-MM-DD HH:mm"))), !!e.comment && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "flex-wrp" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u8BC4\u8BED\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-light-primary flex1", dangerouslySetInnerHTML: { __html: ((_d2 = e.comment) == null ? void 0 : _d2.replace(/\n/g, "<br/>")) || "" } })), ((_e = v == null ? void 0 : v.comments) == null ? void 0 : _e.length) - 1 > i && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: AnswerCommentsmodules.line }));
|
|
}
|
|
})));
|
|
}));
|
|
};
|
|
/* harmony default export */ var component_AnswerComments = (AnswerComments);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 41046:
|
|
/*!***********************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/Fill.tsx ***!
|
|
\***********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/RenderHtml */ 92936);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 20008);
|
|
/* harmony import */ var _SeeAnswer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SeeAnswer */ 14395);
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less?modules */ 45615);
|
|
/* harmony import */ var _components_MathsLatexKeybords__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/MathsLatexKeybords */ 18476);
|
|
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { TextArea } = antd__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
const Fill = ({
|
|
item,
|
|
answerData,
|
|
changeScoreData,
|
|
textValue,
|
|
textOnChange = () => {
|
|
},
|
|
seeAnswerVisible = true
|
|
}) => {
|
|
var _a;
|
|
const [userAnswer, setUserAnswer] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
const [showEdit, setShowEdit] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
if (changeScoreData == null ? void 0 : changeScoreData[item.q_position]) {
|
|
!showEdit && setShowEdit(true);
|
|
} else {
|
|
showEdit && setShowEdit(false);
|
|
}
|
|
}, [changeScoreData == null ? void 0 : changeScoreData[item == null ? void 0 : item.q_position]]);
|
|
(_a = item == null ? void 0 : item.standard_answer) == null ? void 0 : _a.map((jtem) => {
|
|
jtem.used = false;
|
|
});
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
var _a2;
|
|
console.log("item=====", item, answerData, changeScoreData, "#37AD83;");
|
|
const data = [];
|
|
for (let i = 0; i < (item == null ? void 0 : item.multi_count); i++) {
|
|
const param = ((_a2 = item == null ? void 0 : item.user_answer) == null ? void 0 : _a2.find((e) => e.choice_id === i + 1)) || {
|
|
choice_id: i + 1,
|
|
answer_text: ""
|
|
};
|
|
data.push(__spreadValues({}, param));
|
|
}
|
|
setUserAnswer(data);
|
|
}, [item == null ? void 0 : item.user_answer]);
|
|
return /* @__PURE__ */ React.createElement("div", { className: _index_less_modules__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z.fillBg }, /* @__PURE__ */ React.createElement("aside", { className: "font14 c-light-primary mb5" }, "\u5B66\u751F\u7B54\u9898"), userAnswer == null ? void 0 : userAnswer.map((answer, index) => {
|
|
return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("span", null, "\u7B54\u6848(\u586B\u7A7A", index + 1, "):"), /* @__PURE__ */ React.createElement("div", null, item.question_type == 3 ? (answer == null ? void 0 : answer.model) === 1 ? /* @__PURE__ */ React.createElement("span", { style: { whiteSpace: "pre-wrap", color: (answer == null ? void 0 : answer.user_answer_boolean) ? "#37AD83" : "#E30000" } }, answer == null ? void 0 : answer.answer_text) : /* @__PURE__ */ React.createElement(_components_MathsLatexKeybords__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { type: (answer == null ? void 0 : answer.user_answer_boolean) ? "success" : "error", readOnly: true, value: answer.answer_text, disabled: true }) : /* @__PURE__ */ React.createElement(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { value: answer == null ? void 0 : answer.answer_text })));
|
|
}), seeAnswerVisible && /* @__PURE__ */ React.createElement(_SeeAnswer__WEBPACK_IMPORTED_MODULE_2__/* .SeeAnswer */ .u, { data: item }));
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (Fill);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 62332:
|
|
/*!**************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/Program.tsx ***!
|
|
\**************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/RenderHtml */ 92936);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ 9498);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 86383);
|
|
/* harmony import */ var _components_monaco_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/monaco-editor */ 16162);
|
|
/* harmony import */ var js_base64__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! js-base64 */ 24334);
|
|
/* harmony import */ var js_base64__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(js_base64__WEBPACK_IMPORTED_MODULE_4__);
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../index.less?modules */ 16632);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Program = ({
|
|
item,
|
|
answerData,
|
|
autoHeight
|
|
}) => {
|
|
var _a, _b, _c, _d, _e;
|
|
const [data, setData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
var _a2, _b2;
|
|
if (((_a2 = item == null ? void 0 : item.evaluate_codes) == null ? void 0 : _a2.length) > 0) {
|
|
setData((_b2 = item == null ? void 0 : item.evaluate_codes) == null ? void 0 : _b2.map((code, index) => {
|
|
return {
|
|
key: index + 1,
|
|
error_msg: (code == null ? void 0 : code.error_msg) ? js_base64__WEBPACK_IMPORTED_MODULE_4__.Base64.decode(code == null ? void 0 : code.error_msg) : "",
|
|
created_at: code.created_at
|
|
};
|
|
}));
|
|
} else {
|
|
setData([{ key: "--", error_msg: "--" }]);
|
|
}
|
|
}, [item == null ? void 0 : item.evaluate_codes]);
|
|
const columns = [{
|
|
title: "\u8BC4\u6D4B\u5E8F\u53F7",
|
|
dataIndex: "key",
|
|
width: "127px",
|
|
key: "key",
|
|
align: "center",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, record.key)
|
|
}, {
|
|
title: "\u8BC4\u6D4B\u65F6\u95F4",
|
|
dataIndex: "created_at",
|
|
key: "created_at",
|
|
align: "center",
|
|
width: 200,
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, record.created_at ? moment__WEBPACK_IMPORTED_MODULE_2___default()(record.created_at).format("YYYY-MM-DD HH:mm") : "--")
|
|
}, {
|
|
title: "\u8BC4\u6D4B\u7ED3\u679C",
|
|
dataIndex: "error_msg",
|
|
key: "error_msg",
|
|
align: "center",
|
|
render: (text, record) => {
|
|
var _a2;
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, record.error_msg ? ((_a2 = record.error_msg) == null ? void 0 : _a2.length) > 1e3 ? record.error_msg.substring(0, 1e3) + "..." : record.error_msg : "--");
|
|
}
|
|
}];
|
|
const options = {
|
|
selectOnLineNumbers: true,
|
|
readOnly: true,
|
|
minimap: {
|
|
enabled: false
|
|
},
|
|
scrollBeyondLastLine: false
|
|
};
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "mt15 mb15" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { value: item == null ? void 0 : item.description })), (!!((_a = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _a.student_commit_status) && ((_b = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _b.student_commit_status) !== 0 || !!((_c = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _c.user_exercise_status) && ((_d = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _d.user_exercise_status) !== 0) && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_6__["default"],
|
|
{
|
|
className: "mt5",
|
|
bordered: true,
|
|
dataSource: data,
|
|
columns,
|
|
pagination: false
|
|
}
|
|
), !!((_e = item == null ? void 0 : item.user_answer) == null ? void 0 : _e.length) && (item == null ? void 0 : item.passed_code) && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("aside", { className: _index_less_modules__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.shixunWrp }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", null, "\u7B2C\u4E00\u6B21\u8BC4\u6D4B\u901A\u8FC7\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
_components_monaco_editor__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP,
|
|
{
|
|
style: { border: "1px solid #ccc" },
|
|
height: 300,
|
|
language: "python",
|
|
theme: "vs-light",
|
|
value: (item == null ? void 0 : item.passed_code) ? js_base64__WEBPACK_IMPORTED_MODULE_4__.Base64.decode(item == null ? void 0 : item.passed_code) : "",
|
|
autoHeight,
|
|
options
|
|
}
|
|
)));
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (Program);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 14395:
|
|
/*!****************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/SeeAnswer.tsx ***!
|
|
\****************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ u: function() { return /* binding */ SeeAnswer; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 95237);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 43604);
|
|
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/RenderHtml */ 92936);
|
|
/* harmony import */ var _components_MathsLatexKeybords__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/MathsLatexKeybords */ 18476);
|
|
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
|
|
|
|
const SeeAnswer = ({ data }) => {
|
|
const [show, setShow] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
const renderDom = () => {
|
|
var _a, _b, _c;
|
|
switch (data.question_type) {
|
|
case 3:
|
|
return /* @__PURE__ */ React.createElement("aside", { className: "mt20" }, /* @__PURE__ */ React.createElement("span", { style: { cursor: "pointer" }, className: "font14 c-blue current", onClick: () => {
|
|
setShow(!show);
|
|
} }, show ? "\u9690\u85CF\u53C2\u8003\u7B54\u6848" : "\u67E5\u770B\u53C2\u8003\u7B54\u6848"), show && /* @__PURE__ */ React.createElement("div", null, (_a = data == null ? void 0 : data.standard_answer) == null ? void 0 : _a.map(function(item, key) {
|
|
var _a2, _b2;
|
|
return /* @__PURE__ */ React.createElement(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { style: { alignItems: "baseline" }, className: "mr20" }, /* @__PURE__ */ React.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { flex: "50px" }, /* @__PURE__ */ React.createElement("span", { className: "mt10" }, "\u586B\u7A7A", item.choice_id, ":")), (item == null ? void 0 : item.model) === 1 ? /* @__PURE__ */ React.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { flex: 1 }, (_a2 = item == null ? void 0 : item.answer_text) == null ? void 0 : _a2.map(function(val, key2) {
|
|
return /* @__PURE__ */ React.createElement("div", null, val);
|
|
})) : /* @__PURE__ */ React.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { flex: 1 }, (_b2 = item == null ? void 0 : item.answer_text) == null ? void 0 : _b2.map(function(val, key2) {
|
|
return /* @__PURE__ */ React.createElement(_components_MathsLatexKeybords__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { readOnly: true, value: val });
|
|
})));
|
|
})));
|
|
break;
|
|
case 8:
|
|
return /* @__PURE__ */ React.createElement("aside", { className: "mt20" }, /* @__PURE__ */ React.createElement("span", { style: { cursor: "pointer" }, className: "font14 c-blue current", onClick: () => {
|
|
setShow(!show);
|
|
} }, show ? "\u9690\u85CF\u53C2\u8003\u7B54\u6848" : "\u67E5\u770B\u53C2\u8003\u7B54\u6848"), show && /* @__PURE__ */ React.createElement("div", null, (_b = data == null ? void 0 : data.standard_answer) == null ? void 0 : _b.map(function(item, key) {
|
|
return /* @__PURE__ */ React.createElement(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { style: { alignItems: "baseline" }, className: "mr20" }, /* @__PURE__ */ React.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { flex: "50px" }, /* @__PURE__ */ React.createElement("span", { className: "mt10" }, "\u586B\u7A7A", item.choice_id, ":")), /* @__PURE__ */ React.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { flex: 1 }, /* @__PURE__ */ React.createElement("div", null, item == null ? void 0 : item.answer_text)));
|
|
})));
|
|
break;
|
|
case 4:
|
|
return /* @__PURE__ */ React.createElement("aside", { className: "mt20" }, /* @__PURE__ */ React.createElement("span", { style: { cursor: "pointer" }, className: "font14 c-blue current", onClick: () => {
|
|
setShow(!show);
|
|
} }, show ? "\u9690\u85CF\u53C2\u8003\u7B54\u6848" : "\u67E5\u770B\u53C2\u8003\u7B54\u6848"), show && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { value: (_c = data == null ? void 0 : data.standard_answer) == null ? void 0 : _c.join(" ") })));
|
|
break;
|
|
}
|
|
};
|
|
return /* @__PURE__ */ React.createElement("section", null, renderDom());
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 97329:
|
|
/*!*************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/Shixun.tsx ***!
|
|
\*************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/RenderHtml */ 92936);
|
|
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/authority */ 77883);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 6848);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 96971);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd */ 86383);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! moment */ 9498);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! umi */ 23852);
|
|
/* harmony import */ var _components_monaco_editor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/monaco-editor */ 16162);
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index.less?modules */ 45615);
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Shixun = ({
|
|
item,
|
|
answerData,
|
|
hasChangeScore = true,
|
|
autoHeight,
|
|
showAnswer,
|
|
saveChangeScore = () => {
|
|
}
|
|
}) => {
|
|
var _a, _b, _c;
|
|
const [data, setData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
const [challengeData, setChallengeData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
if (!((_a2 = item == null ? void 0 : item.shixun_details) == null ? void 0 : _a2.length)) {
|
|
return;
|
|
}
|
|
let shixun = [];
|
|
let challenge = [];
|
|
for (let i = 0; i < ((_b2 = item == null ? void 0 : item.shixun_details) == null ? void 0 : _b2.length); i++) {
|
|
for (let j = 0; j < (item == null ? void 0 : item.shixun_details[i].stage_list.length); j++) {
|
|
let shixunItem = item == null ? void 0 : item.shixun_details[i].stage_list[j];
|
|
shixun.push(__spreadValues(__spreadValues({}, shixunItem), {
|
|
operation: (_f = (_e = (_d = (_c2 = item == null ? void 0 : item.shixun_details) == null ? void 0 : _c2[i]) == null ? void 0 : _d.shixun_detail) == null ? void 0 : _e[0]) == null ? void 0 : _f.game_identifier,
|
|
shixun_challenge_id: (_g = item == null ? void 0 : item.shixun_details[i]) == null ? void 0 : _g.shixun_challenge_id
|
|
}));
|
|
}
|
|
if ((_i = (_h = item == null ? void 0 : item.shixun_details) == null ? void 0 : _h[i]) == null ? void 0 : _i.shixun_detail) {
|
|
challenge.push((_l = (_k = (_j = item == null ? void 0 : item.shixun_details) == null ? void 0 : _j[i]) == null ? void 0 : _k.shixun_detail) == null ? void 0 : _l[0]);
|
|
}
|
|
}
|
|
setChallengeData(challenge);
|
|
setData([...shixun]);
|
|
}, [item == null ? void 0 : item.shixun_details]);
|
|
const columns = [
|
|
{
|
|
title: "\u5173\u5361",
|
|
dataIndex: "position",
|
|
key: "position",
|
|
align: "center"
|
|
},
|
|
{
|
|
title: "\u4EFB\u52A1\u540D\u79F0",
|
|
dataIndex: "name",
|
|
key: "name",
|
|
align: "center",
|
|
ellipsis: true,
|
|
width: 260,
|
|
render: (name) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, { title: name }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
"span",
|
|
{
|
|
className: "overflowHidden1",
|
|
style: { maxWidth: "400px" },
|
|
title: name && name.length > 25 ? name : ""
|
|
},
|
|
name
|
|
));
|
|
}
|
|
},
|
|
{
|
|
title: "\u8BC4\u6D4B\u6B21\u6570",
|
|
dataIndex: "evaluate_count",
|
|
key: "evaluate_count",
|
|
align: "center",
|
|
render: (testCount, item2) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, item2.evaluate_count ? item2.evaluate_count : /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "color-grey-9" }, "--"));
|
|
}
|
|
},
|
|
{
|
|
title: "\u5B8C\u6210\u65F6\u95F4",
|
|
key: "finished_time",
|
|
dataIndex: "finished_time",
|
|
align: "center",
|
|
render: (endTime, item2) => {
|
|
let timeOver = false;
|
|
if (item2.finished_time && (answerData == null ? void 0 : answerData.exercise) && (answerData == null ? void 0 : answerData.exercise_answer_user)) {
|
|
if ((answerData == null ? void 0 : answerData.exercise.time) === -1) {
|
|
timeOver = moment__WEBPACK_IMPORTED_MODULE_3___default()(answerData == null ? void 0 : answerData.exercise.end_time).isBefore(item2.finished_time);
|
|
} else {
|
|
timeOver = moment__WEBPACK_IMPORTED_MODULE_3___default()(answerData == null ? void 0 : answerData.exercise_answer_user.start_at).add(answerData == null ? void 0 : answerData.exercise.time, "m").isBefore(item2.finished_time);
|
|
}
|
|
}
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, item2.finished_time || /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-grey-999" }, "--"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-orange-ff9 " }, timeOver ? "\uFF08\u5DF2\u8D85\u65F6\uFF09" : ""));
|
|
}
|
|
},
|
|
{
|
|
title: "\u8017\u65F6",
|
|
dataIndex: "time_consuming",
|
|
key: "time_consuming",
|
|
align: "center",
|
|
render: (time, item2) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, item2.time_consuming || /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "color-grey-9" }, "--"));
|
|
}
|
|
},
|
|
{
|
|
title: "\u67E5\u770B\u7B54\u6848",
|
|
dataIndex: "view_answer",
|
|
key: "view_answer",
|
|
align: "center",
|
|
render: (exp, item2) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, item2.view_answer ? "\u5DF2\u67E5\u770B" : "\u672A\u67E5\u770B");
|
|
}
|
|
},
|
|
// {
|
|
// title: "经验值",
|
|
// dataIndex: "experience",
|
|
// key: "experience",
|
|
// align: 'center',
|
|
// render: (exp: any, item: any) => {
|
|
// return (
|
|
// <span>
|
|
// <span className="c-green">{item.myself_experience}</span>/
|
|
// {item.experience}
|
|
// </span>
|
|
// );
|
|
// },
|
|
// },
|
|
{
|
|
title: "\u5F97\u5206/\u6EE1\u5206",
|
|
dataIndex: "user_score",
|
|
key: "user_score",
|
|
align: "center",
|
|
render: (exp, item2) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-orange" }, item2.user_score), "/", item2.game_score);
|
|
}
|
|
},
|
|
hasChangeScore && {
|
|
title: "\u8C03\u5206",
|
|
dataIndex: "user_score",
|
|
key: "user_score",
|
|
align: "center",
|
|
render: (value, data2, index) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { min: 0, max: Number(data2.game_score), defaultValue: value, onBlur: (e) => __async(void 0, null, function* () {
|
|
if (e.target.value != value) {
|
|
const res = yield saveChangeScore(__spreadValues(__spreadValues({}, item), { shixun_challenge_id: data2.shixun_challenge_id, shixunScore: e.target.value }));
|
|
console.log("res: ", res);
|
|
if (res == null ? void 0 : res.question_comments) {
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.success("\u5DF2\u4FEE\u6539\u5F53\u524D\u8BC4\u5206");
|
|
}
|
|
}
|
|
}) });
|
|
}
|
|
}
|
|
].filter((x) => !!x);
|
|
const outputColumns = [{
|
|
title: "\u8BC4\u6D4B\u6B21\u6570",
|
|
dataIndex: "key",
|
|
width: "127px",
|
|
key: "key",
|
|
align: "center",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, record.key)
|
|
}, {
|
|
title: "\u8BE6\u7EC6\u4FE1\u606F",
|
|
dataIndex: "error_msg",
|
|
key: "error_msg",
|
|
align: "center",
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, record.error_msg ? record.error_msg : "--")
|
|
}, {
|
|
title: "\u8BC4\u6D4B\u65F6\u95F4",
|
|
dataIndex: "updated_at",
|
|
key: "updated_at",
|
|
align: "center",
|
|
width: 200,
|
|
render: (text, record) => /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, record.updated_at ? record.updated_at : "--")
|
|
}];
|
|
const options = {
|
|
selectOnLineNumbers: true,
|
|
readOnly: true,
|
|
minimap: {
|
|
enabled: false
|
|
},
|
|
scrollBeyondLastLine: false
|
|
};
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (((_a = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _a.student_commit_status) !== 0 || ((_b = answerData == null ? void 0 : answerData.exercise) == null ? void 0 : _b.user_exercise_status) !== 0) && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "mt15" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", { className: "font16 c-grey-666" }, "\u9636\u6BB5\u6210\u7EE9"), !!(data == null ? void 0 : data.length) && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_10__["default"],
|
|
{
|
|
columns,
|
|
dataSource: data,
|
|
pagination: false
|
|
}
|
|
)), !!(challengeData == null ? void 0 : challengeData.length) && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", { className: "font16 c-grey-666 mt10" }, "\u5B9E\u8BAD\u8BE6\u60C5"), challengeData == null ? void 0 : challengeData.map((chanllenge, index) => {
|
|
var _a2;
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "mt5" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "font16 mr15" }, " \u7B2C", chanllenge.position, "\u5173"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(umi__WEBPACK_IMPORTED_MODULE_4__.Link, { className: "current c-black font16", to: `/tasks/${chanllenge.game_identifier}` }, chanllenge.name)), !!((_a2 = chanllenge == null ? void 0 : chanllenge.outputs) == null ? void 0 : _a2.length) && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
antd__WEBPACK_IMPORTED_MODULE_10__["default"],
|
|
{
|
|
bordered: true,
|
|
dataSource: chanllenge.outputs.map((out) => ({ key: out.position, error_msg: out.output_detail, updated_at: out.updated_at })),
|
|
columns: outputColumns,
|
|
pagination: false
|
|
}
|
|
), (chanllenge == null ? void 0 : chanllenge.st) === 0 && chanllenge.passed_code && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _index_less_modules__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.shixunWrp }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", null, "\u6700\u540E\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-light-black" }, chanllenge.path)), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
_components_monaco_editor__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP,
|
|
{
|
|
height: 300,
|
|
autoHeight,
|
|
language: "python",
|
|
theme: "default",
|
|
value: chanllenge.passed_code,
|
|
options
|
|
}
|
|
)));
|
|
})), (0,_utils_authority__WEBPACK_IMPORTED_MODULE_2__/* .isStudent */ .dE)() && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z,
|
|
{
|
|
className: "c-grey-999 mt20 mb20",
|
|
value: item == null ? void 0 : item.question_title
|
|
}
|
|
), (_c = item == null ? void 0 : item.shixun) == null ? void 0 : _c.map((shixun, index) => {
|
|
var _a2, _b2;
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", { className: "font16 c-grey-666 mb5" }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "mr20" }, "\u7B2C", shixun == null ? void 0 : shixun.challenge_position, "\u5173 ", shixun == null ? void 0 : shixun.challenge_name), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, shixun == null ? void 0 : shixun.challenge_score, "\u5206")), showAnswer && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _index_less_modules__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.answerText }, "\u53C2\u8003\u7B54\u6848\uFF1A", ((_a2 = shixun.challenge_answers) == null ? void 0 : _a2.length) === 0 ? "\u6682\u65E0" : ""), (_b2 = shixun.challenge_answers) == null ? void 0 : _b2.map((item2, index2) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: `mt15` }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, "\u7EA7\u522B", index2 + 1, "\uFF1A", item2.name), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { value: (item2 == null ? void 0 : item2.contents) || "", className: _index_less_modules__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z.answerText }));
|
|
})));
|
|
}), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "mb15" }));
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (Shixun);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 47464:
|
|
/*!***************************!*\
|
|
!*** ./src/utils/enum.ts ***!
|
|
\***************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ c: function() { return /* binding */ QuestionType; }
|
|
/* harmony export */ });
|
|
/* unused harmony export PageType */
|
|
var PageType = /* @__PURE__ */ ((PageType2) => {
|
|
PageType2["FirstPage"] = "firstPage";
|
|
PageType2["PrevPage"] = "prevPage";
|
|
PageType2["NextPage"] = "nextPage";
|
|
return PageType2;
|
|
})(PageType || {});
|
|
var QuestionType = /* @__PURE__ */ ((QuestionType2) => {
|
|
QuestionType2[QuestionType2["Single"] = 0] = "Single";
|
|
QuestionType2[QuestionType2["Multiple"] = 1] = "Multiple";
|
|
QuestionType2[QuestionType2["Judge"] = 2] = "Judge";
|
|
QuestionType2[QuestionType2["Fill"] = 3] = "Fill";
|
|
QuestionType2[QuestionType2["Subjective"] = 4] = "Subjective";
|
|
QuestionType2[QuestionType2["Shixun"] = 5] = "Shixun";
|
|
QuestionType2[QuestionType2["Program"] = 6] = "Program";
|
|
QuestionType2[QuestionType2["Combine"] = 7] = "Combine";
|
|
return QuestionType2;
|
|
})(QuestionType || {});
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |