Commit 5df4cd9
authored
fix: refactor best practices checklist logic (openedx#2038)
The Best Practices Checklist behavior was wrong for some cases:
* Video: if duration is null it shouldn't be marked as completed
* Video: if there are no videos it shouldn't be marked as completed
* Unit depth: if course doesn't have units it shouldn't be marked as completed
* Diverse learning sequence: description mentions that 80% should contain multiple content types, so if it is exactly 80% it should be marked as completed1 parent 7274316 commit 5df4cd9
12 files changed
Lines changed: 16 additions & 103 deletions
File tree
- src
- course-checklist/ChecklistSection
- utils
- course-outline
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 74 | | |
85 | 75 | | |
86 | 76 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
| |||
Lines changed: 4 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 38 | + | |
| 39 | + | |
50 | 40 | | |
51 | 41 | | |
52 | 42 | | |
| |||
57 | 47 | | |
58 | 48 | | |
59 | 49 | | |
60 | | - | |
| 50 | + | |
61 | 51 | | |
62 | 52 | | |
63 | 53 | | |
| |||
68 | 58 | | |
69 | 59 | | |
70 | 60 | | |
71 | | - | |
| 61 | + | |
72 | 62 | | |
73 | 63 | | |
74 | 64 | | |
| |||
Lines changed: 4 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
| 192 | + | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 207 | | |
224 | 208 | | |
225 | 209 | | |
| |||
264 | 248 | | |
265 | 249 | | |
266 | 250 | | |
| 251 | + | |
267 | 252 | | |
268 | 253 | | |
269 | 254 | | |
| |||
274 | 259 | | |
275 | 260 | | |
276 | 261 | | |
| 262 | + | |
277 | 263 | | |
278 | 264 | | |
279 | 265 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
Lines changed: 0 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 91 | | |
106 | 92 | | |
107 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
| 484 | + | |
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 65 | + | |
79 | 66 | | |
80 | 67 | | |
81 | 68 | | |
| |||
89 | 76 | | |
90 | 77 | | |
91 | 78 | | |
92 | | - | |
| 79 | + | |
93 | 80 | | |
94 | 81 | | |
95 | 82 | | |
| |||
101 | 88 | | |
102 | 89 | | |
103 | 90 | | |
104 | | - | |
| 91 | + | |
105 | 92 | | |
106 | 93 | | |
Lines changed: 2 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 207 | | |
224 | 208 | | |
225 | 209 | | |
| |||
264 | 248 | | |
265 | 249 | | |
266 | 250 | | |
| 251 | + | |
267 | 252 | | |
268 | 253 | | |
269 | 254 | | |
| |||
274 | 259 | | |
275 | 260 | | |
276 | 261 | | |
| 262 | + | |
277 | 263 | | |
278 | 264 | | |
279 | 265 | | |
| |||
0 commit comments