AA-260/AA-500: Improvements to in course shift deadlines

As part of AA-500, we added a completeness check to showing the
banner since we didn't before. As part of AA-260, we now take into
account if a learner has more attempts left on a problem (regardless
of completeness) and allow them to shift their dates to try again.
This commit is contained in:
Dillon Dumesnil
2020-12-11 19:18:23 +00:00
parent 0cf010b763
commit 3c1de16eba
5 changed files with 56 additions and 17 deletions

View File

@@ -1019,8 +1019,11 @@ div.problem .action {
.submit-cta-description {
color: $blue;
font-size: small;
padding-right: $baseline / 2;
}
.submit-cta-link-button {
border: none;
padding-right: $baseline / 4;
text-decoration: underline;
text-transform: none;
}
@@ -1035,6 +1038,10 @@ div.problem .action {
font-size: $medium-font-size;
-webkit-font-smoothing: antialiased;
vertical-align: middle;
&.cta-enabled {
margin-top: 0;
}
}
}

View File

@@ -92,11 +92,11 @@ class VerticalBlock(SequenceFields, XModuleFields, StudioEditableBlock, XmlParse
'content': rendered_child.content
})
cta_service = self.runtime.service(self, 'call_to_action')
vertical_banner_ctas = cta_service and cta_service.get_ctas(self, 'vertical_banner')
completed = self.is_block_complete_for_assignments(completion_service)
past_due = completed is False and self.due and self.due < datetime.now(pytz.UTC)
cta_service = self.runtime.service(self, 'call_to_action')
vertical_banner_ctas = (cta_service and cta_service.get_ctas(self, 'vertical_banner', completed)) or []
fragment_context = {
'items': contents,
'xblock_context': context,