87 Commits

Author SHA1 Message Date
Agrendalath
bbc0cc2baa fix: show correct icons in the sidebar for units with custom XBlocks
Currently, the sidebar relies only on the XBlock's `category` class attribute
(called `type` in the transformers). This behavior is inconsistent with the
legacy subsection navigation, which relies on the `XModuleMixin.get_icon_class`
method. This commit adds the `icon_class` to the fields collected by the
transformers and uses it to determine whether the "problem" or "video" icon
should be displayed for a unit in the sidebar.
2025-08-21 00:29:01 +05:30
Daniel Valenzuela
b98cbd4c2c feat: warn when relative dates are past due and can't be shifted 2024-06-10 22:55:16 +02:00
Bryann Valderrama
4c0fba2063 feat: expose hide_from_toc field for course blocks in outline API (#33955)
These changes are part of the effort made to implement https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
2024-02-15 10:44:28 -04:00
Agrendalath
b91f858e70 feat: add Waffle Flag to disable resetting self-paced deadlines by learners 2023-05-04 17:20:44 +02:00
Michael Terry
ce5f1bb343 feat!: drop legacy course home view and related code
This was the "outline tab" view of the course. Preceded by the
course info view, succeeded by the MFE outline tab.

In addition to the course home view itself, this drops related
features:
- Legacy version of Course Goals (MFE has a newer implementation)
- Course home in-course search (MFE has no search)

The old course info view and course about views survive for now.

This also drops a few now-unused feature toggles:
- course_experience.latest_update
- course_experience.show_upgrade_msg_on_course_home
- course_experience.upgrade_deadline_message
- course_home.course_home_use_legacy_frontend

With this change, just the progress and courseware tabs are still
supported in legacy form, if you opt-in with waffle flags. The
outline and dates tabs are offered only by the MFE.

AA-798

(This is identical to previous commit be5c1a6, just reintroduced
now that the e2e tests have been fixed)
2022-04-14 15:18:31 -04:00
Michael Terry
a515c2e992 Revert "Drop legacy outline tab in favor of the MFE's version" 2022-04-14 14:16:29 -04:00
Michael Terry
be5c1a64d5 feat!: drop legacy course home view and related code
This was the "outline tab" view of the course. Preceded by the
course info view, succeeded by the MFE outline tab.

In addition to the course home view itself, this drops related
features:
- Legacy version of Course Goals (MFE has a newer implementation)
- Course home in-course search (MFE has no search)

The old course info view and course about views survive for now.

This also drops a few now-unused feature toggles:
- course_experience.latest_update
- course_experience.show_upgrade_msg_on_course_home
- course_experience.upgrade_deadline_message
- course_home.course_home_use_legacy_frontend

With this change, just the progress and courseware tabs are still
supported in legacy form, if you opt-in with waffle flags. The
outline and dates tabs are offered only by the MFE.

AA-798
2022-04-14 09:12:01 -04:00
Michael Terry
2845c5990c Merge pull request #29958 from eduNEXT/cag/fix-icon-on-course-outline
fix: icon on course outline was not showing correctly
2022-03-21 09:33:37 -04:00
Cristhian Garcia
5682bc2f3a fix: icon on course outline was not showing correctly 2022-03-10 16:08:57 -05:00
Michael Terry
dbb1e4c8dd fix: add some extra guards for a None course.end value
This has bit us in the past, and here are a few more places
where it doesn't hurt to be cautious.

AA-1198
2022-03-07 15:25:53 -05:00
Jawayria
328c181a38 chore: Applied lint-amnesty on openedx/features 2021-12-06 13:58:45 +05:00
Thomas Tracy
986f52faab [feat] Add has_scheduled_content to outline API
The outline API that the learning MFE needs to know if a course has
upcomming content for a new alert.
2021-07-06 11:33:53 -04:00
Dillon Dumesnil
89c463ff29 refactor: Switch to using course_overview start and end everywhere
In DE-1822, we believed we needed to switch to start_date and end_date.
It was determined this was not the case, so this updates the comment
to ensure future users use the correct fields (start and end) and
updates any pieces of code that may have used start_date or end_date.
2021-05-06 16:42:10 -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
Michael Terry
5d9e7e9fe5 fix: don't count hierarchy blocks as complete for assignments
When considering whether a subsection is complete as an assignment,
skip any "hierarchy" types (sequential, vertical, etc) that don't
have children. If the user can't see the content, don't risk
marking it as complete.

AA-726
2021-03-29 16:06:11 -04:00
Agrendalath
5a27b5df39 Calculate completion for custom blocks on the Course Outline page
This adds support for displaying completion on the course outline page, to remove the discrepancies between this view and the learning sequence. It also simplifies course outline page by reusing existing APIs for determining completion state and finding the "Resume block"'s target.
2021-03-22 16:21:32 +01:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
Michael Terry
1b9119859e AA-614: Add initial effort estimation block transformer 2021-02-18 08:31:19 -05:00
Awais Qureshi
07b182b3be BOM-2335
Apply pylint-amnesty.
2021-02-04 16:37:41 +05:00
Dillon Dumesnil
71b15df66c Merge pull request #26264 from edx/ddumesnil/reset-deadlines-event-aa-492
AA-492: Adds research tracking event for reset deadlines
2021-02-01 08:09:51 -08: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
Carla Duarte
d97b058c5d AA-568: fix start course bug 2021-01-27 15:29:21 -05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Michael Terry
939f268da8 AA-225: Only consider scored items for past due assignments
When considering if an assignment is past due for the dates tab,
only look at the scored and graded units in the subsection (i.e.
ignore reading and video units).

This still leaves the "complete" field alone -- i.e. those
subsections will still be left incomplete generally. But for
assignment-focused tasks, they will instead be considered complete.
2020-07-14 15:04:19 -04:00
Calen Pennington
c6695e0b6f Only actually reset user schedule if they have missed deadlines and not missed any gated content deadlines 2020-06-10 15:18:53 -04:00
Calen Pennington
15df17034a Only prompt the user to upgrade if they have missed the deadline of gated graded content 2020-06-10 15:18:53 -04:00
Calen Pennington
d3b11ec25b Refactor dates_banner_should_display to only return a single value, and to have a clearer set of conditions 2020-06-03 10:14:11 -04:00
Jason Myatt
4d01a736d2 Check for none on subsection due date 2020-06-02 11:29:09 -04:00
Nicholas D'Alfonso
b454f9be1d AA-151 dates banner on course outline and refactor
- use new dates banner template on course outline page
- remove old banner from main.html
- let dates tab use new dates banner template
- remove dates banner completely from the courseware problem view
  on the web app
- use new banner on the courseware problem view on the mobile app
- update banner util to use get_course_blocks
2020-05-21 13:23:05 -04:00
Nicholas D'Alfonso
637b639e78 AA-157 dates page missed deadlines
- add banner to dates page when deadlines are missed
2020-05-12 13:02:26 -04:00
Nick
d24e4fe5a8 Merge pull request #23876 from edx/revert-23871-ndalfonso/AA-138-banner-debug
Revert "add logs for debugging"
2020-05-07 15:31:00 -04:00
Dillon Dumesnil
10759a9046 Merge pull request #23819 from edx/ddumesnil/more-date-pills-aa-99
AA-99: Adding in new date pills for the dates tab
2020-05-06 06:12:50 -07:00
Simon Chen
262574b815 Move all the upgrade display logic into courseware.utils 2020-05-05 17:54:22 -04:00
Dillon Dumesnil
858154a7d6 AA-99: Adding in new date pills for the dates tab 2020-05-04 07:24:01 -07:00
Nick
ede713002d Revert "add logs for debugging" 2020-05-01 17:32:17 -04:00
Simon Chen
34d4d162f7 MST-108 Add masquerading fix to the upgrade message display 2020-05-01 16:54:43 -04:00
Nicholas D'Alfonso
21358b764e add logs for debugging 2020-05-01 15:19:26 -04:00
Calen Pennington
ff88f3d423 Only show the resets date banner if you have missed the due date on a graded subsection
[AA-138]
2020-04-30 11:50:45 -04:00
Michael Terry
0f81765ac7 Show graded icons in more places
In the course outline, if a subsection has any graded content,
show a graded icon (the pencil icon).

Also, show the graded icon for LTI xmodule units (xblocks is a
different repo, but will get same treatment).

AA-75
2020-04-24 14:16:32 -04:00
Nicholas D'Alfonso
396050703e AA-97 mobile reset message
- remove code for displaying banner in mobile dates fragment
- replace button with link to web app in reset dates banner on
  the mobile problem template
- adjust spacing of reset dates button in banner when button wraps
  on smaller screen
2020-04-09 12:55:26 -04:00
Nicholas D'Alfonso
ac9d2bfd30 AA-85 mobile reset dates
- render reset dates banner in webview for mobile app.
- improve banner redirect mechanism
2020-04-02 00:37:54 -04:00
Michael Terry
7fb18c4ec9 Adjust question count logic on outline
The question counts showed in course outlines assumed that no
blocks would both be a graded assignment and have children. That's
generally true, but this commit avoids that assumption.
2020-03-19 10:20:30 -04:00
Michael Terry
a199c6bfd9 Show number of problems in outline
Specifically, the number of 'problem' blocks that are graded, in
a given subsection. Also shows an icon next to the subsection if so.

AA-45
2020-03-17 12:44:11 -04:00
Michael Terry
ea92073e08 Limit course outline to a depth of two
Previously, we'd show three layers deep (section, subsection, and
unit). But now we cut out unit and stop at subsection.

AA-17
2020-02-03 14:49:34 -05:00
DawoudSheraz
466e2ce530 remove the logs 2020-01-16 13:14:29 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
DawoudSheraz
2470d9a0f5 fix logs condition 2019-12-05 11:08:38 +05:00
DawoudSheraz
871f3bfb7e conditional logs to find the inconsistent block id in MITx course 2019-11-27 12:28:15 +05:00
julianajlk
6e0914ad5d add FPD banner to courseware (#22113)
REV-980
2019-10-23 09:33:11 -04:00
Braden MacDonald
5fc73468b3 Change completion API to work with any learning context 2019-10-22 14:04:31 -04:00