1
- # SPDX-License-Identifier: Apache-2.0
1
+ # SPDX-License-Identifier: Apache-2.0
2
2
# Licensed to the Ed-Fi Alliance under one or more agreements.
3
3
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
4
4
# See the LICENSE and NOTICES files in the project root for more information.
7
7
8
8
from edfi_performance_test .api .client .ed_fi_api_client import EdFiAPIClient
9
9
from edfi_performance_test .api .client .assessment import LearningObjectiveClient
10
+ from edfi_performance_test .api .client .assessment import AssessmentClient
10
11
from edfi_performance_test .api .client .competency_objective import (
11
12
CompetencyObjectiveClient ,
12
13
)
@@ -453,6 +454,9 @@ class StudentCompetencyObjectiveClient(EdFiAPIClient):
453
454
}
454
455
455
456
def create_with_dependencies (self , ** kwargs ):
457
+ # Prepopulated student
458
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
459
+
456
460
# Create grading period
457
461
period_reference = self .grading_period_client .create_with_dependencies ()
458
462
@@ -473,16 +477,36 @@ def create_with_dependencies(self, **kwargs):
473
477
objectiveCompetencyObjectiveReference__objective = objective_reference [
474
478
"attributes"
475
479
]["objective" ],
480
+ studentReference__studentUniqueId = studentUniqueId ,
476
481
)
477
482
478
483
479
484
class StudentCTEProgramAssociationClient (EdFiAPIClient ):
480
485
endpoint = "studentCTEProgramAssociations"
481
486
487
+ def create_with_dependencies (self , ** kwargs ):
488
+ # Prepopulated student
489
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
490
+
491
+ return self .create_using_dependencies (
492
+ studentReference__studentUniqueId = studentUniqueId ,
493
+ ** kwargs
494
+ )
495
+
482
496
483
497
class StudentEducationOrganizationResponsibilityAssociationClient (EdFiAPIClient ):
484
498
endpoint = "studentEducationOrganizationResponsibilityAssociations"
485
499
500
+ def create_with_dependencies (self , ** kwargs ):
501
+ # Prepopulated student
502
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
503
+
504
+ # Create student academic record
505
+ return self .create_using_dependencies (
506
+ studentReference__studentUniqueId = studentUniqueId ,
507
+ ** kwargs
508
+ )
509
+
486
510
487
511
class StudentGradebookEntryClient (EdFiAPIClient ):
488
512
endpoint = "studentGradebookEntries"
@@ -551,6 +575,16 @@ def delete_with_dependencies(self, reference, **kwargs):
551
575
class StudentHomelessProgramAssociationClient (EdFiAPIClient ):
552
576
endpoint = "studentHomelessProgramAssociations"
553
577
578
+ def create_with_dependencies (self , ** kwargs ):
579
+ # Prepopulated student
580
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
581
+
582
+ # Create student academic record
583
+ return self .create_using_dependencies (
584
+ studentReference__studentUniqueId = studentUniqueId ,
585
+ ** kwargs
586
+ )
587
+
554
588
555
589
class StudentInterventionAssociationClient (EdFiAPIClient ):
556
590
endpoint = "studentInterventionAssociations"
@@ -560,6 +594,9 @@ class StudentInterventionAssociationClient(EdFiAPIClient):
560
594
}
561
595
562
596
def create_with_dependencies (self , ** kwargs ):
597
+ # Prepopulated student
598
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
599
+
563
600
intervention_reference = self .intervention_client .create_with_dependencies ()
564
601
565
602
return self .create_using_dependencies (
@@ -569,6 +606,7 @@ def create_with_dependencies(self, **kwargs):
569
606
][
570
607
"interventionIdentificationCode"
571
608
],
609
+ studentReference__studentUniqueId = studentUniqueId ,
572
610
** kwargs
573
611
)
574
612
@@ -581,6 +619,9 @@ class StudentInterventionAttendanceEventClient(EdFiAPIClient):
581
619
}
582
620
583
621
def create_with_dependencies (self , ** kwargs ):
622
+ # Prepopulated student
623
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
624
+
584
625
intervention_reference = self .intervention_client .create_with_dependencies ()
585
626
586
627
return self .create_using_dependencies (
@@ -590,13 +631,24 @@ def create_with_dependencies(self, **kwargs):
590
631
][
591
632
"interventionIdentificationCode"
592
633
],
634
+ studentReference__studentUniqueId = studentUniqueId ,
593
635
** kwargs
594
636
)
595
637
596
638
597
639
class StudentLanguageInstructionProgramAssociationClient (EdFiAPIClient ):
598
640
endpoint = "studentLanguageInstructionProgramAssociations"
599
641
642
+ def create_with_dependencies (self , ** kwargs ):
643
+ # Prepopulated student
644
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
645
+
646
+ # Create student academic record
647
+ return self .create_using_dependencies (
648
+ studentReference__studentUniqueId = studentUniqueId ,
649
+ ** kwargs
650
+ )
651
+
600
652
601
653
class StudentLearningObjectiveClient (EdFiAPIClient ):
602
654
endpoint = "studentLearningObjectives"
@@ -607,6 +659,9 @@ class StudentLearningObjectiveClient(EdFiAPIClient):
607
659
}
608
660
609
661
def create_with_dependencies (self , ** kwargs ):
662
+ # Prepopulated student
663
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
664
+
610
665
objective_reference = self .objective_client .create_with_dependencies ()
611
666
612
667
period_reference = self .grading_period_client .create_with_dependencies ()
@@ -622,21 +677,85 @@ def create_with_dependencies(self, **kwargs):
622
677
gradingPeriodReference__periodSequence = period_reference ["attributes" ][
623
678
"periodSequence"
624
679
],
680
+ studentReference__studentUniqueId = studentUniqueId ,
625
681
** kwargs
626
682
)
627
683
628
684
629
685
class StudentMigrantEducationProgramAssociationClient (EdFiAPIClient ):
630
686
endpoint = "studentMigrantEducationProgramAssociations"
631
687
688
+ def create_with_dependencies (self , ** kwargs ):
689
+ # Prepopulated student
690
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
691
+
692
+ # Create student academic record
693
+ return self .create_using_dependencies (
694
+ studentReference__studentUniqueId = studentUniqueId ,
695
+ ** kwargs
696
+ )
697
+
632
698
633
699
class StudentNeglectedOrDelinquentProgramAssociationClient (EdFiAPIClient ):
634
700
endpoint = "studentNeglectedOrDelinquentProgramAssociations"
635
701
702
+ def create_with_dependencies (self , ** kwargs ):
703
+ # Prepopulated student
704
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
705
+
706
+ # Create student academic record
707
+ return self .create_using_dependencies (
708
+ studentReference__studentUniqueId = studentUniqueId ,
709
+ ** kwargs
710
+ )
711
+
636
712
637
713
class StudentProgramAttendanceEventClient (EdFiAPIClient ):
638
714
endpoint = "studentProgramAttendanceEvents"
639
715
716
+ def create_with_dependencies (self , ** kwargs ):
717
+ # Prepopulated student
718
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
719
+
720
+ # Create student academic record
721
+ return self .create_using_dependencies (
722
+ studentReference__studentUniqueId = studentUniqueId ,
723
+ ** kwargs
724
+ )
725
+
640
726
641
727
class StudentSchoolFoodServiceProgramAssociationClient (EdFiAPIClient ):
642
728
endpoint = "studentSchoolFoodServiceProgramAssociations"
729
+
730
+ def create_with_dependencies (self , ** kwargs ):
731
+ # Prepopulated student
732
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
733
+
734
+ # Create student academic record
735
+ return self .create_using_dependencies (
736
+ studentReference__studentUniqueId = studentUniqueId ,
737
+ ** kwargs
738
+ )
739
+
740
+
741
+ class StudentAssessmentClient (EdFiAPIClient ):
742
+ endpoint = "studentAssessments"
743
+
744
+ dependencies : Dict = {AssessmentClient : {}}
745
+
746
+ def create_with_dependencies (self , ** kwargs ):
747
+ # Prepopulated student
748
+ studentUniqueId = kwargs .pop ("studentUniqueId" , StudentClient .shared_student_id ())
749
+
750
+ # Create new assessment
751
+ assessment_reference = self .assessment_client .create_with_dependencies ()
752
+
753
+ # Create student assessment
754
+ return self .create_using_dependencies (
755
+ assessment_reference ,
756
+ assessmentReference__assessmentIdentifier = assessment_reference [
757
+ "attributes"
758
+ ]["assessmentIdentifier" ],
759
+ studentReference__studentUniqueId = studentUniqueId ,
760
+ ** kwargs
761
+ )
0 commit comments