Commit Graph

264 Commits

Author SHA1 Message Date
Usama Sadiq
859df03049 refactor: ran pyupgrade on lms/djangoapps/courseware (#26737) 2021-03-12 12:15:58 +05:00
Carla Duarte
99f73312b8 Progress Tab 2021-03-11 15:43:58 -05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
Jawayria
03e6a874d0 Applied pylint-amnesty to courseware 2021-02-03 21:56:24 +05:00
jawad khan
957f3ab8a5 LEARNER-8191 - Added first_component_block_id in dates api (#26319)
* LEARNER-8191
Added first_componnet_block_id in dates api
2021-02-03 13:53:21 +05:00
Kyle McCormick
54d5f7f394 Course Blocks API: Fix handling of incorrectly-cased course keys (#25911)
Commit 7f59688 attempted to solve this using
`CourseOverview.course_exists`, but that check is case-
insensitive. This commit instead does a small refactor
to `lms.djangoapps.courseware.get_course` so that we can
handle a failed course lookup without broadly catching
a `ValueError`.
2020-12-18 11:26:29 -05:00
Carla Duarte
99163bdf2c AA-131: Allow anonymous users through course home MFE 2020-12-16 12:58:33 -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
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Michael Terry
0c9efb793c AA-335: Avoid due dates for ORA subsections
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.
2020-09-17 10:10:06 -04:00
Calen Pennington
83daf2a1c9 Add tests of ORA2 dates on the dates page 2020-07-21 15:17:51 -04:00
Calen Pennington
3e47170470 Revert "Merge pull request #24547 from edx/revert-24503-ora2-dates-reprise"
This reverts commit 21d1f3d5d1, reversing
changes made to 19f82258aa.
2020-07-21 11:54:06 -04:00
Dillon Dumesnil
75db9b2534 Revert "Ora2 dates reprise" 2020-07-20 09:55:02 -07:00
Calen Pennington
7502ca021d Handle ORA dates when an it has no valid_assessments 2020-07-16 15:12:26 -04:00
Calen Pennington
03ba0b8331 Revert "Merge pull request #24501 from edx/revert-24421-ora2-dates"
This reverts commit fccb52b6c8, reversing
changes made to a0bc37866d.
2020-07-15 14:29:11 -04:00
Dillon Dumesnil
2601975fd3 Revert "AA-223 - Add ORA2 dates to the dates page" 2020-07-15 10:13:00 -07:00
Calen Pennington
d6bf54b576 Add ORA2 dates to the dates page
ORA2 (openassessment) problems have multiple dates associated with are
not bound to the `due` date that is modified by Personalized Learner
Schedules. We expose the ORA2 dates separately in the dates page
so that learners aren't surprised by the differing deadlines.

[AA-223]
2020-07-15 09:52:22 -04: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
Nicholas D'Alfonso
858c3750b0 AA-160 calendar sync initial email
-use Amazon SES to send calendar sync email when user initially
 subscribes to the calendar sync feature
2020-07-14 10:58:01 -04:00
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04:00
Carla Duarte
01b693a5c3 AA-173: Assignment Type on Dates Page
Appending the assignment type to each graded
assignment on the Dates Tab. Exposed the 'format'
field, which corresponds to the graded assignment type.
2020-06-08 10:27:50 -04:00
Michael Terry
03860c7359 AA-76: Add is_allowed property to DatesSummary
This takes over some of the logic in the is_enabled property which
previously checked two things: (1) is the date time-sensitive and
(2) is the date even applicable to this course.

Now, is_enabled is only responsible for time-sensitive checks and
the new is_allowed property checks applicability.

In this way, we can more cleanly separate whether a date block
should show up on the dates sidebar (is_enabled and is_allowed)
and the dates tab (is_allowed).
2020-06-02 09:26:24 -04:00
Dillon Dumesnil
03bc4bc1be AA-158: Fix date ordering for multiple events on the same date
This change will prefer putting assignments before other course
events (such as end date or verification deadline date) in the
case where they share the same date.
2020-06-02 06:51:25 -06:00
Jeff LaJoie
efa7b3b816 AA-164: Performance fixes for course home 2020-05-20 10:09:41 -04:00
Dillon Dumesnil
7cd821b52e AA-115: Adding external API for dates tab
This adds in the API for the Dates Tab for use by the
Course Home MFE.
2020-05-19 12:35:43 -07:00
Dillon Dumesnil
4d4b93c6ed AA-159: Improving performance of get_course_assignments
We saw an increase in response time with recent changes to the logic
behind get_course_assignments. This effort works to better access
the information we need in order to improve performance.
Namely, this is done by using the course_blocks_api
2020-05-14 13:12:25 -07:00
Dillon Dumesnil
858154a7d6 AA-99: Adding in new date pills for the dates tab 2020-05-04 07:24:01 -07:00
David Joy
7a400e2917 Factoring redirects out of check_course_access so it can be used with courseware_api (#23651)
TNL-7053

The courseware_api view will use check_course_access - which now returns AccessResponse objects, and all other uses of check_course_access will now use check_course_access_with_redirect, which is a drop-in replacement for the original check_course_access implementation.

We also added a few new helpers to access_utils:

- check_public_access is a replacement for allow_public_access, which now returns AccessResponse objects
 - check_enrollment checks if the learner is enrolled, and uses check_public_access to account for COURSE_ENABLE_UNENROLLED_ACCESS_FLAG
- check_survey checks whether there is a required survey that the learner must complete prior to accessing the course.

There are two new kinds of AccessError subclasses:

- SurveyRequiredAccessError
- EnrollmentRequiredAccessError
2020-04-15 10:29:24 -04:00
Calen Pennington
9be7341b20 Use the course_blocks api to fetch data for date blocks 2020-04-14 10:08:19 -04:00
adeelehsan
82bf1d744a Revert "Added logs for investigation" 2020-03-30 19:15:26 +05:00
adeelehsan
c04341f863 Merge pull request #23509 from edx/aehsan/prod-1222/added_logs_for_investigation
Added logs for investigation
2020-03-27 18:21:21 +05:00
adeelehsan
da875856c8 Added logs for investigation 2020-03-27 17:37:37 +05:00
Dillon Dumesnil
a13b695660 AA-74: Only show cert available date in Instructor paced courses 2020-03-18 12:41:27 -07:00
Michael Terry
4c241e57fe Add func to generate ics for schedule
This is an unused-as-of-yet utility function to generate a bunch
of ics files for a user's course schedule. Will be used as part
of the calendar_sync feature package.

AA-37
2020-03-16 10:51:51 -04:00
Michael Terry
f6e85f758c Provide links for self paced blocks
When self paced blocks don't have a start date set, still provide
a link to the block (noticable on dates side bar at the least).
2020-03-09 15:42:37 -04:00
Michael Terry
24aaebdfa5 Use relative dates flag for dates widget v2
Switch from a separate waffle flag for the dates widget v2 work
and just use the relative dates experiment flag instead.
2020-03-05 16:38:07 -05:00
Jeff LaJoie
fa3b1cd835 AA-6: Adds in dates tab and dates dashboard view to courseware 2020-02-25 10:48:45 -05:00
Dillon Dumesnil
a7a84ce9ab Adding in try block for getting item from modulestore
This also includes updating the test to actually test for this use case

AA-4
2020-02-18 15:23:38 -05:00
Dillon Dumesnil
be7ef9804d AA-4: Adding waffle flag for dates widget 2020-02-18 11:20:32 -05:00
Dillon Dumesnil
5853cddfc1 AA-4: Extreme defensiveness over any fields accessed from modulestore 2020-02-18 08:43:45 -05:00
Dillon Dumesnil
fe91d63a0b Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-18 08:42:15 -05:00
Dillon Dumesnil
00fe1495b4 Revert commits for AA-4 2020-02-10 12:10:59 -05:00
Dillon Dumesnil
7b68869a14 AA-4: Be more defensive about not finding an item in modulestore 2020-02-10 08:03:16 -05:00
Dillon Dumesnil
23486a560d Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-06 16:01:46 -05:00
Robert Raposa
26d4cc6596 add newrelic metrics and trace details
Add newrelic metrics and trace details to determine performance issue
in CourseListView.

BOM-897
2020-01-28 12:44:11 -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
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Awais Qureshi
98ec44b56c BOM-404
Fixing python3
2019-09-11 12:52:56 +05:00
Awais Qureshi
8b0bb0a707 BOM-302
TypeError: unorderable types: int() <= MagicMock()
2019-09-03 23:17:11 +05:00
aarif
a66cf74c5c fixed NoneType and integer comparison issue 2019-08-27 18:41:48 +05:00