autoUpdataFile

dev_local_v9_xiangtandaxue
eduauto 2 years ago
parent 2863b42ed9
commit a5ea41db64

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -6262,29 +6262,29 @@ var SendToClassModal = function SendToClassModal(_ref) {
res = _context7.sent;
case 6:
_context7.t0 = nodeData.item_type;
_context7.next = _context7.t0 === 'Attachment' ? 9 : _context7.t0 === 'VideoItem' ? 13 : _context7.t0 === 'SubjectHomework' ? 15 : _context7.t0 === 'Shixun' ? 17 : 19;
_context7.next = _context7.t0 === 'Attachment' ? 9 : _context7.t0 === 'VideoItem' ? 11 : _context7.t0 === 'SubjectHomework' ? 13 : _context7.t0 === 'Shixun' ? 15 : 17;
break;
case 9:
// openNewWindow(nodeData.url);
preview.type = item.file_type;
preview.data = env/* default */.Z.API_SERVER + item.url;
setPreview(objectSpread2_default()({}, preview));
// toStudentVideo(item);
return _context7.abrupt("break", 19);
case 13:
// openNewWindow(nodeData.url);
// preview.type = item.file_type
// preview.data = env.API_SERVER + item.url
// setPreview({ ...preview })
toStudentVideo(item);
return _context7.abrupt("break", 17);
case 11:
toStudentVideo(nodeData);
return _context7.abrupt("break", 19);
case 15:
return _context7.abrupt("break", 17);
case 13:
if (nodeData.homework_type == 'group') {
toStudentVideo(nodeData);
} else if (nodeData.homework_type == 'normal') {
toStudentVideo(nodeData);
}
return _context7.abrupt("break", 19);
case 17:
return _context7.abrupt("break", 17);
case 15:
handleToShixun(nodeData);
return _context7.abrupt("break", 19);
case 19:
return _context7.abrupt("break", 17);
case 17:
case "end":
return _context7.stop();
}

File diff suppressed because it is too large Load Diff

@ -1,28 +1,28 @@
document.body.parentNode.id = "educoder";
var iframe = document.createElement('iframe');
if (
document.domain === 'www.tokcoder.com' ||
document.domain === 'tokcoder.com'
) {
iframe.src = 'https://www.educoder.net/autologin.html?t=' + Date.now();
} else {
iframe.src = 'https://www.tokcoder.com/autologin.html?t=' + Date.now();
}
iframe.sandbox =
'allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation';
iframe.allow = 'geolocation document-domain';
iframe.style.position = 'absolute';
iframe.style.top = '-1000px';
iframe.style.opacity = 0;
iframe.style.visibility = 'hidden';
iframe.style.zIndex = -1;
document.body.appendChild(iframe);
iframe.onload = function() {
iframe.contentWindow.postMessage(
{ type: 'cookie', data: document.cookie },
'*',
);
};
// var iframe = document.createElement('iframe');
// if (
// document.domain === 'www.tokcoder.com' ||
// document.domain === 'tokcoder.com'
// ) {
// iframe.src = 'https://www.educoder.net/autologin.html?t=' + Date.now();
// } else {
// iframe.src = 'https://www.tokcoder.com/autologin.html?t=' + Date.now();
// }
// iframe.sandbox =
// 'allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation';
// iframe.allow = 'geolocation document-domain';
// iframe.style.position = 'absolute';
// iframe.style.top = '-1000px';
// iframe.style.opacity = 0;
// iframe.style.visibility = 'hidden';
// iframe.style.zIndex = -1;
// document.body.appendChild(iframe);
// iframe.onload = function() {
// iframe.contentWindow.postMessage(
// { type: 'cookie', data: document.cookie },
// '*',
// );
// };
window.gtag = new Function;

