-
Notifications
You must be signed in to change notification settings - Fork 150
Convert "Pages & Resources" page to a plugin system #638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
b15ade4
371aa1d
c2fc5c9
e7af283
447dfbf
2ccc8cf
c81182f
d1be807
f89c60a
0a0695b
48ba65e
86b538a
b385541
dab1291
6d0481c
8d26ef2
dd45ac1
2ab6b2d
7257af9
10d6f3e
3235066
833845f
d869816
15ec549
decd291
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
|
||
import { useIntl } from '@edx/frontend-platform/i18n'; | ||
|
||
import AppSettingsModal from 'CourseAuthoring/pages-and-resources/app-settings-modal/AppSettingsModal'; | ||
import messages from './messages'; | ||
|
||
/** | ||
* Settings widget for the "calculator" Course App. | ||
* @param {{onClose: () => void}} props | ||
* @returns | ||
*/ | ||
const CalculatorSettings = ({ onClose }) => { | ||
const intl = useIntl(); | ||
return ( | ||
<AppSettingsModal | ||
appId="calculator" | ||
title={intl.formatMessage(messages.heading)} | ||
enableAppHelp={intl.formatMessage(messages.enableCalculatorHelp)} | ||
enableAppLabel={intl.formatMessage(messages.enableCalculatorLabel)} | ||
learnMoreText={intl.formatMessage(messages.enableCalculatorLink)} | ||
onClose={onClose} | ||
/> | ||
); | ||
}; | ||
|
||
export default CalculatorSettings; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@openedx-plugins/course-app-calculator", | ||
"version": "0.1.0", | ||
"description": "Calculator configuration for courses using it", | ||
"dependencies": { | ||
}, | ||
"devDependencies": {} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In case it's not clear, generally each plugin is just three files:
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
|
||
import { useIntl } from '@edx/frontend-platform/i18n'; | ||
|
||
import AppSettingsModal from 'CourseAuthoring/pages-and-resources/app-settings-modal/AppSettingsModal'; | ||
import messages from './messages'; | ||
|
||
/** | ||
* Settings widget for the "edxnotes" Course App. | ||
* @param {{onClose: () => void}} props | ||
* @returns | ||
*/ | ||
const NotesSettings = ({ onClose }) => { | ||
const intl = useIntl(); | ||
return ( | ||
<AppSettingsModal | ||
appId="edxnotes" | ||
title={intl.formatMessage(messages.heading)} | ||
enableAppHelp={intl.formatMessage(messages.enableNotesHelp)} | ||
enableAppLabel={intl.formatMessage(messages.enableNotesLabel)} | ||
learnMoreText={intl.formatMessage(messages.enableNotesLink)} | ||
onClose={onClose} | ||
/> | ||
); | ||
}; | ||
|
||
export default NotesSettings; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commentary: This file is mostly unchanged (just moved) but since I changed |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@openedx-plugins/course-app-edxnotes", | ||
"version": "0.1.0", | ||
"description": "edxnotes configuration for courses using it", | ||
"dependencies": { | ||
}, | ||
"devDependencies": {} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@openedx-plugins/course-app-live", | ||
"version": "0.1.0", | ||
"description": "Live course configuration for courses using it", | ||
"dependencies": { | ||
}, | ||
"devDependencies": {} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@openedx-plugins/course-app-ora_settings", | ||
"version": "0.1.0", | ||
"description": "Open Response Assessment configuration for courses using it", | ||
"dependencies": { | ||
}, | ||
"devDependencies": {} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@openedx-plugins/course-app-proctoring", | ||
"version": "0.1.0", | ||
"description": "Proctoring configuration for courses using it", | ||
"dependencies": { | ||
}, | ||
"devDependencies": {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commentary: This file is mostly unchanged (just moved) but since I changed
CalculatorSettings
to useuseIntl
instead ofinjectIntl
, the indentation all changed and git shows it in the diff as a new file.