- Nov 01, 2019
-
-
Awais Jibran authored
Add error in logging
-
David Ormsbee authored
Read CMS_BASE from the environment, define it explicitly as public host
-
- Oct 31, 2019
-
-
Braden MacDonald authored
-
Ned Batchelder authored
Fix static urls in pdf_viewer.html to correctly display PDF viewer for textbooks
-
Jeremy Bowman authored
-
Feanil Patel authored
BOM-738 - Review and update rounding for python 3
-
Bill DeRusha authored
REVERT PR #22152 88e7589a
-
Awais Jibran authored
-
Feanil Patel authored
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(a1286b1c) 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.
-
Feanil Patel authored
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.
-
Feanil Patel authored
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.
-
Bill DeRusha authored
-
Alex Dusenbery authored
-
Dave St.Germain authored
TNL-6968 Access settings modal should not have an editable title
-
edX requirements bot authored
-
Dillon-Dumesnil authored
Encoding course key for url
-
adeel khan authored
Fix escaping of html tags.
-
danial authored
-
Waheed Ahmed authored
Run make upgrade.
-
Waheed Ahmed authored
Upgraded xblock-google-drive to latest commit hash.
-
Awais Jibran authored
-
- Oct 30, 2019
-
-
edX Transifex Bot authored
-
Adeel Khan authored
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
-
Diana Huang authored
Making student account deletion components a bit site aware
-
Dillon Dumesnil authored
DISCO-1422
-
edX cache uploader bot authored
-
Jeremy Bowman authored
-
Syed Muhammad Dawoud Sheraz Ali authored
Revert "enable video url rewrite flag"
-
Troy Sankey authored
Enable PII Annotations checking enforcement
-
Matt Tuchfarber authored
Add data migration to fix ecommerce_worker email
-
Syed Muhammad Dawoud Sheraz Ali authored
-
Calen Pennington authored
Fix typo in user_metadata.html (which was being obscured by mako non-…
-
Manjinder Singh authored
- edx-sga recently released new release that supports python 3.5
-
edX requirements bot authored
-
Calen Pennington authored
-
Uzair Rasheed authored
Disable language preference cookie to mobile views.
-
uzairr authored
Language preference cookie is not allowing to change the site language on mobile-apps affecting user-experience.To improve it, mobile team suggested to disable the language preference cookie for the request originated from mobile. PROD-782
-
adeel khan authored
Fixing templates for double escaping.
-
Awais Jibran authored
Improve logging when a CAPA problem fails to display HTML
-
Awais Jibran authored
fixed language issue and added test
-