Commit Graph

52221 Commits

Author SHA1 Message Date
aarif
8c4a31bf3a updated the csv reader to make the csv output compatible across both python versions
updated the csv reader to make the csv output compatible across both python versions

added the encoding argument to unicodecsv.DictReader method

updated the csv file read process to accomodate different input types

changes made to fix issues with UniversalNewLineIterator

changes made as suggested

changes made as suggested

changes made to fulfill quality check requirement to pass quality check

minor changes
2019-11-04 15:09:12 +05:00
Syed Muhammad Dawoud Sheraz Ali
368eb669e0 Merge pull request #22194 from edx/dsheraz/PROD-870
add encoded video key check in video transformer
2019-11-04 14:20:09 +05:00
Waheed Ahmed
7313a1927f Merge pull request #22229 from edx/transifex-bot-update-translations2019-11-03
fix(i18n): update translations
2019-11-04 12:44:31 +05:00
DawoudSheraz
169349d57e add encoded video key check in video transformer 2019-11-04 12:23:58 +05:00
edX Transifex Bot
a10aca20af fix(i18n): update translations 2019-11-03 20:53:46 +00:00
Nimisha Asthagiri
1bcaa945d9 Merge pull request #22216 from edx/diana/registration-form-factory-move
Move RegistrationFormFactory from user_api to user_authn
2019-11-02 17:57:59 -04:00
Stu Young
cb9f6b4a1b fix example in history backfill command (#22224) 2019-11-01 17:32:47 -04:00
Ned Batchelder
ed8adcb322 Merge pull request #22211 from edx/nedbat/fix-sphinxcontrib-openapi
Use latest sphinxcontrib-openapi on GitHub to get a feature we need
2019-11-01 15:22:37 -04:00
Diana Huang
d65447998c Move RegistrationFormFactory from user_api to user_authn.
And get_registration_extension_form.
2019-11-01 14:49:12 -04:00
Ned Batchelder
eab54563dc Merge pull request #22212 from edx/nedbat/more-rounding-tests
Add more tests of the new round()
2019-11-01 12:46:32 -04:00
Feanil Patel
e1db02ca11 Merge pull request #22218 from edx/revert-19441-pdf_viewer_static_url_fix
Revert "Fix static urls in pdf_viewer.html to correctly display PDF viewer for textbooks"
2019-11-01 12:24:43 -04:00
Feanil Patel
e8b5d82e45 Revert "Fix static urls in pdf_viewer.html to correctly display PDF viewer for textbooks" 2019-11-01 11:48:46 -04:00
Nimisha Asthagiri
147bd60b5b Merge pull request #22214 from edx/arch/move-login-to-user-authn-2
Move LoginSessionView from user_api to user_authn
2019-11-01 11:38:18 -04:00
Ned Batchelder
1e8f8f7445 API docs: Show the TOC 2019-11-01 11:32:37 -04:00
Awais Qureshi
d3e57f1d36 Merge pull request #22209 from edx/awais786/BOM-998
BOM-998
2019-11-01 19:31:38 +05:00
edX requirements bot
2e21684d0f Updating Python Requirements (#22210) 2019-11-01 10:31:04 -04:00
Awais Qureshi
845b1371cd Merge pull request #22215 from edx/awais786/BOM-1005
BOM-1005
2019-11-01 19:29:02 +05:00
Awais Qureshi
3bea5b5d24 BOM-1005
Fixing encoding issue.
2019-11-01 18:41:44 +05:00
Diana Huang
6fb40586fb Move LoginSessionView from user_api to user_authn 2019-11-01 08:19:55 -04:00
Nimisha Asthagiri
748398e57a Merge pull request #22173 from edx/diana/logistration-refactor
Move RegistrationView from user_api to user_authn
2019-11-01 08:13:39 -04:00
Ned Batchelder
0fc8bb5e4b Add more tests of the new round() 2019-11-01 07:47:12 -04:00
Diana Huang
e026006f9a Move RegistrationView from user_api to user_authn. 2019-11-01 07:41:48 -04:00
Ned Batchelder
9e50a83196 Use latest sphinxcontrib-openapi on GitHub to get a feature we need 2019-11-01 07:26:20 -04:00
Awais Qureshi
076a2b5a7e BOM-998
Fixing decoding issue.
Fixing flaky unit test.
2019-11-01 15:54:23 +05:00
Awais Qureshi
75c83a2584 Merge pull request #22197 from edx/awais786/BOM-996-fix
BOM-996
2019-11-01 12:42:07 +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
David Ormsbee
9176f699b9 Merge pull request #22205 from open-craft/cms-base-fix
Read CMS_BASE from the environment, define it explicitly as public host
2019-10-31 22:28:48 -04:00
Braden MacDonald
05d7592eda Read CMS_BASE from the environment, define it explicitly as public host 2019-10-31 16:17:08 -07:00
Ned Batchelder
b9563acaac Merge pull request #19441 from danialmalik/pdf_viewer_static_url_fix
Fix static urls in pdf_viewer.html to correctly display PDF viewer for textbooks
2019-10-31 15:46:45 -04:00
Jeremy Bowman
a6b8cbe627 Remove obsolete field type BOM-996 (#22203) 2019-10-31 15:23:58 -04:00
Feanil Patel
15a7f3d4d3 Merge pull request #22149 from edx/feanil/update_rounding
BOM-738 - Review and update rounding for python 3
2019-10-31 14:58:07 -04:00
Bill DeRusha
d9506c1b6d Merge pull request #22202 from edx/bderusha/revert-PR-22152
REVERT PR #22152 88e7589a19
2019-10-31 14:52:16 -04:00
Awais Jibran
5e11708e11 Adding ContextualizeTextError. 2019-10-31 23:37:20 +05:00
Feanil Patel
facd737ee4 Update code to use the new rounding method in course_grades.
So making this code change took a few hours. But then deciding that it
was the right one of the many options available took the next 3 days.

When changing to the new rounding function, we had a test that started
failing.  It appears as if our new rounding function is not the same in
some way as the one built into python 2.

```
>>> round(.0045*100 + .05)/100
0.0
>>> round_away_from_zero(.0045*100 + .05)/100
0.01
```

Doing the math by hand we see that the new function is actually correct
but the old one is clearly rounding incorrectly in this case. Looking
closer at this I discovered that it was due to a floating point issue
where .0045*100 is represented as 0.44999999999999996 so when we add
0.05 to this number we get 0.49999999999999994.  This is all because of
the limitations of floating point arithmetic.

See https://docs.python.org/3/tutorial/floatingpoint.html#tut-fp-issues
for more on that.

Because python does its rounding at the bit level in C code.  It treats
the .4999... as below the .5 cutoff and rounds down. Whereas our code
does more simple arithmetic which causes the number to correct itself
before we round and so correctly rounds up to 0.01

The result of this change is that previously, the rounding threshold used to
be that any number > .0045 would ronud to 0.01 and now any number that
is >= .0045 rounds to 0.01

Note that if we only care about the two most significant digits of
number between 0 and 1, this error only manifests itself in such a way
that other than the case of going from 0.00 to 0.01 eg. from 0% to 1%
none of the other cases where we would now round up cause the 2 most
significant digits to change.  Given this level of impact, we're fine
with this change.

In our tests we see this for one case, where an incomplete turns into an
F in a test.  I'm updating the test here to be more correct.

As we were looking at it we speculated as to why we were adding the .05
to the number.  Could it be to counteract this floating point issue?  It
turns out not.

Looking at this commit(a1286b1c7d) we see that it
looks like this was intended to always round up to the nearest
percentage point.  However, there's a typo here.  If you wanted to
ensure that we always rounded up to the nearest percentage point you
would have the math be `round(final_grade_percent*100 + 0.5)/ 100` or a
simpler way to do this would be
`math.ceil(final_grade_percent*100)/100`.  However, that is not what
happened and 7 years later, there have been a lot of people graded with
the wrong rounding where essentialy anyone with a grade of 89.45 gets a
90 when the intended impact was supposed to be that anyone with a grade
above an 89.0 would get a grade of 90.

Changing it now requires a lot of conversation and wolud have a large
impact on existing learners.  So we are not going to change it as a part
of the python 2 -> python 3 upgrade.  I have created
https://openedx.atlassian.net/browse/TNL-6972  to capture this issue if
we want to address it in the future.
2019-10-31 14:29:57 -04: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
Feanil Patel
ab40748b5a Add an implementation of python2 style round.
Python 3 has no way to access this implementation of rounding in the
standard library.  We implement it here so that we can continue to use
it for grades calculation to keep regrading consistent.

Currently we can't be confident that if we change the rounding behaviour
we won't impact students.  We can't be sure that students that were
previously passing wouldn't suddenly no longer be passing.  Given this,
it's lower risk to just implement the old rounding strategy here and use
it when we are rounding to calculate grades.
2019-10-31 14:29:57 -04:00
Bill DeRusha
c76390729d REVERT PR #22152 88e7589a19 2019-10-31 13:06:24 -04:00
Alex Dusenbery
5bf2a25842 EDUCATOR-4731 | Upgrade ORA2 to 2.3.5 (enable teams, behind course waffle flag). 2019-10-31 11:12:02 -04:00
Dave St.Germain
729e03b951 Merge pull request #22159 from edx/dcs/title-edit
TNL-6968 Access settings modal should not have an editable title
2019-10-31 11:09:39 -04:00
Awais Qureshi
5f2ebf713f BOM-996
Fixing Test.
2019-10-31 19:05:36 +05:00
edX requirements bot
636037514c Updating Python Requirements (#22196) 2019-10-31 10:01:16 -04:00
Dillon-Dumesnil
1b7edb55b6 Merge pull request #22188 from edx/ddumesnil/fix-pub-redirect-disco-1422
Encoding course key for url
2019-10-31 08:56:11 -04:00
adeel khan
819888ce05 Merge pull request #22190 from edx/adeel/prod_834_html_not_formatted
Fix escaping of html tags.
2019-10-31 15:49:41 +05:00
danial
ea53c3922d Fix static urls in pdf_viewer.html to correctly display pdf viewer for course text books 2019-10-31 13:57:59 +05:00
Waheed Ahmed
559069d5d2 Merge pull request #22193 from edx/waheed/run-make-upgrade
Run make upgrade.
2019-10-31 12:41:34 +05:00
Waheed Ahmed
6df1f8d70f Run make upgrade.
Upgraded xblock-google-drive to latest commit hash.
2019-10-31 12:05:41 +05:00
Awais Jibran
cb2a24711e Add error in logging 2019-10-31 09:48:58 +05:00
edX Transifex Bot
6c0ede859e geoip2: update maxmind geolite country database 2019-10-30 17:03:31 -04:00
Adeel Khan
b82d1b964e Fix escaping of html tags.
Using six.text_type() is converting
MarkSafe object created using HTML
function to simple string which is
essential html tags interpolation.
Applying escaping via Text function on
this string object is causing escaping
of html tags.

PROD-834
2019-10-31 00:59:09 +05:00
Diana Huang
ec2be49a44 Merge pull request #21185 from eduNEXT/lmm/retirementssiteaware
Making student account deletion components a bit site aware
2019-10-30 14:46:14 -04:00