add live view breadcrumb

add courseId to courseMetadata

add locationId constant

update to requested course id

add ora url next to the title
This commit is contained in:
Leangseu Kim
2021-09-29 10:57:09 -04:00
parent 16b9967b1f
commit 96bb8a03e5
9 changed files with 57 additions and 9 deletions

View File

@@ -2,3 +2,4 @@ import { getConfig } from '@edx/frontend-platform';
// eslint-disable-next-line import/prefer-default-export
export const routePath = `${getConfig().PUBLIC_PATH}:courseId`;
export const locationId = window.location.pathname.slice(1)

View File

@@ -13,6 +13,7 @@ const initialState = {
name: '',
number: '',
org: '',
courseId: '',
},
showReview: false,
showRubric: false,

View File

@@ -9,6 +9,7 @@ export const simpleSelectors = {
showRubric: state => state.app.showRubric,
grading: state => state.app.grading,
courseMetadata: state => state.app.courseMetadata,
courseId: state => state.app.courseMetadata.courseId,
oraName: state => state.app.oraMetadata.name,
oraPrompt: state => state.app.oraMetadata.prompt,
oraTypes: state => state.app.oraMetadata.type,

View File

@@ -23,7 +23,7 @@ const mockFailure = (returnValFn) => (...args) => (
* get('/api/initialize', { ora_location, course_id? })
* @return {
* oraMetadata: { name, prompt, type ('individual' vs 'team') },
* courseMetadata: { courseOrg, courseName, courseNumber },
* courseMetadata: { courseOrg, courseName, courseNumber, courseId },
* submissions: {
* [submissionId]: {
* id: <submissionId>, (not currently used)

View File

@@ -1,5 +1,6 @@
export const org = 'AuroraU';
export const number = '101';
export const title = 'Time Travel 101';
export const courseId = 'course-v1:Foo+TT101+R0';
export default { org, number, title };
export default { org, number, title, courseId };

View File

@@ -2,8 +2,7 @@ import { StrictDict } from 'utils';
import actions from 'data/actions';
import api from 'data/services/lms/api';
const locationId = window.location.pathname.slice(1);
import { locationId } from '../constants/app';
/**
* initialize the app, loading ora and course metadata from the api, and loading the initial