fix: [AA-1018] api refactor

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.
This commit is contained in:
Chris Deery
2022-01-14 08:54:07 -05:00
parent 6db421eade
commit 3fe5bb1733
25 changed files with 127 additions and 62 deletions

View File

@@ -12,7 +12,7 @@ import messages from './messages';
function HonorCode({ intl, courseId }) {
const dispatch = useDispatch();
const coursewareMetaData = useModel('coursewareMeta', courseId);
const coursewareMetaData = useModel('courseHomeMeta', courseId);
const authUser = getAuthenticatedUser();
const siteName = getConfig().SITE_NAME;
const honorCodeUrl = `${getConfig().TERMS_OF_SERVICE_URL}#honor-code`;