Commit Graph

12296 Commits

Author SHA1 Message Date
Awais Jibran
27c6a28f77 Merge pull request #22316 from edx/aj/grade-report-code-refactor
Code Refactor for Course Grade Report
2019-11-15 14:22:53 +05:00
Awais Jibran
fb4b46c12c Code Refactor for Course Grade Report 2019-11-15 12:30:15 +05:00
Matthew Piatetsky
4b4d6c963d Merge pull request #22285 from edx/REV-1008
remove discount banner from track selection
2019-11-13 13:32:08 -05:00
Awais Jibran
b2805a92e6 Fixes Course Grade Report.
This PR implements a waffle flag for generating course grade report only for verified learners.
2019-11-13 15:14:02 +05:00
Matthew Piatetsky
b0c9662b51 remove discount banner from track selection 2019-11-12 13:28:27 -05:00
Simon Chen
c5f03adb0e Add the organization protected attribute to team
This is needed so Masters learners will not be in the same team as verfied and audit learners. If the team is designated as organization protected, it will not be visible or accessible by verified or audit track learners
MST-34
2019-11-12 13:03:55 -05:00
Zia Fazal
5b6e0514de Added caller in to the exception message
Added caller in to the exception message to debug ENT-1849
Replaced `get_enterprise_learner_data` method call with `enterprise_customer_for_request` to get enterprise customer data from cache or session instead of hitting API.
2019-11-11 19:44:24 +05:00
Zainab Amir
b845fae0bc Remove logs (#22293)
Revert logs added to investigate audit cert cutoff date

PROD-978
2019-11-11 15:03:02 +05:00
DawoudSheraz
50fe851614 remove small job queue condition for bulk email task 2019-11-11 11:46:16 +05:00
Kyle McCormick
5a3dde1b91 Add admin pages for teams models (#22284) 2019-11-08 10:10:24 -05:00
Jeremy Bowman
e0a22db806 Fix Python 3 bug in LTI stub server BOM-1006 (#22260) 2019-11-08 08:42:56 -05:00
Matthew Piatetsky
8e54125e96 Merge pull request #22223 from edx/REV-693-step3
[REV-693] Delete old holdback code
2019-11-07 14:12:05 -05:00
Zainab Amir
62de1f20d1 Add logs to verify audit cert cutoff date (#22265)
Users were awareded audit certificate recently. Adding logs to verify
that cutoff date for awarding certificate is correct

PROD-978
2019-11-07 22:19:21 +05:00
Matthew Piatetsky
bd76a71019 delete old holdback code 2019-11-07 09:51:39 -05:00
adeelehsan
08877db858 Merge pull request #22243 from edx/aehsan/prod-612/allow_certificate_regenration_for_exisiting
Allow certification regenration for existing honor certificates
2019-11-07 16:41:28 +05:00
adeelehsan
1adc01b45c Allow certification regenration for existing honor certificates
staff should be able to regenerate certificates for the students
who have already earned the certificate using honor mode

Prod-612
2019-11-07 14:08:20 +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
DawoudSheraz
4970e3d7e3 enable video url re-write flag for all the courses 2019-11-06 12:21:08 +05:00
Aarif
0ab8bd7d55 Merge pull request #22220 from edx/BOM-993
updated the csv DictReader to make the csv output compatible across both python versions -BOM-993
2019-11-04 21:29:50 +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
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
DawoudSheraz
169349d57e add encoded video key check in video transformer 2019-11-04 12:23:58 +05:00
Awais Qureshi
3bea5b5d24 BOM-1005
Fixing encoding issue.
2019-11-01 18:41:44 +05:00
Jeremy Bowman
a6b8cbe627 Remove obsolete field type BOM-996 (#22203) 2019-10-31 15:23:58 -04: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
Syed Muhammad Dawoud Sheraz Ali
778d9ea53a Merge pull request #22185 from edx/revert-22181-dsheraz/PROD-762
Revert "enable video url rewrite flag"
2019-10-30 22:19:50 +05:00
Matt Tuchfarber
f80c16da75 Merge pull request #22169 from edx/tuchfarber/fix_ecommerce_worker_email
Add data migration to fix ecommerce_worker email
2019-10-30 12:39:52 -04:00
Syed Muhammad Dawoud Sheraz Ali
83f567c485 Revert "enable video url rewrite flag" 2019-10-30 21:09:34 +05:00
DawoudSheraz
8c75a3757d enable video url rewrite flag 2019-10-30 12:19:37 +05:00
Matt Hughes
cfbfe35904 Link program enrollments on social auth updates in add. to creation
See
lms/djangoapps/program_enrollments/docs/decisions/0002-matriculation-on-user_social_auth_change.rst
for more details

JIRA:EDUCATOR-4770
2019-10-29 16:19:48 -04:00
Matt Tuchfarber
865114cba6 Add data migration to fix ecommerce_worker email
ecommerce_worker is the only service user with a @fake.email  instead of
an @example.com email address. This was fixed manually in a devstack sql
dump, but was lost during the next sql dump. This will fix it moving
forward so we don't have to work around it.
2019-10-29 14:04:29 -04:00
Ned Batchelder
b245defb11 Merge pull request #22132 from philanthropy-u/saad/fix_visible_blocks_hash_value
Fixed exception in VisibleBlocks.bulk_create due to incorrect argument passed
2019-10-29 11:14:52 -04:00
Manjinder Singh
6f1be3ed2c BOM-933: Fix type mismatches in various migrations 6 (#22170)
* Fix type mismatches in coursewaqre

* Fix type mismatch in credit migrations

* Fix type mismatch in status migrations

* Fix type mismatch in user_api migrations

* Review Fixes
2019-10-29 10:36:10 -04:00
Andytr1
122ee29a13 Merge pull request #22158 from edx/andytr1/prod-waffle-flag-for-report
PROD-826 - add waffle flag
2019-10-28 14:03:31 -04:00
Uzair Rasheed
a32786a184 Merge pull request #22111 from edx/PROD-769/add-warning-to-verification-card
Add warning to the bottom of verification status card on dashboard.
2019-10-28 13:25:56 +05:00
atesker
c007499a54 PROD-826 - Add CourseWaffleFlag that restricts the set of ProblemGradeReport enrollees to only verified learners.
cr comments

added unit test

removed debug

style
2019-10-27 15:23:47 -04:00
Calen Pennington
47b8dfae75 Merge pull request #22156 from cpennington/expose-course-duration
Expose user course duration in the user metadata
2019-10-25 13:49:14 -04:00
julianajlk
73564a04b0 return course_upgrade_deadline even if dynamic deadline is null (#22150)
REV-943
2019-10-25 13:20:40 -04:00
Calen Pennington
d92dcb28bb Expose user course duration in the user metadata 2019-10-25 10:02:55 -04:00
uzairr
386e05d3b1 Add warning to the bottom of verification status card on dashboard.
Learners are not allowed to make an attempt of the procotored exam if
they verify their identity near to proctored exam date.To make them,
aware about their expiry date, modification are done to the status card
so that user experience will be improved.

PROD-769
2019-10-25 18:09:39 +05:00
Ayub
279ecba2b7 Merge pull request #22144 from edx/BOM-964
BOM-964
2019-10-25 10:57:16 +05:00
Manjinder Singh
80c7f5af01 BOM-933: Fix type mismatches in various migrations 5 (#22147)
* fix type mismatch in third_party_auth migrations

* fix type mismatch in verify_student  migrations

* fix type mismatch in video_config  migrations

* fix type mismatch in verified_track_content  migrations

* fix type mismatch in commercemigrations

* fix type mismatch in xblock_config migrations

* fix type mismatch in course_creators migrations

* fix type mismatch in contentstore migrations
2019-10-24 16:08:04 -04:00
Manjinder Singh
7f3045cf75 BOM-933: Fix type mismatches in various migrations 4 (#22146)
* fix type mismatch in course_goals  migrations

* fix type mismatch in experiments  migrations

* fix type mismatch in xblock_django  migrations

* fix type mismatch in catalog  migrations

* fix type mismatch in static_replace  migrations

* fix type mismatch in bulk_email  migrations

* fix type mismatch in course_overviews migrations
2019-10-24 13:47:51 -04:00
Manjinder Singh
a384e753fd BOM-933: Fix type mismatches in various migrations (#22112)
* Fix type mismatches in the course_modes migrations

* Fix type mismatches in the course_action_state migrations

* Fix type mismatches in the schedules migrations

* Fix type mismatches in grades migrations

* Fix type mismatches in video_pipeline

* Fix type mismatches in api_admin

* Fix mismatches in credential migrations
2019-10-24 11:42:39 -04:00
Ayub khan
78c20156a1 BOM-964
shoppingcart: Explicitly Set fields to unicode to avoid migration
2019-10-24 18:04:16 +05:00
Awais Jibran
dc0a6488d5 Merge pull request #22108 from edx/aj/improve-logging
Improve logging against Problem grade report
2019-10-24 17:39:40 +05:00
Awais Jibran
ac9a7055b5 Improve logging against Probelm grade report 2019-10-24 16:40:41 +05:00
Ayub
23ccda11ab Merge pull request #22103 from edx/BOM-947
BOM-947
2019-10-24 13:21:25 +05:00
Ayub
14cc694518 Merge pull request #22104 from edx/BOM-946
BOM-946
2019-10-24 13:19:18 +05:00