Assign cohorts to groups in the instructor dashboard
TNL-653
This commit is contained in:
@@ -153,7 +153,7 @@ class MembershipPageCohortManagementSection(PageObject):
|
||||
Adds a new manual cohort with the specified name.
|
||||
"""
|
||||
self.q(css=self._bounded_selector("div.cohort-management-nav .action-create")).first.click()
|
||||
textinput = self.q(css=self._bounded_selector("#cohort-create-name")).results[0]
|
||||
textinput = self.q(css=self._bounded_selector("#cohort-name")).results[0]
|
||||
textinput.send_keys(cohort_name)
|
||||
self.q(css=self._bounded_selector("div.form-actions .action-save")).first.click()
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ Helper functions and classes for discussion tests.
|
||||
"""
|
||||
|
||||
from uuid import uuid4
|
||||
import json
|
||||
|
||||
from ...fixtures.discussion import (
|
||||
SingleThreadViewFixture,
|
||||
@@ -68,11 +69,11 @@ class CohortTestMixin(object):
|
||||
"""
|
||||
Adds a cohort group by name, returning the ID for the group.
|
||||
"""
|
||||
url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + '/cohorts/add'
|
||||
data = {"name": cohort_name}
|
||||
url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + '/cohorts/'
|
||||
data = json.dumps({"name": cohort_name})
|
||||
response = course_fixture.session.post(url, data=data, headers=course_fixture.headers)
|
||||
self.assertTrue(response.ok, "Failed to create cohort")
|
||||
return response.json()['cohort']['id']
|
||||
return response.json()['id']
|
||||
|
||||
def add_user_to_cohort(self, course_fixture, username, cohort_id):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user