fix: user content unavailable content issue for learner (#674)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -76,10 +76,12 @@ export const selectIsUserLearner = createSelector(
|
||||
userIsCourseAdmin,
|
||||
userIsCourseStaff,
|
||||
) => (
|
||||
!userHasModerationPrivileges
|
||||
&& !userIsGroupTa
|
||||
&& !userIsStaff
|
||||
&& !userIsCourseAdmin
|
||||
&& !userIsCourseStaff
|
||||
(
|
||||
!userHasModerationPrivileges
|
||||
&& !userIsGroupTa
|
||||
&& !userIsStaff
|
||||
&& !userIsCourseAdmin
|
||||
&& !userIsCourseStaff
|
||||
) || false
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user