Auto Submit

pull/1/head
autosubmit 2 years ago
parent d3f113cc49
commit 49785b4984

@ -6315,7 +6315,7 @@ var Shixun = function Shixun(_ref) {
className: "font16 c-grey-666 mt10",
children: "\u5B9E\u8BAD\u8BE6\u60C5"
}), challengeData === null || challengeData === void 0 ? void 0 : challengeData.map(function (chanllenge, index) {
var _chanllenge$outputs;
var _chanllenge$outputs, _chanllenge$challenge, _chanllenge$challenge2;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div", {
className: "mt5",
@ -6338,19 +6338,19 @@ var Shixun = function Shixun(_ref) {
}),
columns: outputColumns,
pagination: false
}), (chanllenge === null || chanllenge === void 0 ? void 0 : chanllenge.st) === 0 && chanllenge.passed_code && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div", {
}), (chanllenge === null || chanllenge === void 0 ? void 0 : chanllenge.st) === 0 && chanllenge.challenge_paths && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z.shixunWrp,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)("h2", {
children: ["\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__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
className: "c-light-black",
children: chanllenge.path
children: (_chanllenge$challenge = chanllenge.challenge_paths) === null || _chanllenge$challenge === void 0 || (_chanllenge$challenge = _chanllenge$challenge[0]) === null || _chanllenge$challenge === void 0 ? void 0 : _chanllenge$challenge.file_name
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_monaco_editor__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
height: 300,
autoHeight: autoHeight,
language: "python",
theme: "default",
value: chanllenge.passed_code,
value: ((_chanllenge$challenge2 = chanllenge.challenge_paths) === null || _chanllenge$challenge2 === void 0 || (_chanllenge$challenge2 = _chanllenge$challenge2[0]) === null || _chanllenge$challenge2 === void 0 ? void 0 : _chanllenge$challenge2.latest_code) || "",
options: options
})]
})]

