* feat: add language selection
chore: update tests so we have less error message
test: update test
* test: update tests
* chore: remove duplicate translation
* chore: lint for console
* chore: remove comments
* chore: make sure the affect url frame refresh after the language selection change
* chore: add whole_course_translation and language to courseware meta (#1305)
* feat: Add feedback widget UI mock
Add unit tests
Fix snapshot
Clean Sequence component logEvent calls
Clean unit test
Put feedback widget behind whole course translation flag
Fix useFeedbackWidget test
* chore: add src and dest translation
* feat: first iteration of plugin translation
chore: update plugin instruction
* feat: Connect FeedbackWidget with backend services (#1325)
Connect FeedbackWidget with backend services
Move feedback widget to unit translation plugin
* feat: Add authentication to WCT feedback endpoints (#1329)
* chore: add fetch config and move feedback widget for the plugin
chore: rewrite and test the api request
chore: rebase
chore: update translation feedback
chore: test
chore: add more tests
* chore: rebase
* chore: update requested change
* chore: update package
* chore: upgrade frontend-lib-special-exams and frontend-lib-learning-assistant
* chore: update tests
* chore: remove unneeded package
* chore: update example config
* chore: add source-map-loader
* fix: feedback widget render error after submit feedback (#1335)
* fix: feedback widget render error after submit feedback
* fix: widget logic
---------
Co-authored-by: Rodrigo Martin <rodrigom_94@hotmail.com>
* feat: refactor use of frontend-lib-special-exams public API to hooks
This commit refactors the use of the frontend-lib-special-exams public API to use hooks.
This commit also imports the root reducer from the frontend-lib-special-exams library. This root reducer is used for the specialExams slice when configuring the store for this application.
* feat: update special exams version
* feat: update snapshots
---------
Co-authored-by: Alie Langston <alangsto@wellesley.edu>
This commit installs version 1.21.0 of @edx/frontend-lib-learning-assistant. This commit also refactors the Chat tests to assert on whether the Xpert component is rendered by the Chat component, not whether Xpert actually renders. This is because Xpert now has its own logic to determine whether to render.
This release uses a new GET endpoint published on the Learning Assistant backend to determine whether the Learning Assistant feature is enabled. If the features is not enabled, the Learning Assistant is not rendered, and vice-versa.
- install atlas
- remove `--filter` to pull all languages by default
- use ATLAS_OPTIONS to allow custom `--filter`
- include frontend-lib-special-exams in `atlas pull`
If the learner doesn't even have access to the course (e.g. because the
course starts in the future), don't worry about a 404 fetching the
course outline since we're not planning to use it anyway.
ENT-8078
This commit modifies the Course component to pass the unitId prop, which presents the unit usage key in which the Xpert is being rendered, to the Chat component. The Chat component passes this unit ID as a prop to the Xpert component.
This commit changes the installed version of the frontend-lib-special-exams module from 2.25.0 to 2.26.0.
This release adds support for displaying a technical support URL for LTI-based providers on the download instructions interstitial of proctored exams. The download instructions will display a technical support URL when it is returned from the proctoring settings backend endpoint. If the technical support URL is not available, then the technical support email and technical support phone number will be used instead.
When a learner tries to load the B2C course page for a course that
starts in the future (error_code="course_not_started"), normally the
learning MFE automatically redirects to the B2C dashboard. This change
supports an alternate error_code "course_not_started_enterprise_learner"
to trigger an alternative redirect to the B2B (enterprise) learner
dashboard.
This does two main things:
1. When the course metadata API response indicates
course_access.error_code = "course_not_started_enterprise_learner"
then redirect to "/redirect/enterprise-learner-dashboard".
2. When the top-level router matches path "/redirect/enterprise-learner-dashboard"
then redirec to to the value of config `ENTERPRISE_LEARNER_PORTAL_URL`.
ENT-8078
* fix: Updated UI a11y changes in Courseware Search
* feat: Removed result count for search
* fix: Added new line at the end of course-tabs-navigation.scss
* feat: use state params to keep query and filter while searching
* feat: Minor factors renaming methods
* feat: fix tests
* feat: Only change url when hit search button
* feat: fix tests
* chore: 100% coverage on CoursewareSearchResults.jsx
* chore: Added test coverage for all CoursewareSearch components
* chore: Minor fixes on Courseware Search components
Part of https://github.com/openedx/axim-engineering/issues/23
This updates the `@edx/brand` alias to point to the `brand-openedx` package at
the `openedx` scope. This does not impact imports because this package is used
via an alias.
* feat: Added Courseware Search container popover
* chore: Added unit tests for CoursewareSearch and CoursewareSearchToggle
* chore: Updated unit test for CourseTabsNavigation
* chore: Partial coverage on Courseware Search Hooks
* chore: Finished Courseware Search Hooks unit testing
* fix: Fixed an overlook that caused a conditional hook
* fix: Reduced bounce timeout on scroll/resize to 100ms
* chore: Updated snapshots
* chore: Moved @testing-library/react-hooks dep to DEV
* chore: Minor adjustments on unit tests
* chore: Fixed test issue
* feat: upgrade react router to v6
* fix: all test cases affected by react router upgrade
* refactor: fix navigations
* fix: test cases affectewd due to lib-special-exams
* refactor: improve code coverage
In order to diagnose low usage rates, we're temporarily adding Segment events for rendering the chat and for closing the call-to-action message. This will help us determine whether Xpert is being successfully rendered and whether Xpert is being ignored by tracking whether learners close the call-to-action message at a high rate.
At a minimum, we expect to remove the Segment event for rendering the Xpert, because this will be a very noisy Segment event. We plan to leave it in for a few days just to accumulate data. We will evaluate whether to keep the call-to-action dismissal Segment event based on the data.
This commit adds the Segment event for rendering the Xpert. This commit also installs version 1.11.1 of frontend-lib-learning-assistant, which introduces a Segment event for for closing the call-to-action message.
This commit installs version 1.9.3 of @edx/frontend-lib-learning-assistant, which includes a UI tweak to conditionally render the Xpert toggle button and action message (call-to-action) only when the Xpert sidebar is closed.
This commit installs version 1.6.0 of @edx/frontend-lib-learning-assistant, which includes a new user disclosure feature. This commit also includes the Privacy Policy URL to the frontend-app-learning config, because the Xpert learning assistant uses this config value in the disclosure.
This commit installs the Xpert chatbot feature from the frontend-lib-learning-assistant repository into the frontend-lib-learning application.
This component is rendered by the Course component. The component is only rendered when a few conditions are satisfied.
This change makes it possible to use the latest LMS_BASE_API
if it was changed because of dynamic config API, which is the
default case of tutor.
This changes closes openedx/wg-build-test-release/issues/270
Fixes that are simlar to this
- gradebook openedx/frontend-app-gradebook/pull/290
- course authoring openedx/frontend-app-course-authoring/pull/389
Right now we log nothing to the logging service when a unit iframe fails to load. The ErrorPage that’s shown isn’t using the ErrorBoundary, so we had no indication that something went wrong. This solves the problem closer to the source where the error originates.
This is an experimental off-by-defualt feature for moving the translation files ouside the repos.
Run `OPENEDX_ATLAS_PULL=true make translations` to use atlas to pull translations instead of transifex.
Refs: FC-12 OEP-58
The .github/workflows/add-depr-ticket-to-depr-board.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
The .github/workflows/add-remove-label-on-comment.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
The .github/workflows/self-assign-issue.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.
Fix the first section celebration modal showing logic.
On Nutmeg+ it's shown only after the page reload or after going directly
to the second section from the course home. Going through the course
with the Next/Previous buttons has no effect (which worked on Maple).
Notes:
- the weekly goal has the same showing logic, but I assume that is
correct behavior so no changes are added for it in this commit.
- showing a celebration modal for the first section completion when
going directly to the first unit of the second section seems to be a bug
(reproduces on Maple too)
* feat: added cron github action to auto update brwoserlist DB periodically
* refactor: used a shared script to update broswerslist DB, create PR and automerge it
* chore: ignore eslint issues during frontend-build v9 -> v12 upgrade
* chore: add comment to .eslintrc.js file
* chore: update frontend-build
* chore: update test and remove a few unit tests
Co-authored-by: Leangseu Kim <lkim@edx.org>
This fix does fixes the url links by getting them from the state
simliar to how tabs navigation gets them.
This would allow it work for PUBLIC_PATH is not '/', i.e. in
tutor.
This was reported in openedx/build-test-release-wg/issues/222
Currently expiring soon is displayed 28 days before expiration
and forever afterwards. Adds an actual expired state for after.
Also clarifies the expring soon message which assumed other course,
that was not necessarily true.
Also updates the take action lines when you do not have valid
onboarding to make sure they appear for everything not currently valid
or in process, and updates the submitted process lines to not appear
for expired statuses.
They've both been removed from the LMS now. It would be harmless
to keep support for them in place, but it's pointless because
any redirects to the LMS will just come right back to us.
AA-799
* fix: [MICROBA-1769] Cert status before course end
Right now, learners who are nonpassing are able to view information
about thier certificates early at the course end screen and progress
pages. This is because we show messaging around the nonpassing state in
some cases before a course ends and certificates are available. This can
also lead to cases where grades are not finalized and students who may
be passing see a scary nonpassing message instead.
This change makes it so during the course exit, a student who finishes a
course before the course is over will see the celebration screen
regardless of passing status. Once the course is over (or if
certificates are available immediately), and they are
still not passing, they will see the nonpassing messaging. The same
change was made for the certificate status alert in the progress tab.
* feat: add discussions tab
Adds code to load the discussions MFE in an iframe in the tab so the user isn't redirected to the LMS.
Adds code for the discussions tab, making it dynamically resize based on contents using a postMessage API.
* feat: update path based on user navigation inside discussions MFE
The discussions MFE will send path change events via the postMessage API so that the learning MFE path can be kept in sync. This will allow reloading a page without having the iframe revert to same path each time.
A previous commit (7f37575) dropped es-check, which dropped
fsevents, which caused our build system (which is still using
npm@6) to fail with an error like `Unsupported platform for
fsevents` when trying to install fsevents through a dependency
(e.g. when installing npm aliases).
I am reintroducing all the package-lock changes from that commit
to get back fsevents in a state where that error does not occur.
I think a longer-term fix would be to instead upgrade our build
system to node16 / npm6. But this is an easy fix for now to unblock
the builds.
Now that we are using node 16, peer dependencies are much more
strict about aligning between all of our dependencies.
This PR downgrades react from 17 to 16 (no changes) and upgrades
paragon and frontend-lib-special-exams to all be on the same
page about what peer dependency ranges are valid.
A partner was not happy with messaging for a course whose
students were in the "earned-not-available" state. This aims to make the
messaging more clear.
I had previously made a "fix" to strip all inaccessible sequences
from the learning sequence outline hierarachy, as a way to filter
out unreleased sequences. See commit d1f19a9.
But that was too big a hammer and stripped a lot of released-but-
inaccessible sequences too (e.g. prerequisites).
So now, we adopt a more nuanced approach and explicitly just filter
out sequences that are both inaccessible AND unreleased.
AA-1219
Remove redundant fields from courseware API. These are all found in courseHome:
- number
- org
- originalUserIsStaff
- isStaff
- verifiedMode
- isMasquerading (virtual field from isStaff and originalUserIsStaff)
Rather than recompute it ourselves. Now that the backend is fixed
to consider only visible grades for the course grade, we don't need
to try to work around its logic (which is more accurate/consistent
in general).
AA-1217
Adds an alert to the courseware if the section is an Entrance Exam. Also
adds a listener to reload the page upon receiving a message from the LMS
indicating the user has now passed the exam.
Commit also contains misc. clean up for i18n messages switching to variable names.
Courseware and courseHome both provide tabs to the mfe.
This PR unifies the calls so that tab descriptions are only fetched from courseHome metadata
Remove jest-chain dependencies to make test errors more usable.
Also, drop our specific testing-library/dom dependency. We can
get it transitively though testing-library/react, and they are
coupled closely enough that we don't want them out of lockstep
anyway.
Thus, this commit also updates testing-library/dom to 8.x,
because that's what testing-library/react 12.x needs.
A collection of edx-owned npm updates. These required an actual
code change of using our own svg rather than directly loading an
svg from paragon, because paragon has its own svgo config that
can potentially conflict with our version of svgo - as it does
when we update frontend-build.
And with the latest versions of frontend-build, we can now use
the latest versions of paragon.
Header and footer updates thrown in for free.
* fix: [AA-1206] resolve access APIs
As part of eliminating redundant fields course_access was removed from
the Courseware metadata API. There are some differences between the
two APIs - courseware returned an error if the course had flags
preventing it from being loaded in the MFE, and courseHome had a
second field, can_load_courseware, that returned a boolean.
This fix unifies the handling of the access fields to behave consistently.
This was causing some errors ever since we started using the ref
in an event handler - I'm not entirely sure why the ref stops
being valid, unless it's a lifecycle thing. But anyway, this
seems to stop the error in testing.
Transifex is sunsetting anything below v3 later this year. Let's
get ahead of our scripts unexpectedly failing.
- Switch 'reactifex' dev dep to our maintained fork at
'@edx/reactifex' (it has an older released version number,
but it's still maintained unlike the original)
- Update Makefile commands for new v3 transifex API
No change on our end, this is just to get us as up-to-date as
possible.
This is the latest version of paragon we probably want to use as
long as we still claim to support IE11 via browserlist. We start
getting warnings about grid-auto-rows not being supported in IE11
beginning in paragon 19.4.0 with its new SelectableBox component.
To update our browerlist to drop IE11, we'll need to update our
node version. Which is in progress elsewhere. But for this series
of commits, I've gotten as far as I can / want to with paragon.
Adapt to the big <Card> redesign.
Also, as part of 19.0.0, the shadow variables in paragon got
marked as !default, letting the theme override them. This would
normally be fine and good. But the edx.org theme has a dramatically
larger shadow set. And a lot of our cards and card-like components
were designed with a smaller shadow in mind. So I added a new
raised-card custom css class to keep as many cards looking the same.
Notably, I cannot fix the data tables on the Progress tab. So those
might have a larger shadow with this change, but that's unavoidable
and presumably the intent of the edx.org theme authors.
- Drop our custom breakpoints (identical to paragon's)
- Drop our custom useWindowSize (and adapt to paragon's version
not providing a size initially at component mount)
- Drop our dependency on react-responsive
- Drop our dependency on react-break
Before, for sections, it would link you to the chapter which would
cause a JS error since the sequence endpoint expects sequentials.
This updates to now link to the first subsection within a section when
you hit the section breadcrumb
- Assume that Learning Sequences is available (waffle has been
removed)
- Stop calling course blocks API, which provided mostly duplicated
information now.
- Refactor a bit to avoid needing to globally know which units
exist in sequences. That is now provided just-in-time for only
the current sequence.
- Add /first and /last URLs that you can use instead of unit IDs
in URL paths, in service of the above point.
AA-1040
AA-1153
Pact is a testing library. It is not used in to run the
Learning MFE application. Therefore, it belongs in the
devDependencies section of package.json, not the
dependencies section.
This is the first step toward clearing out the redundant metadata from the
coursewareMetadata and getting it from a common source - the courseHomeMetadata.
remove username from coursewareMetadata
Remove courseAccess from coursewareMetadata.
Fix all unit tests
Modify classes that use metadataModel to use courseHomeMetadata for common data.
metadataModel still exists as a mechanism to distinguish if a component is under
courseware or courseHome, and it will be renamed or removed in a later refactor.
The logic to show the modal is controlled by the backend.
Displays the modal only in courseware the first time the learner
hits their weekly learning goal. After viewing the goal, the
database row is updated to not show the modal again.
Also updates first section celebration to use the StandardModal
component as the Modal component has been deprecated.
* fix: [AA-922] remove deprecated goals feature
While the new Weekly Learning Goals were being rolled out, the previous goal setting feature still existed behind a waffle flag.
The Weekly Learning Goals now become the one and only learning goal feature. It is managed behind the course_experience.enable_course_goals flag
- Remove original Goals panel and related components
- Remove references to weeklyLearningGoalEnabled Waffle flag
Learning Sequences (LS) don't need to edit unit blocks at all.
It's not their data and the stitching code didn't have all the
safety guards that the course block normalizer does in api.js.
This fixes an issue with degenerate course layouts (like problems
as direct children of sequences) when LS is enabled. It was trying
to stitch units and sequences together but failing to account for
unitIds that aren't actual units.
Which is technically still supported by the platform, though not
possible in Studio. We could try to do something smarter here, but
that's not LS's job - it should just trust that the unit data is
correctly normalized already. That unit loading code will
eventually move to the sequence metadata anyway (ideally) and LS
won't touch units at all.
AA-1162
if the user is masquerading as a specific learner, then dismiss the modal and do not post back and save the Honor Code signature
Co-authored-by: Simon Chen <schen@edX-C02FW0GUML85.local>
Make sure to always include the sequence ID when changing the URL
from the jump nav dropdown. We got the correct place eventually
anyway, but this avoids some API requests that we know will fail.
AA-1111
fix: [AA-1087] defer goals widget for proctoring
- pause showing goals widget while proctor info panel awaits callback.
- Implement tests to check that goals show up when
proctoring does not
- small refactoring of LearningGoalButton to eliminate test warnings
* fix: [AA-1044] add missing h2 for screenreaders
- Add placeholder h2 tag with message indicating reserve for future use
- internationalize placeholder text
When normalizing learning sequences, skip inaccessible sequences
and also skip sections with only inaccessible sequences.
This both imitates the legacy course block behavior and also
avoids a failure when merging course block data with LS data
when they disagree about which sequences exist.
This reverts commit f93519f675.
The original fix may have been working after all and a bogus
test by me using a staff account made me think the discount was
not being offered. Reverting the emergency fix and going to test
the original fix again.
It doesn't seem to be working - instead never calling ecommerce and
always showing the normal non-discount version of the streak modal.
Going to investigate later, but this is just a quick shutoff for
now.
In an attempt to debug some odd LMS errors (which would happen if
you loaded an MFE page with spaces instead of plus signs), this
commit notices page requests with spaces in the course key and
switches it out for plus signs, logging the incident.
* feat: [AA-906] UI for WeeklyLearningGoals
Add component to OutlineTab for selecting Weekly Learning Goals
Move start button to before course outline, and put in card with Call to action.
Unit tests
Implement temporary a11y feedback
add react-responsive as a dependency
Everything except for the start/resume button move is behind a waffle flag: course_goals.number_of_days_goals
* [feat] MICROBA-1523 Add notices redirect to learning MFE
To support the notices plugin on platform, this adds a redirect to the
course home page. If a user lands on that page and has not acknowledged
a notice, the user will be redirected to notice instead of the course
home.
In order to finish off TNL-7107 I needed to meet the acceptance criteria: When learners or educators select a section dropdown item they are taken to the first subsection within that section that is not completed by default. If all subsections are completed they should be taken to the first(subsection) in that section.
This reimagining of Jumpnav does that by lazy loading in the menuItem's destinations and routing the user using React-Router.
In order to finish off TNL-7107 I needed to meet the acceptance criteria: When learners or educators select a section dropdown item they are taken to the first subsection within that section that is not completed by default. If all subsections are completed they should be taken to the first(subsection) in that section.
This reimagining of Jumpnav does that by lazy loading in the menuItem's destinations and routing the user using React-Router.
This is a test, before making a more proper fix in frontend-build.
But I'd like to confirm this fixes some issues we've seen with
newrelic metrics.
AA-1015
Enable faster movement through the course content for learners and course instructors familiar with their course structure using jump navigation selectors in dropdown menus that augment our existing breadcrumbs in the learner sequence experience. When learners/instructors click on sections or subsections these menus are revealed and can be selected to jump to this part of the course.
Implemented using paragon's Selectmenu component, and data from the learning_sequences API.
Note: as the L_S api does not yet have completion data, we are holding off on accepting the completion ACs.
Smoke testing and QA testing will be required, as this feature is prominent in the learner experience.
The feature is presently only rolled out on stage, but will FF to roll out to instructors on test soon.
Normally, these sequences are skipped. But if the user manually
goes to the section, they should be notified why they can't access
it. That can easily happen if they bookmarked the page or something.
AA-1000
Describing the removal of calls to Course Blocks API for courseware
rendering, how those responsibilities would be split, and the motivation
for doing so. TNL-7326
[MST-746](https://openedx.atlassian.net/browse/MST-746)
The ProctoringInfoPanel displays information in a learner's course outline about the state of the learner's onboarding. It displays a link to navigate the learner to the onboarding exam if it is available. If the onboarding exam is not yet released, it displays information about the release date. This code changes adds an "Onboarding Past Due" message to the link if the onboarding is past due, as determined by a call to the LMS onboarding endpoint.
- Remove Jira tag from StreakCelebrationCouponEnabled prop
- Remove "experiment" from streak discount vars
- Cleaned up warning in unit test
- Added mock function for closeStreakCelebration
- Set End Date to 2 weeks from current date
- Updated unit tests
- Fixed naming issues
- Added official coupon code
- Cast isStreakCelebrationOpen to boolean
Co-authored-by: cdeery <cdeery@edx.edu>
URL format: /goal-unsubscribe/<uuid-token>
This is designed to be used in the new course goals feature, where
emails will be sent to learners and those emails will include a
link to this landing page, as an unsubscribe link.
Also, update calls to the LMS course home API to not include the
/v1/ fragment anymore, as we're moving to an unversioned API.
AA-907
* chore(deps): update dependency @edx/frontend-build to v8
* fix: install the util package, webpack5 no longer polyfills it
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Michael Terry <mterry@edx.org>
* chore(deps): update dependency husky to v7
* fix: migrate config from husky4 to husky7
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Michael Terry <mterry@edx.org>
Right To Left (RTL) languages need to reverse the
direction of the icons in navigation.
This fix corrects the arrows in UnitNavigation.jsx,
which were missed in the previous checkin.
Fixes: AA-891
Co-authored-by: cdeery <cdeery@edx.edu>
These redirects are already in place for the courseware, and will
redirect to the outline page, or the dashboard, or wherever, based
on the type of access error (unenrolled, access expired, survey
needed, etc).
This commit stops the course home tabs from paying attention to the
401 error messages coming from the backend - course_access in the
metadata API handles that now.
This commit also changes our useModel hook to more gracefully handle
not being able to find the model - it is a valid case we want to
allow (still will cause problems if you actually try to use the data,
but will at least provide an object you can inspect).
For performance and long term simplification reasons, we want to take
the work currently done by the Course Blocks API and split it up between
the Learning Sequences API (course outline) and Sequence Metadata API
(details about the Units in a Sequence). This will also make it easier
to later support different kinds of Sequences, where we might not know
all the details about it at the time we load the course-wide outline
data.
This starts moving over the responsibility for the high level outline
and metadata to Learning Sequences. It requires that the waffle flag
"learning_sequences.use_for_outlines" be active in the LMS. If that flag
is not active, the Learning Sequences API call will return a 403 error,
and this code will fall back to the older behavior.
Some data could not be shifted over yet. Namely:
* Sequence legacy URL is not currently output by the Learning Sequences
API. This is simple to add, but I don't know if there's any point in
adding it now that the Courseware MFE is functional for timed exams.
* Unit metadata was not completely shifted over to the Sequence Metadata
API because doing so would cause blocking requests and would cause a
noticeable performance regression. This should not be moved over until
the Sequence Metadata API can be made more performant.
* Effort Estimation currently relies on content introspection of the
underlying content in a way that the Learning Sequences API does not
support.
This is the last of a handful of PRs in support of TNL-8330.
We are sticking with the sequence version, and abandoning the section
version. This commit also marks the strings for translation, as it
is a real feature now, not just an experiment.
AA-659
The courseware was properly reading the access errors and
redirecting the user as appropriate (like to the dashboard or
whatever).
This requires a backend change to push the error along.
In https://github.com/edx/edx-platform/pull/28233, the logic was updated
to only return a URL if the content was still accessible to the learner.
This handles the case of the URL being null
[MICROBA-678]
When a certificate is in a unexpected state (i.e. notpassing with a
passing grade) this alert will allow the user to attempt to resolve the
issue on their own. It will run the code that checks the certificates
status. It requires that the course is configured to allow users to
Request Certificates though.
* feat: Timer bar on non-sequence pages
* chore: Update frontend-lib-special-exams version.
Co-authored-by: Viktor Rusakov <vrusakov66@gmail.com>
Co-authored-by: Igor Degtiarov <igor.degtiarov@raccoongang.com>
This PR fixes the anchor tag's position on the page when autoscrolling
is used. Previously, the scroll would move the element to the center of
the page. Now the scroll moves the element to the top of the page. The
only case where the element will not be at the top of the page is when
the element is too close to the bottom of the page and there is not
enough page remaining to force the element to the top.
* [feat] Add ID verification Alert to course home
if a user has a verified seat, but is in the unverified certificate
status state, the certificateStatusAlert will now show a message letting
the learner know they need to verify in order to earn a certificate.
This does not remove the message about the verification deadline in the
right sidebar of the course home.
Removes sequences we shouldn't see by using the Learning Sequences API
(TNL-8377). Depends on https://github.com/edx/edx-platform/pull/27955
It works by adding a call to the Learning Sequences API and (if that
endpoint is enabled, i.e. returns 200 for this user+course), uses the
results of that endpoint to remove sequences from the Course Blocks API
call. Learning Sequences knows how to do things like bubble up the
content group settings of units to sequences for the case where all
units have the same restrictions and the user would see an empty
sequence.
This fixes a bug where if the learner needs an integrity signature, but
the unit is not graded, neither the honor code panel nor the unit
content would display.
REV-2233: The upsell banner now duplicates the sidebar banner. Removing it in favor of the new implementation on course home, but keeping the masquerade message that shows instructors when a learner lost access to the course.
This PR adds a URL hash check to useEffect. Previously the anchor tags
that use jump_to_id would remain at the top of the page. As a result,
users would have to manually scroll to the target location or just read
the full page. Now when the page has a URL hash, it will send the hash
to the listener in the iframe. Using the message listener, it receives
an object with offset in the event.data and the page will scroll to the
location provided by offset. This change will impact the Learner in the
New Experience view.
REV-2233: The upsell banner now duplicates the sidebar banner. Removing it in favor of the new implementation on course home, but keeping the masquerade message that shows instructors when a learner lost access to the course.
This feature will allow users with downloadable PDF certificates to see
the certificate status alert and then access their certificate on the
Course Outline page. This should only show once a learner has earned a
certificate and that certificate is available.
No idea why this would happen honestly - it looks always defined
from the backend, and api.js doesn't transorm it. But we are seeing
JS errors related to it. So trying this as a first pass.
AA-848
statuses
[MICROBA-678]
These changes refactor the CertificateAvailableAlert and add new
features to it to support more status alerts for certificates. It
attempts to do so in an iterative manner so that new/updated alerts can
be included over time.
This PR adds a listener check to messages. Previously the anchor tags that were set to scroll on the page to another element would open the link outside of the iframe and redirect the parent page. As a result, users would have to have to click the back arrow to navigate back to the course and continue the unit. Now when the listener receives an object with offset in the event.data, the page will scroll to the location provided by offset. The offset is only received when a user clicks on an anchor tag in the unit iframe that focuses on another element on the page. This change will impact the Learner.
Jira issue: TNL-8312
Unit titles were being written to the page as <h2> because the old
courseware experience reserved <h1> for wrapping the header logo link.
We've since determined that this is not a best practice, and the new
courseware MFE in this repo no longer uses a <h1> for that purpose, but
the Unit title was never promoted from <h2> to <h1> until this commit.
Course teams have traditionally been permitted to use <h3>-<h6> in their
content. Making this change does mean that there will now be a gap with
some content, where we skip from <h1> to <h3>. For the short term, we
are NOT recommending course teams use <h2>, until we have a better
chance to evaluate whether that heading should remain reserved for
platform-level use.
This component blocks access to graded units when
the user is required to sign the integrity agreement for
the course. Once signed, it will not appear for the course
again.
Ignored errors are sent to New Relic as page actions instead of JS errors,
allowing those errors to still be tracked as occurring but without causing
unnecessary alerts.
Ignored errors are configured per-MFE, *not* globally.
Bump the frontend-platform version to 1.10.2.
Add IGNORED_ERROR_REGEX variable for use in development. The actual
production value will be read from the YAML in edx-internal.
TNL-7924
MST-700. Remove language that says learners with a verified onboarding can take exams. This created confusion for learners who did not realize they must also complete IDV before taking a proctored exam.
They've changed to proper new-style handlers, so the URL also
changed. This will let us get the fix for green checkmarks showing
up as audit users pass FBE units, even though those units aren't
actually complete.
AA-409
Currently, course staff can always view their courses
in the Legacy courseware experience.
With this change, course staff will *not* be able
to view their courses if the New (MFE) courseware
experience has been enabled for them.
This does not affect global staff, and it does not
affect courses that are still running in the Legacy
experience.
Adds a new parameter returned by the course metadata API
used by the courseware MFE to determine if the button to
show legacy experience should be displayed or not.
TNL-8203
Our current version on react-intl doesn't support hourCycle
anyway and after speaking to product, we feel comfortable with
letting it default based on locale.
We had a bug reported where learners were seeing a due date like
March 24, 24:59 instead of March 25, 00:59. This is a bug that only
shows up in Chrome. The hour12 flag overrides the hourCycle flag so
we are just going to swap the two. h23 means a 24 hour format ranging
from 0-23 (there also exists a h24 option which goes from 1-24).
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
for any additional details on the options.
Set the `allow` attribute of the unit iframe to allow
access to camera, MIDI, location, and encrpyted media.
Access to these features was implicitly allowed in older
browser versions. However, in the current versions of
at least Chromium and Firefox, iframed content must be
explicitly granted the ability to request media access.
This fixes a bug where content requiring microphone
access did not work in the Learning MFE.
TNL-7675
Before edx-platform version 19ba691,
only `lms_web_url` was exposed from the course
blocks API. Now that the API also exposes
`legacy_web_url`, we can stop falling back
to `lms_web_url` when `legacy_web_url` is
absent.
TNL-7796
As part of making the new courseware experience the
default for staff, the LMS /jump_to/ links that are
exposed by the Course Blocks API via the `lms_web_url`
field will soon direct users to whichever experience
is active to them (instead of always directing to
the legacy experience & relying on the learner
redirect).
Because of this, the MFE can no longer rely on
`lms_web_url` to land a staff user to the legacy
experience. However, the aformentioned change
will also introduce a `legacy_web_url` field
to the API, which we *can* use for this purpose.
TNL-7796
Valid courseware URLs currently include:
* /course/:courseId
* /course/:courseId/:sequenceId
* /course/:courseId/:sequenceId/:unitId
In this commit we add support for:
* /course/:courseId/:sectionId
* /course/:courseId/:sectionId/:unitId
* /course/:courseId/:unitId
All URL forms still redirect to:
/course/:courseId/:sequenceId/:unitId
See ADR #8 for more context.
All changes:
* refactor: allow courseBlocks factory to build multiple sections
* refactor: make CoursewareContainer tests less brittle & stateful
* feat: handle courseware paths more liberally
* refactor: reorder, rename, & comment redirection functions
TNL-7796
x icon that was added to paragon as part of the streak celebration modal is redundant with the x added to only the first section celebration modal
AA-713
Show learners a celebratory modal if they visit the learning mfe for 3 days in a row. Call edx-platform API to determine if they should see the celebration.
AA-304
If an offer is active for the user, show the discounted price (and
a struck-out original price) on upgrade buttons in the course sock
and outline sidebar.
Also show the discount code and price in the course exit upgrade
screen.
* Add back classes to first purchase offer banner that are used in the REV-1512 optimizely test
* Add notification header with an X to hide the flyover box
This is admittedly the much abridged version, but...
Due to changes at Travis-CI that lead to prohibitively slow build/wait
times, we (edx) decided to switch CI/validation provider to Github
Actions [1].
While we had originally intended to keep the integration available,
following Travis-CI's drop in available open-source credits, it no
longer appears to be a viable option for the community.
As such, and given our already present vendor lock-in at Github,
we recommend using Github Actions for CI/validation in this repo.
However, for those not hosting in the Github ecosystem, you can
configure your testrunner to run `make validate.ci`, for the same
effect; the Github Action is just a wrapper for this call.
- [0] Fixes: TNL-7784
- [1] #276
* Rebranding course license
- Fixing horizontal padding
- Setting color to gray 500
- Removing unnecessary a:hover color
- Removing unneeded CSS classes (sequence-footer, course-license, and license-text)
- Removing unnecessary spans
* Removing all usages of theme-color.
* Removing underline from “Help” button in header
* Use outline-primary for user menu button in header.
* Revert text-decoration-none on Help link
This is unnecessary now - it’s fixed at the brand level.
* Rebranding breadcrumbs to be primary-500.
* Set styling for Unit title to h3.
* Setting bookmark button color to primary-500
* Aligning current selection line to be inside dropdown, not outside.
* Adjusting sequence dropdown colors
Gray 700 for non-active units, primary 500 for active unit icon.
* Remove custom btn-outline-light config
We no longer use it in this MFE and the color palette in paragon/the brand has changed anyway.
* Let the stylesheet breathe!
Note: I tried directly invoking `codecov`, but it "couldn't tell" that
it was running in a GA/CI container, so I've opted for using the GA
codecov integration, which does work as expected.
* Update MFE to use the new “brand-openedx” repository.
This will allow the MFE to be re-branded by overriding this default implementation. More detail here:
https://github.com/edx/brand-openedx
* Removing unused frontend-component-header module.
This app doesn’t use frontend-component-header. That it was a dependency is confusing and led me to believe I needed to wait for its rebrand to continue - not so. Removing the unused dependency.
* Adding quick comment describing the structure of gated_content
* Fixing course exit styling
* Changing LinkedIn icon
* fix: fix Instructor toolbar button styling
* Bumping footer, platform, and paragon versions.
* Using configured logo and favicon.
Co-authored-by: Carla Duarte <cduarte@edx.org>
Surprise, surprise.
Not sure how this wasn’t correct. The bug results in the content lock UI showing the name of the current section rather than the prerequisite when describing… the prerequisite.
Due to an unfortunate naming choice, we apparently had _not_ been
sending navigation events to the tracking logs' `/track` backend, but
just to the Segment.io tracking backend.
Note: There are still other portions of this repo _outside_ the learning
sequence (Course Tools, Celebration, etc.) that only send to Segment and
not the tracking logs, though maybe this is by design, those being "new"
events?
Once the dev server is up, visit http://localhost:2000/course/course-v1:edX+DemoX+Demo_Course to view the demo course. You can replace ``course-v1:edX+DemoX+Demo_Course`` with a different course key.
To use this application, `devstack <https://github.com/openedx/devstack>`__ must be running and you must be logged into it.
- Visit http://localhost:2000/course/course-v1:edX+DemoX+Demo_Course to view the demo course. You can replace ``course-v1:edX+DemoX+Demo_Course`` with a different course key.
**See [0009-courseware-api-direction.md](0009-courseware-api-direction.md) for updates!**
## Courseware data loading
Today we have strictly hierarchical courses - a course contains sections, which contain sequences, which contain units, which contain components.
@@ -37,6 +39,9 @@ Today, if the URL only specifies the course ID, we need to pick a sequence to sh
Similarly, if the URL doesn't contain a unit ID, we use the `position` field of the sequence to determine which unit we want to display from that sequence. If the position isn't specified in the sequence, we choose the first unit of the sequence. After determining which unit to display, we update the URL to match. After the URL is updated, the application will attempt to load that unit via an iFrame.
_This URL scheme has been expanded upon in
[ADR #8: Liberal courseware path handling](./0008-liberal-courseware-path-handling.md)._
## "Container" components vs. display components
This application makes use of a few "container" components at the top level - CoursewareContainer and CourseHomeContainer.
In order to allow for greater flexibility and separation of concerns, we're going to stop using the Course Blocks API for navigational data, and pull that data from the Learning Sequences Outlines API instead. The intention is to give us four distinct layers of courseware that can eventually be composed in different ways:
* Learning Context Metadata
* Learning Context Navigation
* Sequence Navigation
* Unit Rendering
Note that "Learning Context" is a generalization of "Course" that includes other things like Content Libraries, Learning Pathways, and potentially other logical groupings of content.
This is a refinement of [0002-courseware-page-decisions.md](0002-courseware-page-decisions.md). The fundamental layers remain the same, but this document tries to better clarify the boundaries and path forward for these layers. We're not making these layers completely swappable/pluggable now, but we should separate the data access in a way that allows for that in the future.
## Background
We currently make four primary requests to the LMS when rendering courseware instructional content:
4. Unit: `/xblock/{unitBlockUsageKey}` (rendered in an iframe)
There is a significant amount of overlap between the Course Blocks API and the others at the moment, since Course Blocks takes a static snapshot of the entire tree of course content at once. There are a few problems with the current arrangement:
* It's slow and complex. The Course Blocks API can be difficult to maintain and reason about, and trickier to optimize.
* Assuming that all course structures are the same makes it difficult to support other content types, like LabXchange Learning Pathways or adaptive content.
* The overlap between Course Blocks and the other APIs means that there can be conflicts about the state.
## Motivating Vision
We have seen a desire to extend or enhance the courseware experience in various ways:
Learning Context Navigation
* Allowing for shorter, human-readable URLs in courseware.
* Smaller courses that do not need the current navigational hierarchy.
* LabXchange pathways.
Sequence Navigation
* Adaptive content, where the full list of units is not known up front.
* More limited navigation, where content is pushed linearly, without the ability to jump ahead.
* Different layouts for content browsing.
Unit Rendering
* Use of QTI content (currently serviced by cc2olx conversion).
* Desire to experiment with a next-gen version of XBlock.
* Use of entirely LTI units.
The idea would be to insulate each layer from the layers above and below it. Sequence rendering shouldn't be affected by whether or not it's in a two level hierarchy (Course → Section → Sequence), or a flat one (Course → Sequence). Learning Context Navigation should be able to reference Sequences without caring if a Sequence is an adaptive one or not. Sequences should be able to have a common interface to call Unit iframes, whether those Units are rendering XBlocks or QTI content.
Note that supporting these types of course structures would require downstream changes in other systems as well (e.g. analytics).
## Next Step: Removing use of the Course Blocks API.
The next step in this process is to remove the call to the Course Blocks API, and split its responsibilities across just the existing Learning Sequences Outline and Sequence Metadata APIs. This will involve at least a couple of steps.
### Complete rollout of Learning Sequences Outline calls.
We're currently in a transitional state between these APIs where the Learning Sequences Outline calls are only rolled out on a small handful of courses.
### Shift Sequence and Unit metadata to only come from Sequence Metadata API.
We currently pull this information from both Course Blocks and the Sequence Metadata API. We can consolidate on just the Sequence Metadata API. There is also server side optimization that can be done with the Sequence Metadata API calls as part of this work.
You can define plugin in `env.config.jsx` see `example.env.config.jsx` as example.
## Current caveat
- The way for how I deal with override method is still wonky
- The redux still require middleware to ignore the plugin's action from serializing
- I am not sure how it behave with useCallback, useMemo, ...etc
- There are still open question on how to write it properly
## Current work that should consider core part and extendable for the future plugin framework
-`usePluingsCallback` is the callback supose to be some level of equality to be using `React.useCallback`. It would try to execute the function, then any plugin that try `registerOverrideMethod`. The order of the it being run isn't the determined. There are a couple things I want to add:
- I might consider testing it with `zustand` library to make sure it is portable and not rely on `redux`. I tried to do this with provider, but it seems to run into infinite loop of trigger changed.
-`registerOverrideMethod` is working like a way to register callback that behave like a middleware. It ran the default one, then pass the result of the default one to the plugin. Any plugin that register the override can update the value. Alternatively, we can override the function completely instead applying each affect. Or we can support both. But it requires a bit more thought out architecture.
defaultMessage="Course starts {timeRemaining} at {courseStartTime}."
@@ -42,7 +52,6 @@ function CourseStartAlert({ payload }) {
day="numeric"
month="short"
year="numeric"
hour12={false}
timeZoneName="short"
value={startDate}
{...timezoneFormatArgs}
@@ -56,10 +65,10 @@ function CourseStartAlert({ payload }) {
}
return(
<Alerttype={ALERT_TYPES.INFO}>
<Alertvariant="info"icon={Info}>
<strong>
<FormattedMessage
id="learning.outline.alert.end.long"
id="learning.outline.alert.start.long"
defaultMessage="Course starts {timeRemaining} on {courseStartDate}."
description="Used when the time remaining is more than a day away."
values={{
@@ -79,18 +88,17 @@ function CourseStartAlert({ payload }) {
</strong>
<br/>
<FormattedMessage
id="learning.outline.alert.end.calendar"
id="learning.outline.alert.start.calendar"
defaultMessage="Don’t forget to add a calendar reminder!"
description="It's just a recommendation for learners to set a reminder for the course starting date and is shown when the course starting date is more than a day. "
defaultMessage="This learner does not yet have access to this course. The course starts on {date}."
description="It's a warning that is shown to course author when being masqueraded as learner, while the course hasn't started for the real learner yet."
defaultMessage:'You are viewing this course as staff, and are not enrolled.',
description:'Message shown to indicate that a user is not enrolled, but is able to view a course anyway because they are staff. Shown as part of an alert, along with a link to enroll.',
},
enroll:{
id:'learning.enrollment.enroll.now',
defaultMessage:'Enroll Now',
enrollNowInline:{
id:'learning.enrollment.enrollNow.Inline',
defaultMessage:'Enroll now',
description:'A link prompting the user to click on it to enroll in the currently viewed course.'
+'This text is meant to be used at the beginning of a sentence (example: Enroll now to view course content.)',
},
enrollNowSentence:{
id:'learning.enrollment.enrollNow.Sentence',
defaultMessage:'Enroll now.',
description:'A link prompting the user to click on it to enroll in the currently viewed course.',
defaultMessage:'To access course materials, you must score {entranceExamMinimumScorePct}% or higher on this exam. Your current score is {entranceExamCurrentScore}%.',
},
entranceExamTextPassed:{
id:'learn.sequence.entranceExamTextPassed',
defaultMessage:'Your score is {entranceExamCurrentScore}%. You have passed the entrance exam.',
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.