AA-335: Avoid due dates for ORA subsections - #24987
Conversation
|
@cpennington does this PR make sense, or is there a use case where we do actually need to check this at the section level? |
Dillon-Dumesnil
left a comment
There was a problem hiding this comment.
LGTM. Just a small question about positioning
| same identifier used in setup.py. | ||
| """ | ||
| return "content_type_gate" | ||
| return 'open_assessment_transformer' |
| 'required': True | ||
| }] | ||
| valid_assessments = block_data.get_xblock_field(descendent, 'valid_assessments') | ||
| print(valid_assessments) |
|
|
||
| if section_date_items and section.graded: | ||
| date_items.append((section.location, weeks_to_complete)) | ||
| date_items.extend(section_date_items) |
There was a problem hiding this comment.
Why have this outside the if statement? Either the section_date_items are [] and there is nothing to add. Or they are not [], but if the section isn't graded, this would still add the subsection dates and I'm not sure we want that. Just pondering out loud here.
There was a problem hiding this comment.
I just thought it looked cleaner this way. But I can be convinced it is too implicit or is confusing.
There was a problem hiding this comment.
My only concern would be for the case where section_date_items != [] and section.graded = False and we add subsection dates without adding in the section due date. I'm not sure this scenario can even happen, but might be good to be defensive about it
There was a problem hiding this comment.
I don't think that can happen (I believe graded is bubbled up the tree). But also, that is the behavior of the existing code. So it wouldn't be a regression at least.
Previously, we'd been avoiding PLS due dates for ORA *sections*. That is, if a section had only ORA content, we'd not set a PLS due date for anything in that section. If any content in that section had non-ORA graded content however, we would set dates on all subsections, including the ORA one. This resulted in some ORA-only subsections showing up twice on the dates tab. So this patch simply brings down the ORA-only check to a *subsection* level, not a section one.
a2f1230 to
0c9efb7
Compare
|
jenkins run python |
|
Your PR has finished running tests. There were no failures. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
Previously, we'd been avoiding PLS due dates for ORA sections. That is, if a section had only ORA content, we'd not set a PLS due date for anything in that section.
If any content in that section had non-ORA graded content however, we would set dates on all subsections, including the ORA one.
This resulted in some ORA-only subsections showing up twice on the dates tab. So this patch simply brings down the ORA-only check to a subsection level, not a section one.
Once deployed, we'll want to republish any affected courses.