@ -4111,7 +4111,7 @@ var StudentEaxmPaper = function StudentEaxmPaper(_ref) {
setAutoHeight(true);
setTimeout(function () {
exportReport(studentexportDate);
}, 1000);
}, 2500);
}
}, [isEaxmPaperOpen, exportData]);
var handleRemoveSurplusCanvas = function handleRemoveSurplusCanvas() {
@ -4259,8 +4259,6 @@ var StudentEaxmPaper = function StudentEaxmPaper(_ref) {
_context2.next = 3;
return pdf.addPage();
case 3:
onChangeProgress(pdf);
case 4:
case "end":
return _context2.stop();
}
@ -4288,11 +4286,12 @@ var StudentEaxmPaper = function StudentEaxmPaper(_ref) {
_context4.next = 9;
break;
case 14:
onChangeProgress(worker);
setisshowanswer(false);
setUserCommentVisible(false);
setUserScoreVisible(false);
setAutoHeight(false);
case 18:
case 19:
case "end":
return _context4.stop();
}
@ -4335,6 +4334,7 @@ var StudentEaxmPaper = function StudentEaxmPaper(_ref) {
item.question_type === utils_enum/* QuestionType */.c.Single && ((_item$question_choice = item.question_choices) === null || _item$question_choice === void 0 ? void 0 : _item$question_choice.map(function (val, key) {
var _item$user_answer;
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "pr20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "25px",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@ -4361,6 +4361,7 @@ var StudentEaxmPaper = function StudentEaxmPaper(_ref) {
item.question_type === utils_enum/* QuestionType */.c.Multiple && ((_item$question_choice2 = item.question_choices) === null || _item$question_choice2 === void 0 ? void 0 : _item$question_choice2.map(function (val, key) {
var _item$user_answer2;
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "pr20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "25px",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@ -4389,6 +4390,7 @@ var StudentEaxmPaper = function StudentEaxmPaper(_ref) {
children: (_item$question_choice3 = item.question_choices) === null || _item$question_choice3 === void 0 ? void 0 : _item$question_choice3.map(function (val, key) {
var _item$user_answer3;
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "pr20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: "25px",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@ -4600,6 +4602,7 @@ var StudentEaxmPaper = function StudentEaxmPaper(_ref) {
} finally {
_iterator.f();
}
console.log("newData:", newData);
if (newData !== null && newData !== void 0 && newData.length) return (_Array = new Array(Math.ceil((newData === null || newData === void 0 ? void 0 : newData.length) / step))) === null || _Array === void 0 || (_Array = _Array.fill([])) === null || _Array === void 0 || (_Array = _Array.map(function (item, key) {
return newData.slice(key * step, key * step + step);
})) === null || _Array === void 0 ? void 0 : _Array.map(function (i, k) {
@ -5853,21 +5856,25 @@ var ExeriseReview = function ExeriseReview(_ref) {
return dom;
};
var handleChangeProgress = (0,_react_17_0_2_react.useCallback)(function (pdf) {
var num = 0;
var setInt = setInterval(function () {
if (num == 100) {
var _exercise$exerciseExp, _exercise$exerciseExp2, _exercise$exerciseExp3, _reviewExercise$exerc11, _reviewExercise$exerc12, _reviewExercise$exerc13;
var title = "".concat(exercise !== null && exercise !== void 0 && (_exercise$exerciseExp = exercise.exerciseExportHeadData) !== null && _exercise$exerciseExp !== void 0 && _exercise$exerciseExp.student_id ? "".concat(exercise === null || exercise === void 0 || (_exercise$exerciseExp2 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp2 === void 0 ? void 0 : _exercise$exerciseExp2.student_id, "+") : "").concat(exercise === null || exercise === void 0 || (_exercise$exerciseExp3 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp3 === void 0 ? void 0 : _exercise$exerciseExp3.user) || "".concat((_reviewExercise$exerc11 = reviewExercise.exercise_answer_user) !== null && _reviewExercise$exerc11 !== void 0 && _reviewExercise$exerc11.student_id ? "".concat((_reviewExercise$exerc12 = reviewExercise.exercise_answer_user) === null || _reviewExercise$exerc12 === void 0 ? void 0 : _reviewExercise$exerc12.student_id, "+") : "").concat((_reviewExercise$exerc13 = reviewExercise.exercise_answer_user) === null || _reviewExercise$exerc13 === void 0 ? void 0 : _reviewExercise$exerc13.user_name);
pdf.save(title);
setIsEaxmPaperOpen(false);
setProgress(0);
clearInterval(setInt);
} else {
num += 10;
setProgress(num);
}
var _exercise$exerciseExp, _exercise$exerciseExp2, _exercise$exerciseExp3, _reviewExercise$exerc11, _reviewExercise$exerc12, _reviewExercise$exerc13;
setProgress(100);
var title = "".concat(exercise !== null && exercise !== void 0 && (_exercise$exerciseExp = exercise.exerciseExportHeadData) !== null && _exercise$exerciseExp !== void 0 && _exercise$exerciseExp.student_id ? "".concat(exercise === null || exercise === void 0 || (_exercise$exerciseExp2 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp2 === void 0 ? void 0 : _exercise$exerciseExp2.student_id, "+") : "").concat(exercise === null || exercise === void 0 || (_exercise$exerciseExp3 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp3 === void 0 ? void 0 : _exercise$exerciseExp3.user) || "".concat((_reviewExercise$exerc11 = reviewExercise.exercise_answer_user) !== null && _reviewExercise$exerc11 !== void 0 && _reviewExercise$exerc11.student_id ? "".concat((_reviewExercise$exerc12 = reviewExercise.exercise_answer_user) === null || _reviewExercise$exerc12 === void 0 ? void 0 : _reviewExercise$exerc12.student_id, "+") : "").concat((_reviewExercise$exerc13 = reviewExercise.exercise_answer_user) === null || _reviewExercise$exerc13 === void 0 ? void 0 : _reviewExercise$exerc13.user_name);
pdf.save(title);
setTimeout(function () {
return setProgress(0);
}, 100);
setIsEaxmPaperOpen(false);
}, [exercise, reviewExercise]);
var startRunProcess = function startRunProcess() {
var num = 0;
var runTime = setInterval(function () {
num += 5;
setProgress(num);
if (num === 100) {
clearInterval(runTime);
}
}, 200);
};
var handleAnalysisCent = (0,_react_17_0_2_react.useCallback)(function (e) {
return setAnalysisCent(e.target.value);
}, []);
@ -6570,6 +6577,7 @@ var ExeriseReview = function ExeriseReview(_ref) {
message/* default */.ZP.info('请选择一种导出格式');
return;
} else if (exportType == 'pdf') {
startRunProcess();
setExportDate({
type: "",
userCommentVisible: checkcomment,

@ -9085,7 +9085,7 @@ function MyProblem_reducer(state, action) {
return (0,service/* sumbitCode */.bM)(id, submitCodeParams);
case 21:
res = _context11.sent;
if (!(res.status === -1)) {
if (!(res.status === -1 && searchParams.get("exercisesId"))) {
_context11.next = 25;
break;
}
@ -9230,7 +9230,7 @@ function MyProblem_reducer(state, action) {
return (0,service/* debugCode */.MU)(id, submitCodeParams);
case 14:
res = _context13.sent;
if (!(res.status === -1)) {
if (!(res.status === -1 && searchParams.get("exercisesId"))) {
_context13.next = 18;
break;
}

Loading…
Cancel
Save