update font
All checks were successful
Deploy to Production / deploy (push) Successful in 7s

This commit is contained in:
Đặng Minh Quang
2026-02-27 10:18:21 +07:00
parent 07a2e6febb
commit dd99d71216
6 changed files with 17 additions and 6 deletions

View File

@@ -26020,10 +26020,10 @@ cr.getObjectRefTable = function () { return [
cr.plugins_.Audio,
cr.plugins_.Browser,
cr.plugins_.Function,
cr.plugins_.SenaPlugin,
cr.plugins_.Sprite,
cr.plugins_.Text,
cr.plugins_.SenaPlugin,
cr.plugins_.Touch,
cr.plugins_.Text,
cr.behaviors.Rex_MoveTo,
cr.behaviors.Fade,
cr.behaviors.DragnDrop,

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
{
"version": 1772102471,
"version": 1772162120,
"fileList": [
"data.js",
"c2runtime.js",
@@ -39,7 +39,6 @@
"icon-128.png",
"icon-256.png",
"loading-logo.png",
"bg.mp4",
"sena_sdk.js"
]
}

View File

@@ -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.