dev_forum
hjm 5 years ago
parent b95c8b17cb
commit e112369ff1

@ -154,11 +154,13 @@ function checkIfLoaded (callback) {
const mirror2LanguageMap = { const mirror2LanguageMap = {
'JFinal': 'java', 'JFinal': 'java',
'Java': 'java', 'Java': 'java',
'JavaWeb': 'java',
'Kotlin': 'java', 'Kotlin': 'java',
'Html': 'html', 'Html': 'html',
'Css': 'css', 'Css': 'css',
'Javascript': 'javascript', 'Javascript': 'javascript',
'JavaScript': 'javascript',
'C/C++': 'cpp', 'C/C++': 'cpp',
'MachineLearning': 'python', 'MachineLearning': 'python',
@ -173,6 +175,7 @@ function getLanguageByMirrorName(mirror_name) {
let lang = 'javascript' let lang = 'javascript'
if (mirror_name && mirror_name.length) { if (mirror_name && mirror_name.length) {
// 需要倒着遍历, html、css的实训主评测语言环境是python小类别是html或css // 需要倒着遍历, html、css的实训主评测语言环境是python小类别是html或css
// TODO http://localhost:3007/tasks/hmcwa3g8typ5?debug=t ["Python3.6", "VNC", "Html"]
for (let i = mirror_name.length - 1; i >= 0; i--) { for (let i = mirror_name.length - 1; i >= 0; i--) {
let languageVal = mirror2LanguageMap[mirror_name[i]]; let languageVal = mirror2LanguageMap[mirror_name[i]];
if (languageVal) { if (languageVal) {

Loading…
Cancel
Save