File tree 2 files changed +49
-0
lines changed
services/QuillLMS/app/workers/student_learning_sequences/backfill
2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ module StudentLearningSequences
4
+ module Backfill
5
+ class RecommendationAssignmentWorker < BaseWorker
6
+ def run_backfill
7
+ backfill_classroom_units ( recommendation_classroom_units )
8
+ end
9
+
10
+ def recommendation_classroom_units
11
+ ClassroomUnit . joins ( unit_unscoped : { unit_template : :recommendations } )
12
+ . where ( unit : {
13
+ unit_template : {
14
+ recommendations : {
15
+ activity_id : post_diagnostic_activity_ids
16
+ }
17
+ }
18
+ } )
19
+ end
20
+ end
21
+ end
22
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ module StudentLearningSequences
4
+ module Backfill
5
+ class RecommendationCompletionWorker < BaseWorker
6
+ def run_backfill
7
+ backfill_activity_sessions ( recommendation_activity_sessions )
8
+ end
9
+
10
+ def recommendation_activity_sessions
11
+ ActivitySession . unscoped . joins ( classroom_unit : {
12
+ unit_unscoped : {
13
+ unit_template : :recommendations
14
+ }
15
+ } ) . where ( classroom_unit : {
16
+ unit : {
17
+ unit_template : {
18
+ recommendations : {
19
+ activity_id : post_diagnostic_activity_ids
20
+ }
21
+ }
22
+ }
23
+ } )
24
+ end
25
+ end
26
+ end
27
+ end
You can’t perform that action at this time.
0 commit comments