Commit Graph

34 Commits

Author SHA1 Message Date
Daniel Valenzuela
b98cbd4c2c feat: warn when relative dates are past due and can't be shifted 2024-06-10 22:55:16 +02:00
0x29a
9d8375ff99 refactor: rename module -> block within lms/djangoapps/courseware
Also, removed unused `_has_access_xmodule` methid from `lms/djangoapps/courseware/access.py`.
2023-01-30 18:15:22 +01:00
Arunmozhi
b6634a811a refactor: replace get_display_blocks with get_children 2023-01-23 14:47:47 +01:00
Arunmozhi
851eb65d53 refactor: rename get_displayable_items and displayable_items 2023-01-23 14:47:47 +01:00
0x29a
83396ffb07 refactor: convert course_module term to course_block 2022-12-19 17:48:49 +01:00
0x29a
4c005e86e8 refactor: xmodule/capa_module.py -> xmodule/capa_block.py 2022-12-19 17:48:49 +01:00
Usama Sadiq
80f9f1de7a Fix quality failures with pylint 2.13.5 (#30197)
* build: update pylint-checks ci workflow
* fix: fix quality failures with new pylint version
* chore: remove pylint constraint
* chore: Updating Python Requirements (#30196)
Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2022-04-07 13:59:44 +05:00
Mohammad Ahtasham ul Hassan
dd488a76d1 fix: fixed django40 warnings (#29641)
* fix: fixed django4 warnings
Co-authored-by: UsamaSadiq <usama.sadiq@arbisoft.com>
2022-02-25 16:24:51 +05:00
Jawayria
c227712f03 chore: Applied lint-amnesty on openedx/features 2021-12-02 15:02:24 +05:00
Michael Terry
033497d1d7 fix: modernize look of in-xblock shift-dates banner
Specifically, use our standard warning-banner colors and add a
drop shadow. Also, updates the text to match the text used
elsewhere.

AA-835
2021-08-16 09:18:05 -04:00
Kyle McCormick
d42b0c401d refactor: normalize xmodule imports
Code in ./common/lib/xmodule/xmodule should
be imported as `from xmodule`, since `xmodule`
is a locally-installed package.

This is weird, but as long as it is the case,
we should be consistent.

(In BOM-2584, I propose moving the files to
 ./xmodule, which would quell this confusion.)
2021-06-07 16:36:38 -04:00
Dillon Dumesnil
4230f1fb39 fix: Update the shift dates logic for problems
Even if a learner could technically continue to attempt a problem,
if they didn't have any missed deadlines in the course, we would
never display the ability to shift dates. This corrects that to
not require a missed deadline. The banner on the unit is still gated
by needing a missed deadline.
2021-05-24 17:00:43 -04:00
Kyle McCormick
b0d41f6ebb refactor: simplify ProblemBlock inheritance hierarchy (#27363)
Previously, ProblemBlock's implementation was split between
CapaMixin/CapaFields (in capa_base.py) and ProblemBlock
(in capa_module.py), the former being the base classes of the
latter. The split existed for a historical reason:
as a former XModule, ProblemBlock was once split
between CapaDescriptor (author-facing) and CapaModule
(learner-facing). Since ProblemBlock has been converted
to being a pure XBlock, the division between the base
classes and the block class are no longer necessary
nor semantically helpful.

docs: Flesh out ProblemBlock's docstring a bit.
2021-04-22 12:44:15 -04:00
Dillon Dumesnil
3a89ed4275 Merge pull request #27262 from edx/ddumesnil/switch-relative-dates-to-course-waffle-aa-677
refactor: AA-677: Switch relative dates to CourseWaffleFlag
2021-04-14 06:17:08 -07:00
Dillon Dumesnil
c9197d3cfc refactor: AA-677: Switch relative dates to CourseWaffleFlag
We have been bucketing all users into the relative dates experiment
since May 18, 2020. We no longer need to keep this as an
ExperimentWaffleFlag and can convert to a CourseWaffleFlag (so it
continues to support exemptions).
2021-04-08 10:12:54 -04:00
Jawayria
4cdf466215 refactor: Removed unused imports
Removed unused imports from openedx/core/{djangolib, lib} and openedx/{tests, features}
2021-04-06 17:24:04 +05:00
Awais Qureshi
ace90d5345 BOM-2442
pyupgrade in leaner-profile, lti-course-tab, personalized-learner
2021-03-11 14:57:20 +05:00
Kyle McCormick
558d2eb52c refactor: centralize learning MFE URL-building logic (#26689)
In preparation for switching LMS/Studio over
from serving legacy courseware URLs in certain
places (for example, resume_course_url) to serving
learning micro-frontend URLs.

TNL-7796
2021-02-24 08:50:15 -05:00
Aarif
93a4f96e30 replaced unittest assertions pytest assertions (#26575) 2021-02-22 16:19:37 +05:00
Awais Qureshi
41b50237d3 BOM-2337
Apply pylint-amnesty.
2021-02-08 17:12:55 +05:00
Dillon Dumesnil
8c745cabbf AA-492: Adds research tracking event for reset deadlines
This PR also removes the exemption for staff from seeing the reset
deadlines banner (staff will now see the banner). Staff users would
still be unable to submit problems and wouldn't have a way of resetting
their deadlines while enrolled.
2021-02-01 10:48:11 -05:00
Dillon Dumesnil
6237bce0e7 AA-496: Don't show reset deadlines banner if no graded problem is past due
When determining completion status to show on the vertical, we take
into account if the problems are graded and scored (have a score
and weight). Now we take that into account in regards to showing the
banner inside the vertical too
2020-12-17 20:00:14 +00:00
Dillon Dumesnil
3c1de16eba 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.
2020-12-14 19:05:30 +00:00
Régis Behmo
16ce16e85e Deprecate ExperimentWaffleFlag.override method
This is part of a removal of the many override methods of toggle
flag/namespace classes. This allows us to remove imports of test modules
from production code.
2020-11-03 19:25:37 +01:00
Dillon Dumesnil
767af37d3d AA-318: Update PLS CTA to use the dates_banner_should_display
This will make it so audit and verified learners will not see the CTA
after due dates. Previously it would only check if the xblock is
self_paced and there are still attempts and it's past due
2020-09-03 10:50:44 -04:00
Dillon Dumesnil
82e7a9ce13 AA-307: Turn showanswer override back on
This doesn't handle the default case where the showanswer has never
been touched, in which case it will continue to return Finished,
but that also happens when it's turned off so this just helps out
for all of the other cases.
2020-08-18 07:53:18 -07:00
Dillon Dumesnil
c702d12957 Temporarily disable Show Answer Override for self-paced courses 2020-08-13 11:56:25 -07:00
Nicholas D'Alfonso
0211a2b0ff AA-287 cta events 2020-08-10 18:00:13 -04:00
Michael Terry
c2033f9667 Small PLS courseware banner fixes
- Hide the submit-button CTA link to reset dates in the mobile
  app. They are working on their own solution.
- Don't show the dates_banner.html code in the courseware. It has
  new CTA banner support with updated wording.
2020-08-10 09:44:43 -04:00
Michael Terry
e0a0d4d6e3 Warn if an xblock defines is_past_due as a property
We support it still, but want to encourage folks to try to define it
as a method, so that in the future, we can rely on it being one.

Also updates lti-consumer to a version that has the value as a
method.
2020-08-07 10:29:10 -04:00
Michael Terry
023ae07753 Fix possible reference to is_past_due property 2020-08-06 16:54:45 -04:00
Calen Pennington
f9619d6cad Add a pluggable CallToAction service for XBlocks
This also has an initial use case for Personalized Learner Schedules
to add CTAs to capa and vertical blocks to allow users to shift their
course deadlines.
2020-08-06 14:38:26 -04:00
Dillon Dumesnil
f5c893e34d Fix for enabled_for to not assume the self_paced attr exists
Also being defensive on category just in case
2020-08-04 11:20:59 -07:00
Dillon Dumesnil
75f6937003 AA-261: Overridding Show Answer functionality for PLS courses
We noticed that since users can choose to reset their due dates,
they would have the ability to let due dates pass and then for any
assessment that allows viewing the answer after the due date would be
visible. The user could thus view all answers and then reset their
due dates to receive a perfect score.

This PR works to fix that issue by changing all show answer values
to not take into account being past the due date when inside a PLS
course.
2020-08-04 07:44:59 -07:00