|
|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
|