update font and fix timer bug
All checks were successful
Deploy to Production / deploy (push) Successful in 5s
All checks were successful
Deploy to Production / deploy (push) Successful in 5s
This commit is contained in:
@@ -26497,14 +26497,14 @@ cr.behaviors.lunarray_Tween = function(runtime)
|
||||
};
|
||||
}());
|
||||
cr.getObjectRefTable = function () { return [
|
||||
cr.plugins_.SenaPlugin,
|
||||
cr.plugins_.Text,
|
||||
cr.plugins_.Touch,
|
||||
cr.plugins_.Sprite,
|
||||
cr.plugins_.Audio,
|
||||
cr.plugins_.Browser,
|
||||
cr.plugins_.JSON,
|
||||
cr.plugins_.Function,
|
||||
cr.plugins_.SenaPlugin,
|
||||
cr.plugins_.Sprite,
|
||||
cr.plugins_.Text,
|
||||
cr.plugins_.Touch,
|
||||
cr.behaviors.Rex_MoveTo,
|
||||
cr.behaviors.Fade,
|
||||
cr.behaviors.DragnDrop,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": 1772105808,
|
||||
"version": 1772161587,
|
||||
"fileList": [
|
||||
"data.js",
|
||||
"c2runtime.js",
|
||||
|
||||
@@ -50,6 +50,7 @@ function SenaSDK(gid = "G2510S1T30") {
|
||||
// 'preview' - Timeout 5s rồi fallback sample (testing với data thật)
|
||||
// 'dev' - Load sample ngay lập tức (development)
|
||||
this.mode = "preview"; // Default mode
|
||||
this.role = "student"; // Default role
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,9 +374,15 @@ SenaSDK.prototype.load = function (callback, template = "G2510S1T30") {
|
||||
self.mode = urlMode.toLowerCase();
|
||||
}
|
||||
|
||||
// THÊM 2 DÒNG NÀY: Lấy role từ URL
|
||||
const urlRole = urlParams.get("role");
|
||||
if (urlRole) self.role = urlRole.toLowerCase();
|
||||
|
||||
console.log(
|
||||
"🎮 Sena SDK: Mode =",
|
||||
self.mode.toUpperCase(),
|
||||
"| Role =",
|
||||
self.role || "student",
|
||||
"| GameCode =",
|
||||
self.gameCode,
|
||||
);
|
||||
@@ -1171,7 +1178,12 @@ SenaSDK.prototype.end = function (answer, callback) {
|
||||
// -----------------------------------------------------------
|
||||
// [BƯỚC 1] Kiểm tra Time Limit TRƯỚC (Sửa biến isCorrect)
|
||||
// -----------------------------------------------------------
|
||||
if (self.timeLimit > 0 && duration > self.timeLimit) {
|
||||
// THÊM ĐIỀU KIỆN: Nếu là teacher thì bỏ qua kiểm tra thời gian
|
||||
if (
|
||||
self.role !== "teacher" &&
|
||||
self.timeLimit > 0 &&
|
||||
duration > self.timeLimit
|
||||
) {
|
||||
isCorrect = false; // CHỈ sửa biến boolean, KHÔNG gọi result.isCorrect
|
||||
console.log("🎮 Sena SDK: Time Limit Exceeded -> Result set to False");
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user