Bläddra i källkod

学生提交作业答案显示方式完善

tags/正式3.10.0
雍文秀 1 år sedan
förälder
incheckning
1f2096fad3

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java Visa fil

@@ -352,7 +352,7 @@ public class PaperStudentService {
352 352
 
353 353
             //答案显示方式:1作业截至时间,2提交后显示
354 354
             Integer showanswer = 0;
355
-            if (pg.getShowtype() == 2) {
355
+            if (pg.getShowtype() == 2 || paperStudentBean.getPsstate() == 2) {
356 356
                 showanswer = 1;
357 357
             }
358 358
             paperStudentBean.setShowanswer(showanswer);
@@ -726,7 +726,7 @@ public class PaperStudentService {
726 726
 
727 727
             //答案显示方式:1作业截至时间,2提交后显示
728 728
             Integer showanswer = 0;
729
-            if (pg.getShowtype() == 2) {
729
+            if (pg.getShowtype() == 2 || paperStudentBean.getPsstate() == 2) {
730 730
                 showanswer = 1;
731 731
             }
732 732
             paperStudentBean.setShowanswer(showanswer);

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java Visa fil

@@ -304,7 +304,7 @@ public class PaperStudentWebService {
304 304
             ps.setPschecked(pschecked);
305 305
             ps.setCosttime(paper.getCosttime());
306 306
             Integer showanswer = 0;
307
-            if (pg.getShowtype() == 2){
307
+            if (pg.getShowtype() == 2 || ps.getPsstate() == 2){
308 308
                 showanswer = 1;
309 309
             }
310 310
             ps.setShowanswer(showanswer);
@@ -488,7 +488,7 @@ public class PaperStudentWebService {
488 488
             ps.setPschecked(pschecked);
489 489
             ps.setCosttime(paper.getCosttime());
490 490
             Integer showanswer = 0;
491
-            if (pg.getShowtype() == 2){
491
+            if (pg.getShowtype() == 2 || ps.getPsstate() == 2){
492 492
                 showanswer = 1;
493 493
             }
494 494
             ps.setShowanswer(showanswer);

Laddar…
Avbryt
Spara