Commit Graph

8969 Commits

Author SHA1 Message Date
DawoudSheraz
e306bc74c0 avoid pretty printing of pre tags in course import 2019-11-12 13:57:25 +05:00
Dave St.Germain
0e4c04ed2e Merge pull request #21961 from edx/dcs/jumpnav
Improve navigation on Studio unit page
2019-11-08 10:32:43 -05:00
Feanil Patel
1a3f21080e The type of the attrib object wasn't actually a dict.
It was an internal class that we can't easily compare to. So I'm opting
to just make the xml output be more consistent and ordered.  I was
hoping to avoid this since the order shouldn't matter but the juggling
we have to do to validate the unorderd data is more complication than
it's worth.
2019-11-07 10:33:36 -05:00
Dave St.Germain
3e73ba3879 TNL-6929:
Improves navigation within Studio for Learning Sequences, speeding up authors who want to see how a learner progresses through content without needing to jump over to the LMS.

This adds a dropdown section navigator to the breadcrumbs on the unit page and copies the sequence navigator from LMS to the studio unit page.
2019-11-07 09:13:00 -05:00
Kyle McCormick
4f3262a40b Remove most references to old teams config scheme (#22238)
This is a follow up from MST-16, which was commited
in 3858036a4e.

Changes:
* Enrich course teams_configuration from a plain Dict
  to a custom XBlock field that uses the new TeamsConfig
  wrapper class.
* Remove teams_conf property from course, as the previous
  change made it redundant.
* Update teams_enabled implementation.
* Remove teams_max_size field from course, which is
  no longer semantically correct, as max team size
  is now defined on a teamset level.
* Remove teams_topics in order to discourage use of raw
  teams config dict.
* Add convenience properties teamsets and teamsets_by_id
  to course.
* Allow periods and spaces in teamset IDs to avoid breaking
  existing course teams.

Some parts of the code still use the old raw config data
(identifiable by searching "cleaned_data_old_format"),
which we expect to be slowly factored away as we build
new teams features. MST-40 has been created to remove any
remaining references if necessary.

MST-18

* fix: bokchoy test

* fix: remove pdb break
2019-11-06 20:43:32 -05:00
Feanil Patel
0078a6c1ca Parse transcripts json to compare logically.
This is to deal with a special issue in the video descriptor xml output.
The value of the transcript attribute of the video tag is a serialized
json string.  This can have comparison problems in python3 where the order
of the dictionary output is not gauranteed to be the same. So the strings
don't match equally.  We convert the parsed json instead so that the
comparison can be correct.
2019-11-06 11:37:06 -05:00
DawoudSheraz
3787dcd7fb added conditional logs for RCA 2019-11-06 18:35:06 +05:00
Manjinder Singh
cb186d94d3 Fixing test by using six.assertCountEqual (#22219)
* using six.assertCountEqual

* Fix type mismatches in css migrations
2019-11-04 09:29:32 -05:00
Awais Qureshi
076a2b5a7e BOM-998
Fixing decoding issue.
Fixing flaky unit test.
2019-11-01 15:54:23 +05:00
Awais Jibran
d891ae5522 Merge pull request #22192 from edx/aj/improve-logging-capa
Add error in logging
2019-11-01 11:25:28 +05:00
Jeremy Bowman
a6b8cbe627 Remove obsolete field type BOM-996 (#22203) 2019-10-31 15:23:58 -04:00
Awais Jibran
5e11708e11 Adding ContextualizeTextError. 2019-10-31 23:37:20 +05:00
Feanil Patel
9f9d904592 Update code to use the new rounding method.
See the commit that added round_away_from_zero for details.

IN the case of dashboard_data.py:

We don't first cast to decimal here because in python 2 this didn't do
anything.  The python 2 rounding method would just cast things to float
before doing the rounding anyway so it just wastes cpu cycles.  In
python 3 this causes some typing issues so just removing it.
2019-10-31 14:29:57 -04:00
Awais Jibran
cb2a24711e Add error in logging 2019-10-31 09:48:58 +05:00
Awais Jibran
38f296fa93 Merge pull request #22182 from edx/aj/improve-logging-capa
Improve logging when a CAPA problem fails to display HTML
2019-10-30 14:54:26 +05:00
Awais Jibran
c0a26e932d Improve logging when a CAPA problem fails to display HTML 2019-10-30 14:23:50 +05:00
Awais Jibran
3ee5969f73 fixed language issue and added test #2 2019-10-30 14:02:50 +05:00
Awais Jibran
a27bd563b4 Merge pull request #22102 from edx/as/bug/tinymce-add-image
JavaScript Error when inserting second image in Studio
2019-10-30 12:59:56 +05:00
Awais Jibran
222c74e855 JavaScript Error when inserting second image in Studio 2019-10-30 12:21:40 +05:00
Kyle McCormick
3858036a4e Expand and refactor teams configuration on course. (#22168)
Wrap CourseModule.teams_configuration in TeamsConfig
class, centralizing parsing, validation, error handling,
etc. Wrapped object is exposed on 'teams_conf' field.

Old code still uses 'teams_configuration' dict;
we should change this in the future (MST-18).

MST-16
2019-10-29 16:10:19 -04:00
Feanil Patel
c009d4550a Pass back the answer html as a string instead of bytes.
We did this already for the 'get_html' function for a capa problem but
there wasn't a test to ensure this works correctly for the
get_question_answer function that powers the show answer button.

I ran into it while doing a quick smoke test on the python 3 sandbox.
2019-10-24 09:46:26 -04:00
Jeremy Bowman
d4b0968e3a Fix JSON parsing in edxnotes.helpers BOM-990 (#22122) 2019-10-22 17:57:01 -04:00
Feanil Patel
9946fd3918 Merge pull request #22099 from edx/revert-22058-julianajlk/REV-980/first-purchase-discount-courseware
Revert "add first purchase discount to courseware (#22058)"
2019-10-22 09:39:08 -04:00
Manjinder Singh
936e1d48a3 BOM-928: Fixing test error due to dict ordering (#22055)
* Fixing test error due to dict ordering

* Dict ordering fixes

* replacing dict with list to maintain consistency

* better html parsing
2019-10-22 09:30:24 -04:00
julianajlk
98f907f23c Revert "add first purchase discount to courseware (#22058)"
This reverts commit 059b619794.
2019-10-21 13:57:18 -04:00
julianajlk
059b619794 add first purchase discount to courseware (#22058)
REV-980.
* moved get_first_purchase_offer_banner_fragment to Discounts utils.py
* added banner wrapper method
* updated banner with time limit
2019-10-21 13:56:38 -04:00
Michael Terry
8e832a3c6a Show Display Name advanced field again
We had hidden it when using Publisher. But there are valid use
cases for editing it, so we're adding it back again.

DISCO-1390
2019-10-18 10:40:49 -04:00
aarif
164141def9 replaced json.loads with a util to handle bytes
changes made to fix jenkins/quality errors

changes made as suggested

added the docstring to fix quality issue

made a few changes to fix some tests

replaced json.loads with a util to handle bytes

changes made to fix jenkins/quality errors

changes made as suggested

added the docstring to fix quality issue

made a few changes to fix some tests

made changes as suggested

made changes as suggested

updated the requirements with make upgrade
2019-10-16 12:14:01 +05:00
Aarif
6e7f2f61ef Merge pull request #21994 from edx/BOM-914
Fixed all instances of "TypeError: a bytes-like object is required, not 'str" - BOM-914
2019-10-16 01:44:31 +05:00
Aarif
6304aa5b9b Merge pull request #22030 from edx/BOM-922
Fixed - " AttributeError: 'str' object has no attribute 'decode' " - BOM-922
2019-10-15 16:21:25 +05:00
aarif
d176957708 Updated the tests to fix the string/bytes input
changes made to pass tests with python 2 and other minor changes

Updated the tests to fix the string/bytes input

changes made to pass tests with python 2 and other minor changes

made some changes as suggested

made changes as suggested

changes made as suggested
2019-10-14 18:47:18 +05:00
Ayub
8aa2fad4ec Merge pull request #21988 from edx/BOM-898
BOM fix remaining capa module issues
2019-10-14 17:33:27 +05:00
aarif
ea4557ff70 removed unnecesary transcript decode 2019-10-14 17:28:47 +05:00
Ayub
dbc27fd57d Merge pull request #21921 from edx/BOM-805
BOM-805
2019-10-14 16:42:26 +05:00
Ayub khan
8717510d35 BOM-805
python3 compatibility: Before comparison with unicode decode text if its type is bytes.
2019-10-14 15:15:28 +05:00
Ayub khan
e9c4c22e6a BOM fixed remaining capa module issues
BOM-898 fix test_responsetypes.py issues
Updated safe_exec to use random2 library instead of random.
As python3 random generates different results as compared to
python2, which causes a lot of test failures and if we use
python3 random and fix tests it will cause state invalidation
of capa problems, So random2 was uses to make the behaviour same
in python3.

BOM-899 name xrange is not defined
xrange is used in safe_exec and there might be old courses where
this is being used in capa problems. All those tests fail in python3
as this was renamed to range. Used six.moves.xrange so that code
works for python3 and if there is any old code using xrange it
works too.
2019-10-14 13:29:12 +05:00
Ayub
c3735cef01 Merge pull request #21874 from edx/BOM-804
BOM-804
2019-10-14 12:30:18 +05:00
Aarif
4bce520f29 Merge pull request #21919 from edx/BOM-819
Updated the items order in response list comparison to work with both python versions - BOM-819
2019-10-14 11:32:05 +05:00
Ayub khan
44b2414a5d BOM-804
python3 compatibility
we only need to decode if the xml is bytes
2019-10-11 13:53:54 +05:00
Ayub
313183f3aa Merge pull request #21986 from edx/BOM-821_BOM-822
BOM-821_BOM-822 fixed webob issue
2019-10-11 13:05:59 +05:00
Ayub
e289326172 Merge pull request #21991 from edx/BOM-905
BOM-905 test_graders.py tests fixed
2019-10-11 13:02:16 +05:00
Feanil Patel
7fba045ce6 Merge branch 'master' into feanil/fix_xmodule_video_tests 2019-10-10 11:00:54 -04:00
Awais Qureshi
4470a1b487 BOM-910
There was in issue coming in order of error msg.
fixing bytes issue also.
2019-10-10 15:01:18 +05:00
Ayub khan
3a760435bc BOM-905 test_graders.py tests fixed
py3 shows missing argument istead of showing number
2019-10-10 14:49:27 +05:00
Awais Qureshi
19342524d5 Merge pull request #21963 from edx/awais786/BOM-799
BOM-799
2019-10-10 12:36:09 +05:00
Ayub khan
ba0cc9a87f BOM-821_BOM-822 fixed webob issue
python2 webob request.post object is equal to webob MultiDict(request.post)
but in python3 its not so updated test cases.
2019-10-10 12:09:19 +05:00
Feanil Patel
5ef86e2c3c Fix video module tests related to transcript conversion. 2019-10-09 09:51:02 -04:00
Awais Qureshi
eee826ca4b BOM-814
String comparsion within in raw html were causing tests failures in python3.
The function parses the string and converts into dictionary.
2019-10-09 15:43:18 +05:00
Ayub
ea8a10e9d8 Merge pull request #21953 from edx/BOM-808
BOM-808 struct is not defined
2019-10-09 15:02:18 +05:00
Ayub khan
d1eb51bd71 BOM-808 struct is not defined
python3 list comprehension variables are not accessible after comprehension
2019-10-09 12:53:12 +05:00