Commit Graph

7645 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
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
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
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
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
aarif
ea4557ff70 removed unnecesary transcript decode 2019-10-14 17:28:47 +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
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
aarif
8e816fc874 Updated the list comparison to work irrespective of order of items
Updated the dictionary iteration to make it work with both python versions

Updated the order of expected items for list comparison
2019-10-09 12:28:48 +05:00
Aarif
4c9aa43c2f Merge pull request #21924 from edx/BOM-813
Updated the comparison operation to fix None comparison with an integer - BOM-813
2019-10-09 12:07:13 +05:00
Feanil Patel
92e06d52a6 Delete items by their asset_key instead of _id.
The _id comes back as a dict and it's in the wrong order compared to the
dict stored in mongo.  This results in lookups for deletion failing when
we use the '_id' as the lookup key.

Luckily the delete function also takes the asset_key as a valid key to
delete by so we just use that instead.
2019-10-08 15:26:52 -04:00
Feanil Patel
9610aab0f8 Fix more cms contentstore tests. 2019-10-08 15:26:52 -04:00
Feanil Patel
5a9a5ba918 Catch another place where we were passing in byte data into transcript conversion module. 2019-10-07 13:49:25 -04:00
Feanil Patel
66382961a7 Fix all transcript related tests.
Treat transcript content as unicode strings and convert them at any edge
where we encounter them.  One decision made here was to not update
edx-val it treats transcripts as byte but is much closer to the actual
files so it makes more sense over there. But within the platform they
are generally passed around as serialized json and so it's much better
for them to be unicode.
2019-10-07 13:49:25 -04:00
aarif
af20d0f7d2 Updated the comparison operation to fix None comparison with integer 2019-10-03 15:52:52 +05:00
aarif
c7a05ecf77 Updated the comparison operation to properly calculate mongo connection version
minor changes made to fix quality issues

changes made as suggested

removed unused import statement
2019-10-02 13:41:19 +05:00
Ayub khan
c29b7520a1 BOM-850
python3 compatibility
2019-10-01 10:56:00 +05:00
Ayub
58b43cafd0 Merge pull request #21850 from edx/BOM-806
BOM-806
2019-10-01 10:38:53 +05:00
Ayub
c02678a2d0 Merge pull request #21851 from edx/BOM-812
BOM-812
2019-10-01 10:37:48 +05:00