Skip to content

Commit 7551224

Browse files
committed
Removing group external IDs from tables and edit form since they were deprecated.
1 parent 06c1aa8 commit 7551224

File tree

5 files changed

+6
-51
lines changed

5 files changed

+6
-51
lines changed

src/components/Groups/helpers/GroupInfoTable.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const getDescription = (localizedTexts, locale) => {
2929
};
3030

3131
const GroupInfoTable = ({
32-
group: { externalId, organizational, localizedTexts, public: isPublic = false, privateData },
32+
group: { organizational, localizedTexts, public: isPublic = false, privateData },
3333
isAdmin,
3434
locale,
3535
}) => (
@@ -96,20 +96,6 @@ const GroupInfoTable = ({
9696
</td>
9797
</tr>
9898
)}
99-
{Boolean(externalId) && (
100-
<tr>
101-
<th>
102-
<FormattedMessage
103-
id="app.groupDetail.externalId"
104-
defaultMessage="External identification of the group"
105-
/>
106-
:
107-
</th>
108-
<td>
109-
<code>{externalId}</code>
110-
</td>
111-
</tr>
112-
)}
11399

114100
{privateData &&
115101
privateData.bindings &&
@@ -153,7 +139,6 @@ const GroupInfoTable = ({
153139

154140
GroupInfoTable.propTypes = {
155141
group: PropTypes.shape({
156-
externalId: PropTypes.string,
157142
parentGroupId: PropTypes.string,
158143
threshold: PropTypes.number,
159144
public: PropTypes.bool.isRequired,

src/components/forms/EditGroupForm/EditGroupForm.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import SubmitButton from '../SubmitButton';
1212
import LocalizedTextsFormField from '../LocalizedTextsFormField';
1313
import { RefreshIcon } from '../../icons';
1414

15-
import { TextField, CheckboxField, NumericTextField } from '../Fields';
15+
import { CheckboxField, NumericTextField } from '../Fields';
1616
import { getLocalizedTextsInitialValues, validateLocalizedTextsFormData } from '../../../helpers/localizedData.js';
1717

1818
export const EDIT_GROUP_FORM_LOCALIZED_TEXTS_DEFAULT = {
@@ -108,18 +108,7 @@ const EditGroupForm = ({
108108
<Container fluid>
109109
{isSuperAdmin && (
110110
<Row className="align-items-end">
111-
<Col lg={6}>
112-
<Field
113-
name="externalId"
114-
tabIndex={10}
115-
component={TextField}
116-
maxLength={255}
117-
required
118-
ignoreDirty={createNew}
119-
label={<FormattedMessage id="app.createGroup.externalId" defaultMessage="External ID of the group:" />}
120-
/>
121-
</Col>
122-
<Col lg={6}>
111+
<Col lg={12}>
123112
<Field
124113
name="isPublic"
125114
tabIndex={20}

src/locales/cs.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@
275275
"app.createExerciseForm.validation.noGroupSelected": "Nebyla vybrána domovská skupina.",
276276
"app.createGroup.detaining": "Zadržuje studenty",
277277
"app.createGroup.detaining.explanation": "Studenti nemohou sami opustit skupinu, odebrat je může pouze vedoucí/administrátor skupiny.",
278-
"app.createGroup.externalId": "Externí identifikátor skupiny:",
279278
"app.createGroup.hasThreshold": "Studenti potřebují určitý počet bodů pro splnění kurzu",
280279
"app.createGroup.hasThreshold.explanation": "Potřebný počet bodů může být specifikován relativně (jako procentuální poměr z maximálního počtu bodů) nebo jako absolutní bodový limit. Pouze jedna z těchto hodnot může být vyplněna.",
281280
"app.createGroup.isExam": "Zkoušková",
@@ -1057,7 +1056,6 @@
10571056
"app.groupDetail.bindings.genericProvider": "Externí vazby na \"{provider}\"",
10581057
"app.groupDetail.bindings.sis": "Kódy rozvrhových lístků ze SIS UK",
10591058
"app.groupDetail.description": "Popis skupiny",
1060-
"app.groupDetail.externalId": "Externí identifikace skupiny",
10611059
"app.groupDetail.hasPublicStats": "Studenti smí vidět body ostatních studentů",
10621060
"app.groupDetail.isPublic": "Tuto skupinu vidí každý (a může se do ní přihlásit)",
10631061
"app.groupDetail.loading": "Načítání dat skupiny...",

src/locales/en.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@
275275
"app.createExerciseForm.validation.noGroupSelected": "No group of residence has been selected.",
276276
"app.createGroup.detaining": "Detaining",
277277
"app.createGroup.detaining.explanation": "Students cannot leave the group on their own. Only a group supervisor/admin can remove them.",
278-
"app.createGroup.externalId": "External ID of the group:",
279278
"app.createGroup.hasThreshold": "Students require certain number of points to complete the course",
280279
"app.createGroup.hasThreshold.explanation": "The required amount of points can be specified relatively (percentage of total sum of points) or as an absolute point limit. Only one of these values should be specified.",
281280
"app.createGroup.isExam": "Exam",
@@ -1057,7 +1056,6 @@
10571056
"app.groupDetail.bindings.genericProvider": "External binding to \"{provider}\"",
10581057
"app.groupDetail.bindings.sis": "SIS UK scheduling event codes",
10591058
"app.groupDetail.description": "Group Description",
1060-
"app.groupDetail.externalId": "External identification of the group",
10611059
"app.groupDetail.hasPublicStats": "Students can see progress of other students",
10621060
"app.groupDetail.isPublic": "Everyone can see and join this group",
10631061
"app.groupDetail.loading": "Loading group data...",

src/pages/EditGroup/EditGroup.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,8 @@ class EditGroup extends Component {
5353
}
5454

5555
getInitialValues = lruMemoize(
56-
({
57-
localizedTexts,
58-
externalId,
59-
public: isPublic,
60-
privateData: { publicStats, threshold, pointsLimit, detaining },
61-
}) => ({
56+
({ localizedTexts, public: isPublic, privateData: { publicStats, threshold, pointsLimit, detaining } }) => ({
6257
localizedTexts: getLocalizedTextsInitialValues(localizedTexts, EDIT_GROUP_FORM_LOCALIZED_TEXTS_DEFAULT),
63-
externalId,
6458
isPublic,
6559
publicStats,
6660
detaining,
@@ -330,20 +324,11 @@ export default withLinks(
330324
reset: () => dispatch(reset('editGroup')),
331325
loadAsync: () => dispatch(fetchGroupIfNeeded(groupId)),
332326
reload: () => dispatch(fetchGroup(groupId)),
333-
editGroup: ({
334-
localizedTexts,
335-
externalId,
336-
isPublic,
337-
publicStats,
338-
detaining,
339-
hasThreshold,
340-
threshold,
341-
pointsLimit,
342-
}) =>
327+
editGroup: ({ localizedTexts, isPublic, publicStats, detaining, hasThreshold, threshold, pointsLimit }) =>
343328
dispatch(
344329
editGroup(groupId, {
345330
localizedTexts: transformLocalizedTextsFormData(localizedTexts),
346-
externalId,
331+
externalId: '',
347332
isPublic,
348333
publicStats,
349334
detaining,

0 commit comments

Comments
 (0)