Commit Graph

29 Commits

Author SHA1 Message Date
Jesper Hodge
8385c4e8ed Feat course optimizer page (#1533)
Course Optimizer is a feature approved by the Openedx community that adds a "Course Optimizer" page to studio where users can run a scan of a course for broken links - links that point to pages that have a 404.

Depends on backend: openedx/edx-platform#35887 - test together.

This also requires adding a nav menu item to edx-platform legacy studio. That should be implemented before enabling the waffle flag on prod.

Links:
- [Internal JIRA ticket](https://2u-internal.atlassian.net/browse/TNL-11809)
- [Course Optimizer Discovery](https://2u-internal.atlassian.net/wiki/spaces/TNL/pages/1426587703/TNL-11744+Course+Optimizer+Discovery)
- [Openedx community proposal](https://github.com/openedx/platform-roadmap/issues/388)
2025-01-13 11:44:25 -05:00
Kshitij Sobti
4d4adce715 feat: Use configured DEFAULT_GRADE_DESIGNATIONS (#1227)
Support was recently added to edx-platform to add customisised default grade
designations, this change adds support for them to this MFE as well to bring it
to partiy with the edx-platform UI

It also refactors the grading-settings page to use React Query and updates the
logic used when partitioning grades by default to make it work better when there
are more than 5 partitions.

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
2024-10-25 15:34:04 +05:30
vladislavkeblysh
65f45f72f0 feat: [FC-0044] Textbooks Page (#890)
Implement Textbooks page.

---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
2024-04-30 18:38:43 -03:00
ruzniaievdm
907ce50071 feat: [FC-0044] group configurations MFE page (#929)
* feat: group configurations - index page

* feat: [AXIMST-63] Index group configurations page

* fix: resolve discussions

* fix: resolve second round discussions

* feat: group configurations - content group actions

* feat: [AXIMST-75, AXIMST-69, AXIMST-81] Content group actions

* fix: resolve conversations

* feat: group configurations - sidebar

* feat: [AXIMST-87] group-configuration page sidebar

* refactor: [AXIMST-87] add changes after review

* refactor: [AXIMST-87] add changes after review

* refactor: [AXIMST-87] add changes ater review

---------

Co-authored-by: Kyrylo Hudym-Levkovych <kyr.hudym@kyrs-MacBook-Pro.local>

* fix: group configurations - the page reloads after the user saves changes

* feat: group configurations - experiment groups

* feat: [AXIMST-93, 99, 105] Group configuration - Experiment Groups

* fix: [AXIMST-518, 537] Group configuration - resolve bugs

* fix: review discussions

* fix: revert classname case

* fix: group configurations - resolve discussions

fix: [AXIMST-714] icon is aligned with text (#210)

* fix: add hook tests

* fix: add thunk tests

* fix: add slice tests

* chore: group configurations - messages

* fix: group configurations - remove delete in edit mode

---------

Co-authored-by: Kyr <40792129+khudym@users.noreply.github.com>
Co-authored-by: Kyrylo Hudym-Levkovych <kyr.hudym@kyrs-MacBook-Pro.local>
Co-authored-by: monteri <lansevermore>
2024-04-23 11:53:49 -04:00
Kyr
e306b62dd1 feat: [FC-0044] Certificates page (#872)
* feat: [FC-0044]  Certificates page

* feat: add descriptions for details, signatories, sidebar i18n messages

---------

Co-authored-by: Kyrylo Hudym-Levkovych <kyr.hudym@kyrs-MacBook-Pro.local>
2024-04-04 13:28:04 -04:00
Kristin Aoki
8100281fb4 feat: add checklist page (#870)
* feat: add checklist page

* fix: failing tests

* fix: styling bugs

* fix: lint errors

* feat: add test fro CourseChecklist

* fix: lint errors

* feat: add ChecklistSection tests

* fix: lint error

* fix: missing api reply status
2024-03-07 15:20:33 -05:00
Kristin Aoki
f717cdac86 feat: add accessibility page (#861)
* feat: add accessibility page

* fix: lint errors

* feat: increase code coverage

* fix: lint errors
2024-03-05 12:15:58 -05:00
Braden MacDonald
3c661e15cb Convert "Pages & Resources" page to a plugin system (#638)
* feat: Make "Pages & Resources" course apps into plugins

* feat: move ora_settings

* feat: move proctoring

* feat: move progress

* feat: move teams

* feat: move wiki

* feat: move Xpert settings

* fix: add webpack.prod.config.js

* fix: clean up unused parts of package.json files

* feat: Add an error message when displaying a Course App Plugin fails

* chore: fix various eslint warnings

* chore: fix jest tests

* fix: error preventing "npm ci" from working

* feat: better tests for <SettingsComponent>

* chore: move xpert_unit_summary into same dir as other plugins

* fix: eslint-import-resolver-webpack is a dev dependency

* chore: move learning_assistant to be a plugin too

* feat: for compatibility, install 2U plugins by default

* fix: bug with learning_assistant package.json
2024-02-28 11:50:54 -05:00
Ihor Romaniuk
9c52b8b6c5 feat: [FC-0044] Unit page header section (#808)
* feat: create Unit page and add page header functionality

* fix: after code review

---------

Co-authored-by: monteri <lansevermore>
2024-02-05 11:58:35 -05:00
Navin Karkera
04c14274fd feat: course outline page (#694)
* feat: Course outline Top level page (#36)

* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

feat: Course outline Status Bar (#50)

* feat: [2u-259] add components

* feat: [2u-259] fix sidebar

* feat: [2u-259] add tests, fix links

* feat: [2u-259] fix messages

* feat: [2u-159] fix reducer and sidebar

* feat: add checklist

* feat: [2u-259] fix reducer

* feat: [2u-259] remove warning from selectors

* feat: [2u-259] remove indents

* feat: [2u-259] add api, enable modal

* feat: [2u-259] add tests

* feat: [2u-259] add translates

* feat: [2u-271] fix transalates

* feat: [2u-281] fix isQuery pending, utils, hooks

* feat: [2u-281] fix useScrollToHashElement

* feat: [2u-271] fix imports

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

feat: Course Outline Reindex (#55)

* feat: [2u-277] add alerts

* feat: [2u-277] add translates

* feat: [2u-277] fix tests

* fix: [2u-277] fix slice and hook

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

fix: Course outline tests (#56)

* fix: fixed course outline status bar tests

* fix: fixed course outline status bar tests

* fix: fixed course outline enable highlights modal tests

* fix: enable modal tests

fix: increase code coverage on the page

* refactor: improve course outline page

feat: lms live link

chore: update outline link

fix: course outline link

refactor: remove unnecessary css and rename test file

refactor: remove unnecessary css from outlineSidebar

test: make use of message variable instead of hardcoded text

refactor: remove unnecessary h5 class

test: use test id for detecting component

refactor: update course outline url and some default messages

---------

Co-authored-by: vladislavkeblysh <138868841+vladislavkeblysh@users.noreply.github.com>
2023-12-06 10:06:29 -05:00
Kristin Aoki
78eb512836 refactor: files-and-videos folder (#672) 2023-11-08 15:54:47 -05:00
Kristin Aoki
a28338df30 feat: add video page (#640) 2023-11-06 08:51:21 -05:00
Kyrylo Kholodenko
2ea876ae4f feat: implement import page (#587) 2023-09-25 12:07:08 -04:00
ruzniaievdm
e099243437 feat: create Studio Home Page MFE (#589) 2023-09-19 10:04:43 -04:00
Kyrylo Kholodenko
1888993113 feat: implement export page (#586) 2023-09-14 09:07:24 -04:00
Kyrylo Kholodenko
a1793efcc0 feat: add help-urls (#585) 2023-09-05 14:17:39 -04:00
vladislavkeblysh
ffae3bd868 feat: Created Course updates page (#581) 2023-08-31 10:56:45 -04:00
vladislavkeblysh
2e8eed7504 feat: Created Course Team (#564) 2023-08-23 09:21:43 -04:00
Peter Kulko
f9bc5c4927 feat: created Grading page (#557) 2023-08-14 14:44:01 -04:00
ruzniaievdm
a0e37c0357 feat: Added Schedule and Details MFE page (#547) 2023-08-08 09:49:53 -04:00
Kristin Aoki
b9feb50a2c feat: add files and uploads page (#541) 2023-08-04 11:57:44 -04:00
Peter Kulko
87ead24e20 feat: added Advanced settings page (#521)
Co-authored-by: sendr <sendr84@gmail.com>
Co-authored-by: ruzniaievdm <ruzniaievdm@gmail.com>
2023-07-19 10:45:50 -04:00
Kristin Aoki
139457087b feat: add custom pages (#510) 2023-06-27 16:26:35 -04:00
Muhammad Adeel Tajamul
3836b4328e feat: course live integration (#271)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
2022-03-28 18:11:50 +05:00
João Cabrita
1a9f2b813a feat: Optionally display message on 403 and disable changing provider after course started [BD-38] [TNL-8142][BB-4253] (#126)
* feat: Prevent changing discussion providers after the course started.
* refactor: confirmation modal and update design according to Figma

Co-authored-by: Awais Ansari <awais.ansari63@gmail.com>
2021-08-11 15:00:28 +05:00
David Joy
a5d8cfff78 refactor: organizing discussions code into sub-modules to isolate state and remove complexity (#73)
* fix: removing unnecessary CSS classes and files

The .discussion-app-card and .features-table classes aren’t actually used - that means the AppList.scss file and pages-and-resources/index.scss above it can both be deleted.

* refactor: moving AppList components into app-list sub-directory.

* refactor: moving ConfigFormContainer and children into app-config-form sub-directory

* refactor: Renaming ConfigFormContainer to AppConfigForm

Makes it consistent with app-list/AppList.

* refactor: providing discussions path to sub-components via a context

This will be used in subsequent commits as we move functionality out of DiscussionsSettings.

* fix: change step two label to “Settings”

The mockups changed the label, which is great, since we’re aiming to remove the need for selectedAppId to be in DiscussionsSettings.  This is one step toward that.

This has the side effect of making app.name no longer necessary, which is great, since the app no longer contains its own name string.

* refactor: adding replacement data layer for app-list and app-config-form

This code is a replacement for the slice, thunks, and api in /discussions/data.  It’s an “expand” commit that adds the new implementation.  The next commit will use it, and the last will remove the old implementation.

Those files in /discussions/data contained API functions, thunks, and reducer state for two separate components (app-list and app-config-form) that don’t actually share any code.  Turns out they’re perfectly separable, and more understandable apart.

This new code isn’t used yet.

* refactor: add a context to provide a formRef to AppConfigForm components

This is an intermediary commit - it’ll likely fail linting since the whitespace is a bit off.  It’s also not doing anything yet - a subsequent commit will make use of this code (the provider and new ApplyButton component)

Today the DiscussionsSettings component needs to be responsible for form submission because it owns the “Apply” button that a user clicks to submit the form.  It declares a “formRef” which is passed into the form and attached to the form DOM element, and then the “Apply” button can call formRef.current.submit() to submit the form from DiscussionsSettings, even though the form itself is declared way down in a sub-module.

This is awkward, and forces this top level component to be smarter than it should be, and to know too much about its children.

An alternate pattern is to create a context provider (AppConfigFormProvider) which owns the formRef and is part of the sub-module.  Then create an AppConfigFormApplyButton component that knows how to pull that formRef out of the context and call submit on it.

This way, DiscussionsSettings doesn’t know anything about form submission, and we can move all that code into the app-config-form sub-module that should know about it.  Win!

Again, this commit just adds the code and inserts the provider into DiscussionsSettings - it doesn’t use it all yet.

* refactor: create AppListNextButton that knows how to move to step two of the Stepper

Like the previous commit, this will enable us to factor code out of DiscussionsSettings and into a sub-module where it is a more natural fit.

This AppListNextButton makes use of the `selectedAppId` we’ll be adding to our new app-list reducer in order to know which app has been selected in the list.  It can then use that to change the URL route.

In contrast to the previous commit, we use redux here instead of a context.  We used context for the formRef because we try to keep complex data types like that out of redux, and also because formRef is not _state_, but just an implementation detail of how we needed to wire everything up in a React app.  selectedAppId, on the other hand, is state, and so belongs in redux more naturally.

* refactor: cutting over to using the new discussions reducers

This commit will break everything, since the React components haven’t been updated to use the new reducer shape yet.  Subsequent commits will convert app-list and app-config-form over.

* refactor: remove app-list logic from DiscussionsSettings

This is a ‘contract’ commit which removes functionality from DiscussionsSettings and adds it to AppList.

A word of warning that I tried my best to separate this refactor from that of AppConfigForm, but this commit may not be perfect.  The original problem was that the two sub-modules were unnecessarily intertwined, making use of some shared variables when they didn’t need to (such as selectedAppId), so I can’t fully get app-list working without touching app-config-form as well… so this particular commit probably has logical errors and won’t build properly.  Taken together with the next commit for app-config-form, though, they move a significant amount of logic out of DiscussionsSettings and into the sub-modules and isolate them from each other.

You’ll see here that handleSelectApp and handleStartConfig move into the app-list sub-module.  The former goes into AppList, the latter was committed to AppListNextButton in a prior commit.

Once those two are gone, a bunch of other code in DiscussionsSettings starts falling away.  selectedAppId is still necessary since the config form handlers are using it, but we’ll see that disappear in the next commit.

* refactor: move app-config-form logic out of DiscussionsSettings

This is the last major commit.  It removes a handleApply and handleSubmit from DiscussionsSettings and then cleans up the various variables and imports which are no longer necessary.

handleApply moved into AppConfigFormApplyButton in a prior commit, and handleSubmit has moved into AppConfigForm itself.  Now DiscussionsSettings doesn’t know anything about forms or submission, we’ve successfully moved all that code down into sub-modules.

This commit also makes use of AppConfigFormApplyButton.

* refactor: remove old discussions reducers, thunks, and APIs

These three files are now obsolete and have been replaced by a new set of reducers in app-list and app-config-form, specific to those sub-modules specific functions.

This has the side effect of simplifying the naming of the state variables and making it easier to reason which variables are for what sub-module.  Prior to this refactor, there were several logical bugs where we were using a confusing combination of “selectedAppId” in local state, “displayedAppId” and “activeAppId” in redux, along with displayedAppConfigId, and it wasn’t quite clear what was for which part of the app, and mis-use was causing some loading and state errors as users navigated around.

The “status” variable in this reducer was also problematic, as we have two separate async requests we’re trying to track the status of - fetchApps and fetchAppConfig.  The app was getting confused about what was loaded and what was still loading, which actually caused an infinite loop for me before choosing to refactor (state changes from the two requests were invalidating the state of the other, toggling back and forth between LOADED and LOADING)

* refactor: moving authoring.discussions.heading fix into the right messages file
2021-04-07 13:47:34 -04:00
David Joy
6f762edbd3 Discussions config UI part 2 - FullScreenModal and Stepper! (#53)
* Bumping paragon version to latest.

* Modifying event handlers to be named with “on” prefix instead of “Handler” suffix

* Tweaking a message id.

* Removing “Discussion” prefix from discussions components.

Seems unnecessary.

* Backing pages & resources view with data handling.

It still has the list of pages hard coded.

* Adding FullScreenModal and Stepper components.

These components are pretty close to their final form.  They could benefit from some snapshot tests and such; there isn’t much actual functionality in ‘em.

Stepper will get a bit more functionality when we add the dynamic drop shadow behavior.  Depending on whether the stepper body is at the top or bottom, drop shadows on the header and footer should appear or disappear to indicate more content exists above or below the viewport.

* Moving discussions routes inside PagesAndResources

Note that the discussions component has been renamed - that’ll be coming in a subsequent commit.

Also trying to get consistent about calling it “discussions”

* AppList gets less responsibility

The AppList is now a child of the top-level “Discussions” component, so it’s no longer responsible for loading the app list or storing the state for the selected app ID.  It’s also given a handler for when an app is selected, and no longer has a button to configure the app.

* Fleshing out Discussions component

The top-level Discussions component (renamed from DiscussionsRoutes) is now responsible for a lot.

- it loads the app list
- it keeps track of selected app ID
- it has handlers for all the various user actions so they can be coordinated here at the top.
- it uses component composition to create the majority of the UI, folding together FullScreenModal and Stepper with its route-based views.

* Decomposing the app config form

The discussion app config form has been decomposed into a container responsible for loading app data, and a component specifically for the LTI configuration form.

In the future, ConfigFormContainer will get a second possible child for the edX Forums app, and will switch between the two forms based on the app being configured.

Note that I expect that some of the data loading logic from ConfigFormContainer may be better situated in the Discussions component… everything else is happening there, and it may make sense for it to handle loading the app config data as necessary as well.
2021-03-12 10:25:55 -05:00
David Joy
9b2ad5e95d Backing discussions with data API/thunks/reducer. (#47)
* Backing discussions with data API/thunks/reducer.

This pulls all the data loading logic out of the React components and makes it significantly more flexible.

- Both apps and features have IDs and can be looked up in the store.
- The API layer is currently just returning hard coded data.
- LOADED and LOADING statuses are available to implement loading spinners and feedback.
- The taxonomy has been changed a bit - “forums and “tools” are now consistently referred to as “apps” - this code is almost completely agnostic to discussions, meaning that it could easily be repurposed for other kinds of apps, such as proctoring providers.

* Using ‘app’ and ‘name language in DiscussionAppCard messages.

* Using the selectedApp’s name for the Configure button.

* Misc review fixes

- better comment on error handling
- Fixing some CSS class names.
2021-01-11 15:52:24 -05:00
David Joy
9c63ab8044 Refactoring and organization (#41)
* Updating dependencies and removing unneeded ones.

* Fixing broken IntlProvider attribute in ProctoredExamSettings test.

* package-lock.json was out of sync - checking it in.

* Initializing an empty redux store.

* Adding model-store from frontend-app-learning.

This will let us save data from the server in a normalized way in redux, reducing boilerplate in React components.

* Fixing paragon button usage.

(also just organizing the imports while I was there…)

* Using paragon button instead of an anchor tag.

For the “New Page” button in the pages & resources view.

* Add API, reducers, and thunks to add course detail data into redux.

Subsequent PR will use this to store course detail data for use across different pages in the application.

* Prep work to add CourseAuthoringPage component.

Decided the course-detail sub-directory didn’t make much sense, given component structure, and moved it up to src.

These functions will be used in a CourseAuthoringPage component to load course detail data and display the Header and Footer in one common place, wrapping all the existing course authoring pages (proctoring and pages & resources)

It will also replace LmsApiService.js

* Minor style refactorings.

(This commit had originally made some changes to how courseId was passed in to these two components, but I decided to back it out… but the style stuff is worth adding as a fixed nit.)

* Refactor course detail loading and top-level course authoring components

This commit does a few things:

- Factors course detail data loading out of the Header.
- Loads that data in CourseAuthoringPage instead, adding it to redux and then passing it to the Header from there.
- Deletes LmsApiService, which is no longer used.
- Changes the route paths to be more canonical and entity-oriented, i.e., the first part of the route is the course, followed by the specific page about that course to load, rather than the other way around.  This more naturally allows us to use react-router to extract the common course detail loading code that only depends on the courseId.

* Refactoring routes code a bit to pass courseId into components

Didn’t like how CourseAuthoringPage, LegacyProctoringRoute, and CourseAuthoringRoutes all reached into the parent route to find the courseId, so passed it in instead.

* Updating README with more detail on routes in the MFE.
2021-01-07 13:16:35 -05:00