-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from se-curriculum-design-group/master
同步源
- Loading branch information
Showing
68 changed files
with
26,587 additions
and
917 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from courseSelection.models import CourseSelected as courseSelected | ||
from courseScheduling.models import Schedule_result, Teacher_Schedule_result | ||
from courseScheduling.Schedule import year as Schedule_year | ||
from courseScheduling.Schedule import semester as Schedule_semester | ||
year = Schedule_year | ||
semester = Schedule_semester | ||
def Sychronize_with_courseSelected(): | ||
rows_in_Schedule_result = Schedule_result.objects.filter(tno__mcno__year=year, tno__mcno__semester=semester) | ||
for element in rows_in_Schedule_result: | ||
if len(courseSelected.objects.filter( | ||
cno__where=element.where, | ||
cno__time=element.time, | ||
cno__tno=element.tno, | ||
sno=element.sno, | ||
)) == 0: | ||
Tsr = Teacher_Schedule_result.objects.get(tno=element.tno, where=element.where, time=element.time) | ||
courseSelected.objects.create(sno=element.sno, cno=Tsr, score=0, common_score=0, final_score=0).save() | ||
|
||
if __name__ == '__main__': | ||
Sychronize_with_courseSelected() | ||
|
Binary file removed
BIN
-189 Bytes
EMS/courseScheduling/__pycache__/__init__.cpython-36.pyc~Stashed changes
Binary file not shown.
Binary file removed
BIN
-230 Bytes
EMS/courseScheduling/__pycache__/admin.cpython-36.pyc~Stashed changes
Binary file not shown.
Binary file removed
BIN
-227 Bytes
EMS/courseScheduling/__pycache__/models.cpython-36.pyc~Stashed changes
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by Django 2.1.3 on 2019-05-13 07:39 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('backstage', '__first__'), | ||
('scoreManagement', '0001_initial'), | ||
('courseSelection', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='teacher_schedule_result', | ||
name='tno', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scoreManagement.Teaching'), | ||
), | ||
migrations.AddField( | ||
model_name='courseselected', | ||
name='cno', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courseSelection.Teacher_Schedule_result'), | ||
), | ||
migrations.AddField( | ||
model_name='courseselected', | ||
name='sno', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backstage.Student'), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='teacher_schedule_result', | ||
unique_together={('tno', 'time')}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.