Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable (and test) xml export of pure XBlocks #2221

Merged
merged 4 commits into from
Feb 7, 2014

Conversation

cpennington
Copy link
Contributor

[LMS-179]
[LMS-209]
[LMS-1345]

@cpennington
Copy link
Contributor Author

@nedbat @sarina @antoviaque: Review?

@antoviaque
Copy link
Contributor

@cpennington Did a few tests, importing/exporting the mentoring XBlocks.

What worked (thanks!):

  • Creating a <mentoring> XBlock in Studio and exporting the course
  • Adding children to the <mentoring> block in the XML export, and importing it back -- the children had been correctly created

What didn't work:

screenshot from 2014-01-18 17 25 35

Let me know if you need additional details/tests.

@cpennington
Copy link
Contributor Author

Hrm... Thanks for checking that out. XBlocks have been deprioritized (pushed till next sprint) so that we can finish up some i18n work, but I'll try and get this XML stuff sorted out after that's done.

@antoviaque
Copy link
Contributor

@cpennington Okidok - thanks!

@cpennington
Copy link
Contributor Author

@nedbat, @sarina: Talked w/ @antoviaque, and we weren't able to reproduce one of his issues, and identified another as a bug in his code, rather than this code. Can you guys review, and we can see about merging this?

@sarina
Copy link
Contributor

sarina commented Feb 4, 2014

There's like no coverage of xml_exporter.py.

What's the best way to test this code out?

@cpennington
Copy link
Contributor Author

cms/djangoapps/contentstore/tests/test_contentstore.py uses export_to_xml a lot. It just doesn't get reported as part of the coverage for common/lib stuff. @wedaly what would we need to do to fix that? It seems odd not to count that sort of coverage.

show_tag_list.extend(location.url()) # pylint: disable=no-member
locations = ConditionalDescriptor.parse_sources(child, system)
children.extend(locations)
show_tag_list.extend([location.url() for location in locations]) # pylint: disable=no-member
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor point of style: don't need the [], a generator expression would work also.

@cpennington
Copy link
Contributor Author

@nedbat: Addressed your concerns. Have anymore?

@nedbat
Copy link
Contributor

nedbat commented Feb 5, 2014

I'm all out. 👍 :)

[LMS-179]
[LMS-209]
[LMS-1345]
@sarina
Copy link
Contributor

sarina commented Feb 5, 2014

LGTM 👍

@cpennington
Copy link
Contributor Author

@sarina, @nedbat can you review the last few commits? They're to add some testing of the api wrapping.

PeerGradingDescriptor,
PollDescriptor,
WordCloudDescriptor,
LEAF_XMODULES = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put a comment here explaining what this is a dictionary of (most values are [{}] which is hard to understand why this is necessary)

@sarina
Copy link
Contributor

sarina commented Feb 6, 2014

2 tweaks and 2 questions, then 👍 by me

# as it does using get_html
def check_studio_view_container_node_xblocks_only(self, descriptor_cls):
class TestStudentView(TestXBlockWrapper, TestCase):
__test__ = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we get rid of the __test__ = False above, then we can also get rid of this here, I think.

@nedbat
Copy link
Contributor

nedbat commented Feb 7, 2014

Figure out the best way to avoid __test__ if you can, then 👍

cpennington added a commit that referenced this pull request Feb 7, 2014
Enable (and test) xml export of pure XBlocks
@cpennington cpennington merged commit e0f6b1a into openedx:master Feb 7, 2014
@cpennington cpennington deleted the xblock-xml-serialization branch February 7, 2014 21:46
@cpennington cpennington restored the xblock-xml-serialization branch February 14, 2014 18:51
@cpennington cpennington deleted the xblock-xml-serialization branch March 30, 2015 16:08
jenkins-ks pushed a commit to nttks/edx-platform that referenced this pull request Dec 22, 2017
* Correctly format date block dates.

(cherry picked from commit 22cb307)

* ECOM-3673 Update the course end date description text to remove the reference to certificate when course enrollment is in audit mode

(cherry picked from commit 649e8b1)

* Fixes for courseware date formatting/translation.

(cherry picked from commit 80bfa36)

 Conflicts:
	lms/djangoapps/courseware/date_summary.py

* Fix date summaries with Unicode format issues.

This issue would show up when date formatting strings are translated
with Unicode characters (like when testing with fake Esperanto
translations).

(cherry picked from commit c1a59cc)

* Converts the dates on the dashboard, sidebar navigation, and important course dates to user specified time zone.

(cherry picked from commit 0bf8fc4)

 Conflicts:
	common/djangoapps/util/date_utils.py
	common/lib/xmodule/xmodule/course_module.py
	common/lib/xmodule/xmodule/tests/test_course_metadata_utils.py
	lms/djangoapps/ccx/tests/test_models.py
	lms/djangoapps/courseware/views/index.py
	lms/djangoapps/student_account/views.py
	lms/templates/dashboard/_dashboard_course_listing.html
	openedx/core/djangoapps/content/course_overviews/models.py
	openedx/core/djangoapps/user_api/preferences/api.py
	openedx/core/djangoapps/user_api/preferences/tests/test_views.py

