|
@@ -46,7 +46,7 @@ class ClassService extends CrudService {
|
|
|
|
|
|
const beforestu = _.take(studentids, stunum);
|
|
|
|
|
|
- await this.studentup(_class.id, _class.type, _class.batchid, beforestu);
|
|
|
+ await this.studentup(_class.id, _class.batchid, beforestu);
|
|
|
|
|
|
await this.groupcreate(termid, _class.batchid, _class.id);
|
|
|
|
|
@@ -87,16 +87,14 @@ class ClassService extends CrudService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- async studentup(classid, type, batchid, beforestu) {
|
|
|
+ async studentup(classid, batchid, beforestu) {
|
|
|
|
|
|
for (const stuid of beforestu) {
|
|
|
const student = await this.stumodel.findById(stuid);
|
|
|
if (student) {
|
|
|
- if (type === student.type) {
|
|
|
- student.classid = classid;
|
|
|
- student.batchid = batchid;
|
|
|
- await student.save();
|
|
|
- }
|
|
|
+ student.classid = classid;
|
|
|
+ student.batchid = batchid;
|
|
|
+ await student.save();
|
|
|
}
|
|
|
}
|
|
|
}
|