Skip to content

Commit 7adad62

Browse files
chore: small improvements2
1 parent a712813 commit 7adad62

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

src/cohorts/components/EnabledCohortsView.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ const EnabledCohortsView = () => {
6767
return (
6868
<>
6969
<div className="d-flex mt-4.5">
70-
<FormControl placeholder={intl.formatMessage(messages.selectCohortPlaceholder)} name="cohort" as="select" onChange={handleSelectCohort} value={selectedCohort?.id?.toString() ?? 'null'} disabled={displayAddForm}>
70+
<FormControl
71+
as="select"
72+
disabled={displayAddForm || cohortsList.length === 0}
73+
name="cohort"
74+
placeholder={intl.formatMessage(messages.selectCohortPlaceholder)}
75+
value={selectedCohort?.id?.toString() ?? 'null'}
76+
onChange={handleSelectCohort}
77+
>
7178
{
7279
cohortsList.map((cohort) => (
7380
<option key={cohort.id} value={cohort.id}>

src/cohorts/components/ManageLearners.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ const ManageLearners = () => {
2929
<h3 className="text-primary-700">{intl.formatMessage(messages.addLearnersTitle)}</h3>
3030
<p className="x-small mb-2.5">{intl.formatMessage(messages.addLearnersSubtitle)}</p>
3131
<p className="mb-2 text-primary-500">{intl.formatMessage(messages.addLearnersInstructions)}</p>
32-
<FormControl as="textarea" className="mb-2" placeholder={intl.formatMessage(messages.learnersExample)} onChange={(e) => setUsers(e.target.value)} />
32+
<FormControl
33+
as="textarea"
34+
className="mb-2"
35+
rows={4}
36+
placeholder={intl.formatMessage(messages.learnersExample)}
37+
onChange={(e) => setUsers(e.target.value)}
38+
/>
3339
<p className="x-small mb-2.5">{intl.formatMessage(messages.addLearnersFootnote)}</p>
3440
<Button variant="primary" className="mt-2" onClick={handleAddLearners}>+ {intl.formatMessage(messages.addLearnersLabel)}</Button>
3541
</div>

src/cohorts/data/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const createCohort = async (courseId: string, cohortDetails: BasicCohortD
2828
};
2929

3030
export const getContentGroups = async (courseId: string) => {
31-
const url = `${getApiBaseUrl()}/api/instructor/v1/courses/${courseId}/content_groups`;
31+
const url = `${getApiBaseUrl()}/api/instructor/v1/courses/${courseId}/group_configurations`;
3232
const { data } = await getAuthenticatedHttpClient().get(url);
3333
return camelCaseObject(data);
3434
};

0 commit comments

Comments
 (0)