@ -208,7 +208,7 @@ var PublishShixun = function PublishShixun(_ref) {
id = (res === null || res === void 0 ? void 0 : res.category_id) || 0;
urlList = (_location$pathname = location.pathname) === null || _location$pathname === void 0 ? void 0 : _location$pathname.split('/');
urlList[4] = id;
urlList[3] = type || urlList[3];
urlList[3] = (type === 'hack' ? 'program_homework' : type) || urlList[3];
url = urlList === null || urlList === void 0 ? void 0 : urlList.join('/');
_umi_production_exports.history.push(url);
if (actionTabs.cb) {

@ -1095,7 +1095,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
(0,_react_17_0_2_react.useEffect)(function () {
dispatch({
type: 'classroomList/getCourseGroupsList',
payload: objectSpread2_default()({}, params)
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
nonenavigate: true
})
});
}, [params['categoryId']]);
(0,_react_17_0_2_react.useEffect)(function () {
@ -1113,7 +1115,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
params.limit = pageSize;
dispatch({
type: 'classroomList/getCourseGroupsList',
payload: objectSpread2_default()({}, params)
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
nonenavigate: true
})
});
};
var onMenuSelect = function onMenuSelect(v) {
@ -1161,7 +1165,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
message/* default */.ZP.success('操作成功');
dispatch({
type: 'classroomList/getCourseGroupsList',
payload: objectSpread2_default()({}, params)
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
nonenavigate: true
})
});
}
case 4:
@ -1406,7 +1412,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
if (data.status === 0) {
dispatch({
type: 'classroomList/getCourseGroupsList',
payload: objectSpread2_default()({}, params)
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
nonenavigate: true
})
});
}
case 4:
@ -1513,7 +1521,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) {
params.page = 1;
dispatch({
type: 'classroomList/getCourseGroupsList',
payload: objectSpread2_default()({}, params)
payload: objectSpread2_default()(objectSpread2_default()({}, params), {}, {
nonenavigate: true
})
});
},
style: {

@ -4371,7 +4371,9 @@ var Shixun = function Shixun(_ref) {
var _item$shixun_details3;
var shixunItem = item === null || item === void 0 ? void 0 : item.shixun_details[i].stage_list[j];
shixun.push(objectSpread2_default()(objectSpread2_default()({}, shixunItem), {
operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier
operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier,
is_jupyter: item === null || item === void 0 ? void 0 : item.is_jupyter,
is_jupyter_lab: item === null || item === void 0 ? void 0 : item.is_jupyter_lab
}));
}
if (item !== null && item !== void 0 && (_item$shixun_details4 = item.shixun_details) !== null && _item$shixun_details4 !== void 0 && (_item$shixun_details4 = _item$shixun_details4[i]) !== null && _item$shixun_details4 !== void 0 && _item$shixun_details4.shixun_detail) {
@ -4492,7 +4494,7 @@ var Shixun = function Shixun(_ref) {
key: "operation",
align: 'center',
render: function render(value, data, index) {
return value ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, {
return value && !data.is_jupyter && !data.is_jupyter_lab ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, {
affix: false,
className: "mt10",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z.Link, {
@ -6282,19 +6284,23 @@ var Answer = function Answer(_ref) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return (0,shixuns/* execShixun */.Ir)({
return (item.is_jupyter || item.is_jupyter_lab ? shixuns/* execJupyter */.BK : shixuns/* execShixun */.Ir)({
id: item.shixun_identifier
});
case 2:
res = _context12.sent;
if (res !== null && res !== void 0 && res.game_identifier) {
setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || ""));
if (res !== null && res !== void 0 && res.game_identifier || res !== null && res !== void 0 && res.identifier) {
if (item.is_jupyter_lab || item.is_jupyter) {
setIframeUrl("/tasks/".concat(res.identifier, "/jupyter?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || ""));
} else {
setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || ""));
}
setIframeBlock("block");
}
if ((res === null || res === void 0 ? void 0 : res.status) === -3) {
(0,util/* bindPhone */.eF)();
} else if ((res === null || res === void 0 ? void 0 : res.status) === 2) {
handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id);
handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id, item.is_jupyter_lab, item.is_jupyter);
} else if ((res === null || res === void 0 ? void 0 : res.status) === 3) {
handleInBeta(res === null || res === void 0 ? void 0 : res.message);
}
@ -6308,7 +6314,7 @@ var Answer = function Answer(_ref) {
return _ref11.apply(this, arguments);
};
}();
var handleResetGame = function handleResetGame(url, question_id) {
var handleResetGame = function handleResetGame(url, question_id, is_jupyter_lab, is_jupyter) {
var _url;
url = (_url = url) !== null && _url !== void 0 && _url.includes('.json') ? url : "".concat(url, ".json");
es_modal/* default */.Z.confirm({
@ -6351,13 +6357,15 @@ var Answer = function Answer(_ref) {
}
goShixun({
shixun_identifier: execRes === null || execRes === void 0 ? void 0 : execRes.game_identifier,
question_id: question_id
question_id: question_id,
is_jupyter_lab: is_jupyter_lab,
is_jupyter: is_jupyter
});
// openNewWindow(`/tasks/${execRes.game_identifier}`);
return _context13.abrupt("return");
case 12:
if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 2) {
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id);
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id, is_jupyter_lab, is_jupyter);
} else if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 3) {
handleInBeta(execRes === null || execRes === void 0 ? void 0 : execRes.message);
}

@ -17200,7 +17200,7 @@ var PropertySettings_PublishSettings = function PublishSettings(_ref) {
//公开统计
open_total_score: false,
// 查看总成绩
open_score_reviewed: false,
open_score_reviewed: true,
//试卷评阅完成后
open_score: false,
//查看小题得分
@ -17306,8 +17306,12 @@ var PropertySettings_PublishSettings = function PublishSettings(_ref) {
disabled: disabled,
onChange: function onChange(e) {
data.open_total_score = e.target.checked;
if (e.target.checked === false) {
data.open_score = e.target.checked;
if (e.target.checked) {
data.open_score = false;
data.open_score_reviewed = true;
} else {
data.open_score = true;
data.open_score_reviewed = false;
}
setData(Object.assign({}, data));
},

@ -3432,7 +3432,10 @@ var Shixun = function Shixun(_ref) {
key: "operation",
align: 'center',
render: function render(value, data, index) {
return value ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, {
return item.is_jupyter_lab || item.is_jupyter ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-grey-999",
children: "--"
}) : value ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, {
affix: false,
className: "mt10",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z.Link, {
@ -4223,19 +4226,23 @@ var Answer = function Answer(_ref) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return (0,shixuns/* execShixun */.Ir)({
return (item.is_jupyter || item.is_jupyter_lab ? shixuns/* execJupyter */.BK : shixuns/* execShixun */.Ir)({
id: item.shixun_identifier
});
case 2:
res = _context4.sent;
if (res !== null && res !== void 0 && res.game_identifier) {
setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id));
if (res !== null && res !== void 0 && res.game_identifier || res !== null && res !== void 0 && res.identifier) {
if (item.is_jupyter_lab || item.is_jupyter) {
setIframeUrl("/tasks/".concat(res.identifier, "/jupyter?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=coursesId&login=").concat(params.login, "&questionId=").concat(item.question_id));
} else {
setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id));
}
setIframeBlock("block");
}
if ((res === null || res === void 0 ? void 0 : res.status) === -3) {
(0,util/* bindPhone */.eF)();
} else if ((res === null || res === void 0 ? void 0 : res.status) === 2) {
handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id);
handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id, item.is_jupyter_lab, item.is_jupyter);
} else if ((res === null || res === void 0 ? void 0 : res.status) === 3) {
handleInBeta(res === null || res === void 0 ? void 0 : res.message);
}
@ -4249,7 +4256,7 @@ var Answer = function Answer(_ref) {
return _ref4.apply(this, arguments);
};
}();
var handleResetGame = function handleResetGame(url, question_id) {
var handleResetGame = function handleResetGame(url, question_id, is_jupyter_lab, is_jupyter) {
var _url;
url = (_url = url) !== null && _url !== void 0 && _url.includes('.json') ? url : "".concat(url, ".json");
es_modal/* default */.Z.confirm({
@ -4292,12 +4299,14 @@ var Answer = function Answer(_ref) {
}
goShixun({
shixun_identifier: execRes === null || execRes === void 0 ? void 0 : execRes.game_identifier,
question_id: question_id
question_id: question_id,
is_jupyter_lab: is_jupyter_lab,
is_jupyter: is_jupyter
});
return _context5.abrupt("return");
case 12:
if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 2) {
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id);
handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id, is_jupyter_lab, is_jupyter);
} else if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 3) {
handleInBeta(execRes === null || execRes === void 0 ? void 0 : execRes.message);
}

@ -1719,7 +1719,9 @@ var Shixun = function Shixun(_ref) {
var shixunItem = item === null || item === void 0 ? void 0 : item.shixun_details[i].stage_list[j];
shixun.push(objectSpread2_default()(objectSpread2_default()({}, shixunItem), {
operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier,
shixun_challenge_id: item === null || item === void 0 || (_item$shixun_details$ = item.shixun_details[i]) === null || _item$shixun_details$ === void 0 ? void 0 : _item$shixun_details$.shixun_challenge_id
shixun_challenge_id: item === null || item === void 0 || (_item$shixun_details$ = item.shixun_details[i]) === null || _item$shixun_details$ === void 0 ? void 0 : _item$shixun_details$.shixun_challenge_id,
is_jupyter: item === null || item === void 0 ? void 0 : item.is_jupyter,
is_jupyter_lab: item === null || item === void 0 ? void 0 : item.is_jupyter_lab
}));
}
if (item !== null && item !== void 0 && (_item$shixun_details4 = item.shixun_details) !== null && _item$shixun_details4 !== void 0 && (_item$shixun_details4 = _item$shixun_details4[i]) !== null && _item$shixun_details4 !== void 0 && _item$shixun_details4.shixun_detail) {
@ -1747,7 +1749,7 @@ var Shixun = function Shixun(_ref) {
render: function render(name, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: name,
children: !!record.operation ? /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
children: !!record.operation && !record.is_jupyter && !record.is_jupyter_lab ? /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, {
target: "_blank",
style: {
maxWidth: "400px"
@ -2056,7 +2058,7 @@ var Shixun = function Shixun(_ref) {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font16 mr15",
children: [" \u7B2C", chanllenge.position, "\u5173"]
}), chanllenge.game_identifier ? /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
}), chanllenge.game_identifier && !(item !== null && item !== void 0 && item.is_jupyter_lab) && !(item !== null && item !== void 0 && item.is_jupyter) ? /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
target: "_blank",
className: "current c-light-primary font16",
to: "/tasks/".concat(coursesId, "/").concat(exerciseId, "/").concat(chanllenge.game_identifier, "/exercise"),

@ -8704,11 +8704,11 @@ var informationPage = function informationPage(_ref) {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
width: '32%'
width: '34%'
},
children: "https://www.educoder.net/competitions/"
children: [window.location.origin, "/competitions/detail/"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "topLeft",
color: "#fb3226",
@ -12761,7 +12761,7 @@ var documentPage = function documentPage(_ref) {
setquestion_finish(res === null || res === void 0 ? void 0 : res.question_finish);
setname_show(res === null || res === void 0 || (_res$competition = res.competition) === null || _res$competition === void 0 ? void 0 : _res$competition.name);
settime_show(dayjs_min_default()(res === null || res === void 0 || (_res$competition2 = res.competition) === null || _res$competition2 === void 0 ? void 0 : _res$competition2.start_time).format('YYYY-MM-DD HH:mm') + ' ~ ' + dayjs_min_default()(res === null || res === void 0 || (_res$competition3 = res.competition) === null || _res$competition3 === void 0 ? void 0 : _res$competition3.end_time).format('YYYY-MM-DD HH:mm'));
seturl_show('https://www.educoder.net/competitions/' + (res === null || res === void 0 ? void 0 : res.identifier) + '/edit');
seturl_show("".concat(window.location.origin, "/competitions/detail/") + (res === null || res === void 0 ? void 0 : res.identifier));
var obj = '';
for (var i in res === null || res === void 0 ? void 0 : res.data) {
if (Number(i) == Number((res === null || res === void 0 ? void 0 : res.data.length) - 1)) {
@ -12806,7 +12806,7 @@ var documentPage = function documentPage(_ref) {
//如果要保留文本格式,比如保留换行符,或者多行文本,可以使用 textarea 标签,再配和模板字符串 ` `
//const input = document.createElement('textarea')
// 将想要复制的值
input.value = 'https://www.educoder.net/competitions/' + form.getFieldValue('identifier');
input.value = "".concat(window.location.origin, "/competitions/detail/") + form.getFieldValue('identifier');
// 页面底部追加输入框
document.body.appendChild(input);
// 选中输入框
@ -13001,7 +13001,7 @@ var documentPage = function documentPage(_ref) {
colon: false,
name: "identifier",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
prefix: "https://www.educoder.net/competitions/",
prefix: "".concat(window.location.origin, "/competitions/detail/"),
disabled: true,
className: documentmodules.form_item_item
})

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

700
umi.js

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save