diff --git a/modules/admin.js b/modules/admin.js index 0f0b49f..0505b7b 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -354,7 +354,8 @@ app.post('/admin/rejudge', async (req, res) => { }; if (req.body.language) { - if (req.body.language === 'submit-answer') where.language = ''; + if (req.body.language === 'submit-answer') where.language = { $or: [{ $eq: '', }, { $eq: null }] }; + else if (req.body.language === 'non-submit-answer') where.language = { $not: '' }; else where.language = req.body.language; } if (req.body.status) where.status = { $like: req.body.status + '%' }; diff --git a/modules/submission.js b/modules/submission.js index 3a64702..1a1fe5b 100644 --- a/modules/submission.js +++ b/modules/submission.js @@ -63,7 +63,8 @@ app.get('/submissions', async (req, res) => { } if (req.query.language) { - if (req.query.language === 'submit-answer') where.language = ''; + if (req.query.language === 'submit-answer') where.language = { $or: [{ $eq: '', }, { $eq: null }] }; + else if (req.query.language === 'non-submit-answer') where.language = { $not: '' }; else where.language = req.query.language; } if (req.query.status) where.status = { $like: req.query.status + '%' }; diff --git a/views/admin_rejudge.ejs b/views/admin_rejudge.ejs index 4e68204..ed5b8d2 100644 --- a/views/admin_rejudge.ejs +++ b/views/admin_rejudge.ejs @@ -17,10 +17,11 @@
@@ -32,10 +33,10 @@
diff --git a/views/submissions.ejs b/views/submissions.ejs index 9d37ffe..c015c0a 100644 --- a/views/submissions.ejs +++ b/views/submissions.ejs @@ -38,6 +38,7 @@