| xqd
@@ -127,7 +127,7 @@ class Studyplan extends AuthController{
|
|
|
['ExaminationRecord er', 'er.test_id = r.relation_id and er.uid = ' . $this->uid, 'left'],
|
|
|
];
|
|
|
$examlist = Relation::alias('r')->where('r.relationship_id', $v1['id'])->where('r.relationship', 2)
|
|
|
- ->field('r.relation_id as test_id, er.score')->join($join)->select();
|
|
|
+ ->field('r.relation_id as test_id, MAX(er.score) as score')->join($join)->group('r.relation_id')->select();
|
|
|
if ($examlist) {
|
|
|
foreach ($examlist as $item) {
|
|
|
if ($item['score'] < 60) {
|