Skip to content

Commit 18bcda9

Browse files
authored
Merge pull request #1622 from ActiveLearningStudio/release/develop-to-staging
Release/develop to staging
2 parents 2fa2bb4 + 7c15a52 commit 18bcda9

File tree

28 files changed

+6261
-2584
lines changed

28 files changed

+6261
-2584
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
"editor.formatOnSave": true,
4242
"diffEditor.ignoreTrimWhitespace": false,
4343
"prettier.printWidth": 70
44-
}
44+
}

src/components/ResourceCard/AddResource/Editors/H5PEditorV2.js

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ const H5PEditor = (props) => {
4949
}
5050
const dispatch = useDispatch();
5151
const history = useHistory();
52-
const { currentOrganization } = useSelector((state) => state.organization);
52+
const { currentOrganization } = useSelector(
53+
(state) => state.organization
54+
);
5355
const [submitAction, setSubmitAction] = useState(defaultState);
5456
const [h5pFile, setH5pFile] = useState(null);
5557

@@ -77,10 +79,11 @@ const H5PEditor = (props) => {
7779
loadH5pSettings(
7880
"H5P.BrightcoveInteractiveVideo 1.0",
7981
bcAccountId,
80-
apiSettingId
82+
apiSettingId,
83+
currentOrganization?.id
8184
);
8285
} else {
83-
loadH5pSettings();
86+
loadH5pSettings(null, null, null, currentOrganization?.id);
8487
}
8588
}, [loadH5pSettings]);
8689

