Last active
October 25, 2022 04:02
-
-
Save tiptopcoder/71ce8d7a7ae46f8c2659 to your computer and use it in GitHub Desktop.
Đánh giá môn học - Dùng cho portal của HCMUS - ĐH KHTN TP.HCM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* [...] | |
* This script is not optimized. It's to kind to tell me if you have any better ideas. | |
* Script van chua hoan thien. Toi rat cam on neu ban co the cho toi cac y tuong khac | |
* | |
* @author Hong Trang D. Nguyen | |
* @version 1.00 | |
* @since 01/01/2016 | |
* @credits Quy Hoa L. Huynh, Ngoc Tien Nhan | |
* | |
*/ | |
$('.dataTable tbody tr').each(function(j) { | |
setTimeout(function () | |
{ | |
$('.dataTable tbody tr').find('a').eq(j).trigger('click'); | |
try{ | |
jQuery('.question-rankings').each(function(){ | |
var choices = $(this).find('input'); | |
var index = Math.floor(Math.random() * 3 + 1) + 1; | |
choices.get(index).checked = true; | |
}); | |
jQuery('.question-answers').each(function(){ | |
var choices = $(this).find('input:radio'); | |
var index = Math.floor(Math.random() * 2 + 2); | |
choices.get(index).checked = true; | |
}); | |
} | |
catch(e){ | |
var data =''; | |
do{ | |
data = prompt('Nhập 1-Lý thuyết ; 2-Thực tập; 3-Cả 2'); | |
}while((data != '1' && data != '2' && data != '3') || data == ''); | |
switch(data) | |
{ | |
case '1': $('#72057594046514109_72057594046514110').attr('checked',true); break; | |
case '2': $('#72057594046514109_72057594046514111').attr('checked',true); break; | |
case '3': | |
{ | |
$('#72057594046514109_72057594046514110').attr('checked',true); | |
$('#72057594046514109_72057594046514111').attr('checked',true); | |
}break; | |
} | |
var tenGV = $('#spGiangVien').text(); | |
if(tenGV === ""){ | |
tenGV = prompt('Nhap ten GV'); | |
$('#72057594046514112').text(tenGV); | |
} | |
else{ | |
$('#72057594046514112').text(tenGV); | |
} | |
var i = ''; | |
for( i = 0 ; i < 5 ; i++ ){ | |
$('#bzFtGv2q7Mnup2tMo9oMs').trigger('click'); | |
} | |
$('#btnSave').trigger('click'); | |
$('#btnBackToList').trigger('click'); | |
} | |
},j*6000);/*Edit this number to make longer waiting time - Sua so nay de tang thoi gian cho*/ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment