fix: user content unavailable content issue for learner (#674)

This commit is contained in:
Awais Ansari
2024-02-28 18:04:02 +05:00
committed by GitHub
parent 6875165eb3
commit 3a7b7054e7
7 changed files with 75 additions and 106 deletions

View File

@@ -13,6 +13,7 @@ import { useIntl } from '@edx/frontend-platform/i18n';
import { AppContext } from '@edx/frontend-platform/react';
import { breakpoints, useWindowSize } from '@edx/paragon';
import fetchTab from '../../components/NavigationBar/data/thunks';
import { RequestStatus, Routes } from '../../data/constants';
import { selectTopicsUnderCategory } from '../../data/selectors';
import fetchCourseBlocks from '../../data/thunks';
@@ -79,6 +80,7 @@ export function useCourseDiscussionData(courseId) {
async function fetchBaseData() {
await dispatch(fetchCourseConfig(courseId));
await dispatch(fetchCourseBlocks(courseId, authenticatedUser.username));
await dispatch(fetchTab(courseId));
}
fetchBaseData();

View File

@@ -76,10 +76,12 @@ export const selectIsUserLearner = createSelector(
userIsCourseAdmin,
userIsCourseStaff,
) => (
!userHasModerationPrivileges
&& !userIsGroupTa
&& !userIsStaff
&& !userIsCourseAdmin
&& !userIsCourseStaff
(
!userHasModerationPrivileges
&& !userIsGroupTa
&& !userIsStaff
&& !userIsCourseAdmin
&& !userIsCourseStaff
) || false
),
);