@@ -105,7 +108,9 @@ const H5PEditor = (props) => {
105108
formData.education_level_id = formatSelectBoxData(
106109
formData.education_level_id
107110
);
108-
formData.author_tag_id = formatSelectBoxData(formData.author_tag_id);
111+
formData.author_tag_id = formatSelectBoxData(
112+
formData.author_tag_id
113+
);
109114
const { metadata } = parameters;
110115
if (metadata?.title !== undefined) {
111116
if (editActivity) {
@@ -124,7 +129,9 @@ const H5PEditor = (props) => {
124129
if (activityPreview) {
125130
const h5pdata = {
126131
library: window.h5peditorCopy.getLibrary(),
127-
parameters: JSON.stringify(window.h5peditorCopy.getParams()),
132+
parameters: JSON.stringify(
133+
window.h5peditorCopy.getParams()
134+
),
128135
action: "create",
129136
};
130137
await dispatch(
@@ -157,7 +164,10 @@ const H5PEditor = (props) => {
157164
if (activityPreview) {
158165
dispatch(
159166
createIndResourceAction(
160-
{ ...formData, title: metadata?.title || formData.title },
167+
{
168+
...formData,
169+
title: metadata?.title || formData.title,
170+
},
161171
hide,
162172
accountId,
163173
settingId,
@@ -248,7 +258,9 @@ const H5PEditor = (props) => {
248258
type="hidden"
249259
name="parameters"
250260
id="laravel-h5p-parameters"
251-
value={h5pParams || JSON.parse('{"params":{},"metadata":{}}')}
261+
value={
262+
h5pParams || JSON.parse('{"params":{},"metadata":{}}')
263+
}
252264
/>
253265
<input
254266
type="hidden"
@@ -296,7 +308,10 @@ const H5PEditor = (props) => {
296308
// style={{ display: 'none' }}
297309
/>
298310
<div className="upload-holder">
299-
<FontAwesomeIcon icon="file-upload" className="mr-2" />
311+
<FontAwesomeIcon
312+
icon="file-upload"
313+
className="mr-2"
314+
/>
300315
<p>
301316
Drag & Drop File or
302317
<span>&nbsp;Browse to upload</span>
@@ -345,15 +360,19 @@ const H5PEditor = (props) => {
345360
</div>
346361
</div>
347362

348-
<div className="interactive-btns" style={{ marginTop: "20px" }}>
363+
<div
364+
className="interactive-btns"
365+
style={{ marginTop: "20px" }}
366+
>
349367
<div className="cancel">
350368
<div
351369
className="backclosemodel"
352370
width="151px"
353371
secondary
354372
onClick={() => {
355373
Swal.fire({
356-
text: "All changes will be lost if you don’t save them",
374+
text:
375+
"All changes will be lost if you don’t save them",
357376
icon: "warning",
358377
showCancelButton: true,
359378
confirmButtonColor: "#084892",
@@ -422,8 +441,12 @@ H5PEditor.defaultProps = {
422441
};
423442

424443
const mapDispatchToProps = (dispatch) => ({
425-
loadH5pSettings: (library, accountId, settingId) =>
426-
dispatch(loadH5pSettingsActivity(library, accountId, settingId)),
444+
loadH5pSettings: (library, accountId, settingId, orgId) =>
445+
dispatch(
446+
loadH5pSettingsActivity(library, accountId, settingId, orgId)
447+
),
427448
});
428449

429-
export default withRouter(connect(null, mapDispatchToProps)(H5PEditor));
450+
export default withRouter(
451+
connect(null, mapDispatchToProps)(H5PEditor)
452+
);

src/components/models/GoogleLoginModal.js

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
publishActivitytoMicrosoftTeam,
3434
} from 'store/actions/share';
3535
import share from 'store/reducers/share';
36+
import './googleLoginModalStyle.scss';
3637
const domainName = window.__RUNTIME_CONFIG__.REACT_DOMAIN_URL;
3738

3839
const GoogleLoginModal = ({
@@ -306,7 +307,7 @@ const GoogleLoginModal = ({
306307
};
307308
return (
308309
<Modal open={show} onClose={onHide} center styles={{ borderRadius: '8px', height: '310px', width: '640px' }}>
309-
<div className="model-box-google model-box-view">
310+
<div className="model-box-google model-box-view google-publish-modal-container">
310311
<div style={{ textAlign: 'center', margin: '32px 146.38px 0 146.38px' }}>
311312
<img src={logo} alt="" />
312313
</div>
@@ -427,6 +428,7 @@ const GoogleLoginModal = ({
427428
/* and other goodies */
428429
}) => (
429430
<form onSubmit={handleSubmit}>
431+
<label>Select Class:</label>
430432
<select
431433
className="form-control select-dropdown"
432434
name="course"
@@ -454,37 +456,40 @@ const GoogleLoginModal = ({
454456
)}
455457
</select>
456458
{isShowPlaylistSelector && playlistId > 0 && !projectPlaylistPublishtoCanvas && (
457-
<select
458-
className="form-control select-dropdown"
459-
name="playlist"
460-
value={values.playlist}
461-
onChange={(e) => {
462-
handleChange(e);
463-
onTopicChange(e);
464-
}}
465-
onBlur={handleBlur}
466-
>
467-
<option>Create a new topic</option>
468-
{!!topics &&
469-
topics.map((topic) => {
470-
if (isCanvas) {
471-
return (
472-
<option key={topic.id} value={topic.id}>
473-
{topic.name}
474-
</option>
475-
);
476-
} else {
477-
return (
478-
<option key={topic.topicId} value={topic.topicId}>
479-
{topic.name}
480-
</option>
481-
);
482-
}
483-
})}
484-
</select>
459+
<>
460+
<label>Select Topic:</label>
461+
<select
462+
className="form-control select-dropdown"
463+
name="playlist"
464+
value={values.playlist}
465+
onChange={(e) => {
466+
handleChange(e);
467+
onTopicChange(e);
468+
}}
469+
onBlur={handleBlur}
470+
>
471+
<option>Create a new topic</option>
472+
{!!topics &&
473+
topics.map((topic) => {
474+
if (isCanvas) {
475+
return (
476+
<option key={topic.id} value={topic.id}>
477+
{topic.name}
478+
</option>
479+
);
480+
} else {
481+
return (
482+
<option key={topic.topicId} value={topic.topicId}>
483+
{topic.name}
484+
</option>
485+
);
486+
}
487+
})}
488+
</select>
489+
</>
485490
)}
486491

487-
{<button type="submit">Confirm</button>}
492+
{<button type="submit" className="curriki-utility curriki-theme-primary-button">Confirm</button>}
488493
</form>
489494
)}
490495
</Formik>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.google-publish-modal-container {
2+
.curriki-theme-primary-button {
3+
margin-top: 2em;
4+
width: 8em;
5+
}
6+
7+
label {
8+
margin-top: 2em;
9+
width: 100%;
10+
font-size: larger;
11+
}
12+
13+
h1 {
14+
font-size: x-large;
15+
}
16+
17+
form {
18+
display: flex;
19+
flex-direction: column;
20+
align-items: center;
21+
}
22+
}

src/config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export default global.config = {
1010
domainUrl: window.__RUNTIME_CONFIG__?.REACT_DOMAIN_URL,
1111
teamsTenantId: window.__RUNTIME_CONFIG__?.REACT_MS_TENANT_ID,
1212
teamsClientId: window.__RUNTIME_CONFIG__?.REACT_MS_CLIENT_ID,
13-
teamsSecret: window.__RUNTIME_CONFIG__?.REACT_MS_SECRET,
1413

1514
// Safelearn
1615
safeLearnAuthUrl: window.__RUNTIME_CONFIG__?.REACT_APP_SAFELEARN_AUTH,

0 commit comments

Comments
 (0)