From 30632f87cc71dcb3f3ba0c52ebeefa1995409ba0 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Fri, 18 Sep 2020 02:53:05 +0530 Subject: [PATCH 01/12] Added Open response button to the component tray Author needs to have a quick access to ORA menu in order to get proceed with assesment design. This introduces ORA button to the tray. Signed-off-by: Farhaan Bukhsh --- cms/djangoapps/contentstore/views/component.py | 5 +++-- cms/static/images/large-openassessment-icon.png | Bin 0 -> 738 bytes cms/static/sass/assets/_graphics.scss | 7 +++++++ cms/static/sass/elements/_modules.scss | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 cms/static/images/large-openassessment-icon.png diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index dde19152d7..409117bde0 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -41,7 +41,7 @@ __all__ = [ log = logging.getLogger(__name__) # NOTE: This list is disjoint from ADVANCED_COMPONENT_TYPES -COMPONENT_TYPES = ['discussion', 'html', 'problem', 'video'] +COMPONENT_TYPES = ['discussion', 'html', 'problem', 'video', 'openassessment'] ADVANCED_COMPONENT_TYPES = sorted(set(name for name, class_ in XBlock.load_classes()) - set(COMPONENT_TYPES)) @@ -260,7 +260,8 @@ def get_component_templates(courselike, library=False): 'discussion': _("Discussion"), 'html': _("HTML"), 'problem': _("Problem"), - 'video': _("Video") + 'video': _("Video"), + 'openassessment': _("Open Response") } component_templates = [] diff --git a/cms/static/images/large-openassessment-icon.png b/cms/static/images/large-openassessment-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2e7a44a68eccd24820de1709409eabe82fd8eb16 GIT binary patch literal 738 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10f+@+{-GzZ+Rj;xUkjGiz z5n0T@z;^_M8K-LVNdpDhOFVsD*`II<3QMzy^luhrU|`(f>EamTas2Ak{n^5aGVSxX zukaOJ+NAM9NyO1znbDW!qSDd?g?}?#|H{94@?wd?i#5sOvNADqWLQc!HEq$*2)f{V z$n(~PWxY0hYKqgpy}P&d{_T6;f7^WjSycZ1VBdO%2YKrPmrl98^Q6+}MAieEul8`x zueP4|X?0<#^np#jTa#rKDq8wwoW*`joc(~I`wnl_6je3Gi04@qz5Z89(;umAW4R}- z67|_gZ#BQt$4&d^_-WQ9h3}Q?G{0Kr^-(r-y~_hpVd3XjwoR|pGHyPt#5zJ*hD8B zJ<=y1B!4-~#`}S!u(jEp$E#y(f(zpJvKj*g*7{g{f{nAmIo@4Ysw?)dpUt;> zjolriLoMvp*Y_>F8X4NZJX-#^T&CYo-@jAhc;(U*Uj^76iBx-GBzv!Kmj5r+PZ9n( zJypN$r?G{8d!}|HrStj1NSjxEtLuH+9?Ur)r67L`h0wNvc(HQ7VvPFfuSQ z&^55sH8c+~w6roZw=yu%HZZUdUwc90BVo~*$|wcR#Ki= ml*&+EUaps!mtCBkSdglhUz9%kosASw5re0zpUXO@geCxI(;z_r literal 0 HcmV?d00001 diff --git a/cms/static/sass/assets/_graphics.scss b/cms/static/sass/assets/_graphics.scss index 18d59c313f..e4642724ca 100644 --- a/cms/static/sass/assets/_graphics.scss +++ b/cms/static/sass/assets/_graphics.scss @@ -45,3 +45,10 @@ height: ($baseline*3); background: url('#{$static-path}/images/large-video-icon.png') center no-repeat; } + +.large-openassessment-icon { + display: inline-block; + width: ($baseline*3); + height: ($baseline*3); + background: url('#{$static-path}/images/large-openassessment-icon.png') center no-repeat; +} diff --git a/cms/static/sass/elements/_modules.scss b/cms/static/sass/elements/_modules.scss index d3898968ea..ecb239d223 100644 --- a/cms/static/sass/elements/_modules.scss +++ b/cms/static/sass/elements/_modules.scss @@ -139,7 +139,7 @@ position: relative; display: inline-block; - width: ($baseline*5); + width: ($baseline*6.25); height: ($baseline*5); margin-bottom: ($baseline/2); box-shadow: 0 1px 1px $shadow, 0 1px 0 rgba(255, 255, 255, 0.4) inset; From fef7436dea33d86ea8d1872ad0add14b46631c51 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Tue, 22 Sep 2020 12:43:29 +0530 Subject: [PATCH 02/12] Removed ORA from the advance tab Signed-off-by: Farhaan Bukhsh --- cms/envs/common.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index 3d4322ca14..9754f58bf7 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -1703,10 +1703,6 @@ DEFAULT_COURSE_LANGUAGE = "en" # None to omit. # ADVANCED_PROBLEM_TYPES = [ - { - 'component': 'openassessment', - 'boilerplate_name': None, - }, { 'component': 'drag-and-drop-v2', 'boilerplate_name': None From 48595cd38d76b7ef60a95f69552b90928cca0190 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Tue, 22 Sep 2020 19:28:30 +0530 Subject: [PATCH 03/12] Added tests for ORA button Signed-off-by: Farhaan Bukhsh --- .../contentstore/views/component.py | 6 +- .../contentstore/views/tests/test_item.py | 61 ++++++++++++++----- .../contentstore/views/tests/test_library.py | 1 + 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 409117bde0..c8b282e828 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -41,7 +41,7 @@ __all__ = [ log = logging.getLogger(__name__) # NOTE: This list is disjoint from ADVANCED_COMPONENT_TYPES -COMPONENT_TYPES = ['discussion', 'html', 'problem', 'video', 'openassessment'] +COMPONENT_TYPES = ['discussion', 'html', 'problem', 'openassessment', 'video'] ADVANCED_COMPONENT_TYPES = sorted(set(name for name, class_ in XBlock.load_classes()) - set(COMPONENT_TYPES)) @@ -271,8 +271,10 @@ def get_component_templates(courselike, library=False): component_types = COMPONENT_TYPES[:] # Libraries do not support discussions + component_not_supported_by_library = ['discussion', 'openassessment'] if library: - component_types = [component for component in component_types if component != 'discussion'] + component_types = [component for component in component_types + if component not in set(component_not_supported_by_library)] component_types = _filter_disabled_blocks(component_types) diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index ddf1c8b64d..30a0960e8d 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -2256,9 +2256,10 @@ class TestComponentTemplates(CourseTestCase): XBlockStudioConfiguration.objects.create(name='discussion', enabled=True, support_level="ps") XBlockStudioConfiguration.objects.create(name='problem', enabled=True, support_level="us") XBlockStudioConfiguration.objects.create(name='video', enabled=True, support_level="us") - # XBlock masquerading as a problem XBlockStudioConfiguration.objects.create(name='openassessment', enabled=True, support_level="us") + # XBlock masquerading as a problem XBlockStudioConfiguration.objects.create(name='drag-and-drop-v2', enabled=True, support_level="fs") + XBlockStudioConfiguration.objects.create(name='staffgradedxblock', enabled=True, support_level="us") self.templates = get_component_templates(self.course) @@ -2266,9 +2267,22 @@ class TestComponentTemplates(CourseTestCase): """ Returns the templates for the specified type, or None if none is found. """ - template_dict = next((template for template in self.templates if template.get('type') == template_type), None) + template_dict = self._get_template_dict_of_type(template_type) return template_dict.get('templates') if template_dict else None + def get_display_name_of_type(self, template_type): + """ + Returns the display name for the specified type, or None if none found. + """ + template_dict = self._get_template_dict_of_type(template_type) + return template_dict.get('display_name') if template_dict else None + + def _get_template_dict_of_type(self, template_type): + """ + Returns a dictionary of values for a category type. + """ + return next((template for template in self.templates if template.get('type') == template_type), None) + def get_template(self, templates, display_name): """ Returns the template which has the specified display name. @@ -2281,6 +2295,10 @@ class TestComponentTemplates(CourseTestCase): """ self._verify_basic_component("discussion", "Discussion") self._verify_basic_component("video", "Video") + self._verify_basic_component("openassessment", "Open Response Assessment") + self._verify_basic_component_display_name("discussion", "Discussion") + self._verify_basic_component_display_name("video", "Video") + self._verify_basic_component_display_name("openassessment", "Open Response") self.assertGreater(len(self.get_templates_of_type('html')), 0) self.assertGreater(len(self.get_templates_of_type('problem')), 0) self.assertIsNone(self.get_templates_of_type('advanced')) @@ -2338,13 +2356,13 @@ class TestComponentTemplates(CourseTestCase): # Verify that non-advanced components are not added twice self.course.advanced_modules.append('video') - self.course.advanced_modules.append('openassessment') + self.course.advanced_modules.append('drag-and-drop-v2') self.templates = get_component_templates(self.course) advanced_templates = self.get_templates_of_type('advanced') self.assertEqual(len(advanced_templates), 1) only_template = advanced_templates[0] self.assertNotEqual(only_template.get('category'), 'video') - self.assertNotEqual(only_template.get('category'), 'openassessment') + self.assertNotEqual(only_template.get('category'), 'drag-and-drop-v2') # Now fully disable word_cloud through XBlockConfiguration XBlockConfiguration.objects.create(name='word_cloud', enabled=False) @@ -2415,12 +2433,19 @@ class TestComponentTemplates(CourseTestCase): problem_templates = self.get_templates_of_type('problem') return self.get_template(problem_templates, label) - def verify_openassessment_present(support_level): + def verify_openassessment_not_present(): """ Helper method to verify that openassessment template is present """ openassessment = get_xblock_problem('Open Response Assessment') - self.assertIsNotNone(openassessment) - self.assertEqual(openassessment.get('category'), 'openassessment') - self.assertEqual(openassessment.get('support_level'), support_level) + self.assertIsNone(openassessment) + + def verify_staffgradedxblock_present(support_level): + """ + Helper method to verify that staffgradedxblock template is present + """ + dndv2 = get_xblock_problem('Staff Graded Points') + self.assertIsNotNone(dndv2) + self.assertEqual(dndv2.get('category'), 'staffgradedxblock') + self.assertEqual(dndv2.get('support_level'), support_level) def verify_dndv2_present(support_level): """ @@ -2431,24 +2456,25 @@ class TestComponentTemplates(CourseTestCase): self.assertEqual(dndv2.get('category'), 'drag-and-drop-v2') self.assertEqual(dndv2.get('support_level'), support_level) - verify_openassessment_present(True) + verify_openassessment_not_present() verify_dndv2_present(True) + verify_staffgradedxblock_present(True) - # Now enable XBlockStudioConfigurationFlag. The openassessment block is marked + # Now enable XBlockStudioConfigurationFlag. The staffgradedxblock block is marked # unsupported, so will no longer show up, but DnDv2 will continue to appear. XBlockStudioConfigurationFlag.objects.create(enabled=True) - self.assertIsNone(get_xblock_problem('Peer Assessment')) + self.assertIsNone(get_xblock_problem('Staff Graded Points')) self.assertIsNotNone(get_xblock_problem('Drag and Drop')) # Now allow unsupported components. self.course.allow_unsupported_xblocks = True - verify_openassessment_present('us') + verify_staffgradedxblock_present('us') verify_dndv2_present('fs') # Now disable the blocks completely through XBlockConfiguration - XBlockConfiguration.objects.create(name='openassessment', enabled=False) + XBlockConfiguration.objects.create(name='staffgradedxblock', enabled=False) XBlockConfiguration.objects.create(name='drag-and-drop-v2', enabled=False) - self.assertIsNone(get_xblock_problem('Peer Assessment')) + self.assertIsNone(get_xblock_problem('Staff Graded Points')) self.assertIsNone(get_xblock_problem('Drag and Drop')) def _verify_advanced_xblocks(self, expected_xblocks, expected_support_levels): @@ -2473,6 +2499,13 @@ class TestComponentTemplates(CourseTestCase): self.assertEqual(display_name, templates[0]['display_name']) self.assertEqual(support_level, templates[0]['support_level']) + def _verify_basic_component_display_name(self, component_type, display_name): + """ + Verify the display name and support level of basic components (that have no boilerplates). + """ + component_display_name = self.get_display_name_of_type(component_type) + self.assertEqual(display_name, component_display_name) + @ddt.ddt class TestXBlockInfo(ItemTest): diff --git a/cms/djangoapps/contentstore/views/tests/test_library.py b/cms/djangoapps/contentstore/views/tests/test_library.py index 3f3dfd5768..c7ea9cbfdb 100644 --- a/cms/djangoapps/contentstore/views/tests/test_library.py +++ b/cms/djangoapps/contentstore/views/tests/test_library.py @@ -337,6 +337,7 @@ class UnitTestLibraries(CourseTestCase): self.assertIn('problem', templates) self.assertNotIn('discussion', templates) self.assertNotIn('advanced', templates) + self.assertNotIn('openassessment', templates) def test_advanced_problem_types(self): """ From 95a219f3958534f69a08775cd0ec235bfde7e2f6 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Tue, 22 Sep 2020 19:35:57 +0530 Subject: [PATCH 04/12] Added improved comments Signed-off-by: Farhaan Bukhsh --- cms/djangoapps/contentstore/views/component.py | 2 +- cms/djangoapps/contentstore/views/tests/test_item.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index c8b282e828..02f48fd586 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -270,7 +270,7 @@ def get_component_templates(courselike, library=False): # by the components in the order listed in COMPONENT_TYPES. component_types = COMPONENT_TYPES[:] - # Libraries do not support discussions + # Libraries do not support discussions and openassessment component_not_supported_by_library = ['discussion', 'openassessment'] if library: component_types = [component for component in component_types diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index 30a0960e8d..d73200fb7c 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -2501,7 +2501,7 @@ class TestComponentTemplates(CourseTestCase): def _verify_basic_component_display_name(self, component_type, display_name): """ - Verify the display name and support level of basic components (that have no boilerplates). + Verify the display name of basic components. """ component_display_name = self.get_display_name_of_type(component_type) self.assertEqual(display_name, component_display_name) From 4ad50ef5d9e04d0d1801c7631fe88f8df887ad08 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Tue, 22 Sep 2020 20:19:48 +0530 Subject: [PATCH 05/12] Adding proper indentation for pep8 Signed-off-by: Farhaan Bukhsh --- cms/djangoapps/contentstore/views/component.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 02f48fd586..be869fb078 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -274,7 +274,7 @@ def get_component_templates(courselike, library=False): component_not_supported_by_library = ['discussion', 'openassessment'] if library: component_types = [component for component in component_types - if component not in set(component_not_supported_by_library)] + if component not in set(component_not_supported_by_library)] component_types = _filter_disabled_blocks(component_types) From 9c434cc8b2bf1ec858a17d81a4af8f02631d8d68 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Wed, 23 Sep 2020 11:19:16 +0530 Subject: [PATCH 06/12] Changed the order of the button Signed-off-by: Farhaan Bukhsh --- cms/djangoapps/contentstore/views/component.py | 2 +- cms/djangoapps/contentstore/views/tests/test_item.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index be869fb078..429d1cf4df 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -41,7 +41,7 @@ __all__ = [ log = logging.getLogger(__name__) # NOTE: This list is disjoint from ADVANCED_COMPONENT_TYPES -COMPONENT_TYPES = ['discussion', 'html', 'problem', 'openassessment', 'video'] +COMPONENT_TYPES = ['discussion', 'html', 'openassessment', 'problem', 'video'] ADVANCED_COMPONENT_TYPES = sorted(set(name for name, class_ in XBlock.load_classes()) - set(COMPONENT_TYPES)) diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index d73200fb7c..697d5bb65f 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -2442,10 +2442,10 @@ class TestComponentTemplates(CourseTestCase): """ Helper method to verify that staffgradedxblock template is present """ - dndv2 = get_xblock_problem('Staff Graded Points') - self.assertIsNotNone(dndv2) - self.assertEqual(dndv2.get('category'), 'staffgradedxblock') - self.assertEqual(dndv2.get('support_level'), support_level) + sgp = get_xblock_problem('Staff Graded Points') + self.assertIsNotNone(sgp) + self.assertEqual(sgp.get('category'), 'staffgradedxblock') + self.assertEqual(sgp.get('support_level'), support_level) def verify_dndv2_present(support_level): """ From 92a561e085a4b388ee2390fb05608d7d3bcc9e57 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Thu, 24 Sep 2020 01:05:38 +0530 Subject: [PATCH 07/12] Removed unnecessary checks in test case Signed-off-by: Farhaan Bukhsh --- cms/djangoapps/contentstore/views/tests/test_item.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index 697d5bb65f..3e74398d61 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -2256,6 +2256,7 @@ class TestComponentTemplates(CourseTestCase): XBlockStudioConfiguration.objects.create(name='discussion', enabled=True, support_level="ps") XBlockStudioConfiguration.objects.create(name='problem', enabled=True, support_level="us") XBlockStudioConfiguration.objects.create(name='video', enabled=True, support_level="us") + # ORA Block has it's own category. XBlockStudioConfiguration.objects.create(name='openassessment', enabled=True, support_level="us") # XBlock masquerading as a problem XBlockStudioConfiguration.objects.create(name='drag-and-drop-v2', enabled=True, support_level="fs") @@ -2433,11 +2434,6 @@ class TestComponentTemplates(CourseTestCase): problem_templates = self.get_templates_of_type('problem') return self.get_template(problem_templates, label) - def verify_openassessment_not_present(): - """ Helper method to verify that openassessment template is present """ - openassessment = get_xblock_problem('Open Response Assessment') - self.assertIsNone(openassessment) - def verify_staffgradedxblock_present(support_level): """ Helper method to verify that staffgradedxblock template is present @@ -2456,7 +2452,6 @@ class TestComponentTemplates(CourseTestCase): self.assertEqual(dndv2.get('category'), 'drag-and-drop-v2') self.assertEqual(dndv2.get('support_level'), support_level) - verify_openassessment_not_present() verify_dndv2_present(True) verify_staffgradedxblock_present(True) From 4c61ba28bc10cb36f3b31d3ba115c478b46aefcf Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Fri, 13 Nov 2020 11:41:51 +0530 Subject: [PATCH 08/12] Added the condition for the first template to be blank assessment. Signed-off-by: Farhaan Bukhsh --- cms/djangoapps/contentstore/views/component.py | 7 ++++++- cms/djangoapps/contentstore/views/tests/test_item.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 429d1cf4df..514b89d419 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -291,9 +291,14 @@ def get_component_templates(courselike, library=False): # add the default template with localized display name # TODO: Once mixins are defined per-application, rather than per-runtime, # this should use a cms mixed-in class. (cpennington) + template_id = None display_name = xblock_type_display_name(category, _('Blank')) # this is the Blank Advanced problem + # The first template that is given should be Blank Assessment Template + if category == 'openassessment': + display_name = _("Blank Open Response Assessment") + template_id = "blank-assessment" templates_for_category.append( - create_template_dict(display_name, category, support_level_without_template, None, 'advanced') + create_template_dict(display_name, category, support_level_without_template, template_id, 'advanced') ) categories.add(category) diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index 3e74398d61..f5d3f51c2e 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -2296,7 +2296,7 @@ class TestComponentTemplates(CourseTestCase): """ self._verify_basic_component("discussion", "Discussion") self._verify_basic_component("video", "Video") - self._verify_basic_component("openassessment", "Open Response Assessment") + self._verify_basic_component("openassessment", "Blank Open Response Assessment") self._verify_basic_component_display_name("discussion", "Discussion") self._verify_basic_component_display_name("video", "Video") self._verify_basic_component_display_name("openassessment", "Open Response") From 8a7eef2c0130b3f518fb6c7b979324cdc5758041 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Wed, 2 Dec 2020 13:38:28 +0530 Subject: [PATCH 09/12] Update dependency for ORA2 Signed-off-by: Farhaan Bukhsh --- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 38ca579cbd..4665c55478 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -162,7 +162,7 @@ nodeenv==1.5.0 # via -r requirements/edx/base.in numpy==1.18.5 # via -c requirements/edx/../constraints.txt, chem, openedx-calc, scipy oauthlib==3.0.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.in, django-oauth-toolkit, lti-consumer-xblock, requests-oauthlib, social-auth-core openedx-calc==1.0.9 # via -r requirements/edx/base.in -ora2==2.12.1 # via -r requirements/edx/base.in +ora2==2.13.2 # via -r requirements/edx/base.in packaging==20.7 # via bleach, drf-yasg path.py==12.5.0 # via edx-enterprise, edx-i18n-tools, ora2, staff-graded-xblock, xmodule path==13.1.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/paver.txt, path.py diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 13ce625c20..161a56d32f 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -195,7 +195,7 @@ nodeenv==1.5.0 # via -r requirements/edx/testing.txt numpy==1.18.5 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, chem, openedx-calc, scipy oauthlib==3.0.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, django-oauth-toolkit, lti-consumer-xblock, requests-oauthlib, social-auth-core openedx-calc==1.0.9 # via -r requirements/edx/testing.txt -ora2==2.12.1 # via -r requirements/edx/testing.txt +ora2==2.13.2 # via -r requirements/edx/testing.txt packaging==20.7 # via -r requirements/edx/testing.txt, bleach, drf-yasg, pytest, sphinx, tox path.py==12.5.0 # via -r requirements/edx/testing.txt, edx-enterprise, edx-i18n-tools, ora2, staff-graded-xblock, xmodule path==13.1.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, path.py From b6ae24ffcc354d1e3fc0652851300d1c2a21684c Mon Sep 17 00:00:00 2001 From: Giovanni Cimolin da Silva Date: Mon, 7 Dec 2020 14:37:23 -0300 Subject: [PATCH 10/12] Version bump --- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/testing.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 4665c55478..f5fc7c5570 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -162,7 +162,7 @@ nodeenv==1.5.0 # via -r requirements/edx/base.in numpy==1.18.5 # via -c requirements/edx/../constraints.txt, chem, openedx-calc, scipy oauthlib==3.0.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.in, django-oauth-toolkit, lti-consumer-xblock, requests-oauthlib, social-auth-core openedx-calc==1.0.9 # via -r requirements/edx/base.in -ora2==2.13.2 # via -r requirements/edx/base.in +ora2==2.13.3 # via -r requirements/edx/base.in packaging==20.7 # via bleach, drf-yasg path.py==12.5.0 # via edx-enterprise, edx-i18n-tools, ora2, staff-graded-xblock, xmodule path==13.1.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/paver.txt, path.py diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 161a56d32f..03af0ac4d1 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -195,7 +195,7 @@ nodeenv==1.5.0 # via -r requirements/edx/testing.txt numpy==1.18.5 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, chem, openedx-calc, scipy oauthlib==3.0.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, django-oauth-toolkit, lti-consumer-xblock, requests-oauthlib, social-auth-core openedx-calc==1.0.9 # via -r requirements/edx/testing.txt -ora2==2.13.2 # via -r requirements/edx/testing.txt +ora2==2.13.3 # via -r requirements/edx/testing.txt packaging==20.7 # via -r requirements/edx/testing.txt, bleach, drf-yasg, pytest, sphinx, tox path.py==12.5.0 # via -r requirements/edx/testing.txt, edx-enterprise, edx-i18n-tools, ora2, staff-graded-xblock, xmodule path==13.1.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, path.py diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index f78f9cec06..cff8adec18 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -187,7 +187,7 @@ nodeenv==1.5.0 # via -r requirements/edx/base.txt numpy==1.18.5 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, chem, openedx-calc, scipy oauthlib==3.0.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, django-oauth-toolkit, lti-consumer-xblock, requests-oauthlib, social-auth-core openedx-calc==1.0.9 # via -r requirements/edx/base.txt -ora2==2.12.1 # via -r requirements/edx/base.txt +ora2==2.13.4 # via -r requirements/edx/base.txt packaging==20.7 # via -r requirements/edx/base.txt, bleach, drf-yasg, pytest, tox path.py==12.5.0 # via -r requirements/edx/base.txt, edx-enterprise, edx-i18n-tools, ora2, staff-graded-xblock, xmodule path==13.1.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, path.py From ca73d117ff1300245ad609ebfac73b020512d5bd Mon Sep 17 00:00:00 2001 From: Giovanni Cimolin da Silva Date: Mon, 7 Dec 2020 14:44:05 -0300 Subject: [PATCH 11/12] Fix version bump --- requirements/edx/testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index cff8adec18..99999bc146 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -187,7 +187,7 @@ nodeenv==1.5.0 # via -r requirements/edx/base.txt numpy==1.18.5 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, chem, openedx-calc, scipy oauthlib==3.0.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, django-oauth-toolkit, lti-consumer-xblock, requests-oauthlib, social-auth-core openedx-calc==1.0.9 # via -r requirements/edx/base.txt -ora2==2.13.4 # via -r requirements/edx/base.txt +ora2==2.13.3 # via -r requirements/edx/base.txt packaging==20.7 # via -r requirements/edx/base.txt, bleach, drf-yasg, pytest, tox path.py==12.5.0 # via -r requirements/edx/base.txt, edx-enterprise, edx-i18n-tools, ora2, staff-graded-xblock, xmodule path==13.1.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, path.py From aa18d88fa9077dadd62c8988d98809571fe843e8 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Tue, 8 Dec 2020 00:58:23 +0530 Subject: [PATCH 12/12] Fix test with updated ORA template Signed-off-by: Farhaan Bukhsh --- cms/djangoapps/contentstore/views/tests/test_item.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cms/djangoapps/contentstore/views/tests/test_item.py b/cms/djangoapps/contentstore/views/tests/test_item.py index f5d3f51c2e..f07e3dd9da 100644 --- a/cms/djangoapps/contentstore/views/tests/test_item.py +++ b/cms/djangoapps/contentstore/views/tests/test_item.py @@ -2296,7 +2296,7 @@ class TestComponentTemplates(CourseTestCase): """ self._verify_basic_component("discussion", "Discussion") self._verify_basic_component("video", "Video") - self._verify_basic_component("openassessment", "Blank Open Response Assessment") + self._verify_basic_component("openassessment", "Blank Open Response Assessment", True, 6) self._verify_basic_component_display_name("discussion", "Discussion") self._verify_basic_component_display_name("video", "Video") self._verify_basic_component_display_name("openassessment", "Open Response") @@ -2485,12 +2485,12 @@ class TestComponentTemplates(CourseTestCase): template_support_levels = [template['support_level'] for template in templates[0]['templates']] self.assertEqual(template_support_levels, expected_support_levels) - def _verify_basic_component(self, component_type, display_name, support_level=True): + def _verify_basic_component(self, component_type, display_name, support_level=True, no_of_templates=1): """ Verify the display name and support level of basic components (that have no boilerplates). """ templates = self.get_templates_of_type(component_type) - self.assertEqual(1, len(templates)) + self.assertEqual(no_of_templates, len(templates)) self.assertEqual(display_name, templates[0]['display_name']) self.assertEqual(support_level, templates[0]['support_level'])