* Display JST for survey's answer datetime. openedx#2146

* Display JST for section's deadline and course start/end datetime. openedx#2146

* Display JST for face-to-face start/end datetime on Django Admin. openedx#2146

* Display JST for ORA2 settings. openedx#2146

* Add the validation of the schedule dates before 1900 openedx#2284 (openedx#2298)

* Implements command count_initial_registration_course openedx#2221 (openedx#2296)

* Add GaCourseEditorRole and GaLmsCourseStaffRole openedx#2150 (openedx#2306)

* Add GaCourseEditorRole and GaLmsCourseStaffRole openedx#2150

* Add UT for studio openedx#2150

* Fix GaCourseEditor has access to after the course closed openedx#2150

* GaLmsCourseStaff can use the same function as the course staff at the staff debug info openedx#2150

* Fix UT and Bok choy openedx#2150

* Remove extra line feed openedx#2150

* Fix comment openedx#2150

* Mod conditions openedx#2150

* Move judgment conditions to template openedx#2150

* Fix comment openedx#2150

* Remove unused code openedx#2150

* Mod conditions for GaCourseEditor but a global staff openedx#2150

* Revert parameter CourseDetails.update_from_json openedx#2150

* Mod check for staff acccess at LMS for GaCourseEditor openedx#2150

* Rename GaCourseEditorRole -> GaGlobalCourseCreatorRole openedx#2150

* Rename GA_COURSE_EDITOR_USER_INFO -> GA_GLOBAL_COURSE_CREATOR_USER_INFO openedx#2150

* Rename GA_ACCESS_CHECK_TYPE_COURSE_EDITOR -> GA_ACCESS_CHECK_TYPE_GLOBAL_COURSE_CREATOR openedx#2150

* Rename Ga_Course_Editor -> Ga_Global_Course_Creator openedx#2150

* Rename gacourseeditor -> gaglobalcoursecreator openedx#2150

* Rename GaCourseEditor -> GaGlobalCourseCreator openedx#2150

* Rename course_editor -> global_course_creator openedx#2150

* Mod hide staff debug info for GaGlobalCourseCreatorRole openedx#2150

* Fix UT for GaGlobalCourseCreator openedx#2150

* Rename UT openedx#2150

* Fix skipped UT openedx#2150

* Remove unused code openedx#2150

* Fix argument openedx#2150

* Remove unused code openedx#2150

* Fix ambiguous conditions openedx#2150

* Rename GaLmsCourseStaffRole -> GaCourseScorerRole openedx#2150

* Rename GA_LMS_COURSE_STAFF_USER_INFO -> GA_COURSE_SCORER_USER_INFO openedx#2150

* Ga_Lms_Course_Staff -> Ga_Course_Scorer openedx#2150

* Rename galmscoursestaff -> gacoursescorer openedx#2150

* Rename GaLmsCourseStaff -> GaCourseScorer openedx#2150

* Rename lms_course_staff -> course_scorer openedx#2150

* Fix translation openedx#2150

* Fix comment openedx#2150

*  Add personal info mask at resign openedx#2148 (openedx#2316)

* Add personal info mask at unenroll openedx#2148

* Fix Review.

* Add Unit Test.

* Add JST date fields near UTC date fields. openedx#2230 (openedx#2307)

* Add JST date fields near UTC date fields. openedx#2230

* Fix Review

* Fix Review 2.

* Add yml Files

* Add option of progress restriction that makes users need to pass prob… (openedx#2305)

* Add option of progress restriction that makes users need to pass problems. openedx#2147

* Skip Bok-Choy CoursewareProgressRestrictionTest temporarily
because this may cause an error of other test

* Fix review 1 openedx#2147

* Fix review 2 openedx#2147

* Fix to use different username and email from test_ga_register.py
so that no error occurs on test_register_and_activate. openedx#2147

* Fix review 3 openedx#2147

* Fix review 4 openedx#2147

* Fix review 5-1

* Fix review 5-2

* Fix review 5-3

* Fix review 5-4

* Fix review 5-5

* Fix review 5-6

* Fix review 5-7

* Fix review 5-8

* Fix review 5-9

* Fix review 5-10

* Fix review 5-12

* Fix review 5-14
revert 5-13

* Fix review 5-15

* Fix review 5-16

* Fix review 6-1 openedx#2147

* Fix review 6-2 openedx#2147

* Fix review 6-3 openedx#2147

* Fix UTC message in survey page. openedx#2340 (openedx#2345)

* Fix bug for manage_user_standing page. openedx#2347 (openedx#2348)

* Fix bug and add failed testcase for mask_resigned_user command. openedx#2362 (openedx#2365)

* Add confirm for account_disabled of manage_user_standing openedx#2366 (openedx#2367)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants