Commit Graph

574 Commits

Author SHA1 Message Date
Nimisha Asthagiri
80ea0a61f0 instructor_task: remove shoppingcart (DEPR-43) 2020-06-29 10:28:26 -04:00
alangsto
d694582441 Displays escalation email on Special Exams tab (#24331)
* Displays escalation email on Special Exams tab of instructor dashboard. MST-274

* updates for requested changes

* updates necessary for unit testing

* Fixes for pylint warning

* fix for quality tests
2020-06-29 09:11:48 -04:00
Michael Terry
d4506b73f4 AA-184: Fix extension dashboard for self-paced courses
- Have it load dates from edx-when, not just write to it. This
  fixes self-paced courses where edx-when is only place dates are
  kept.
- Have it read original date for a homework from edx-when when
  resetting a date. This fixes the message it gives the instructor
  about whether it was successfully reset.
- Have it recursively set a date, rather than assuming that dates
  are only ever set on the subsection layer. This fixes setting
  dates on self-paced courses (where dates are set all the way
  down) and just in case somebody somewhere edits the course xml
  to have a date where it's not expected.
2020-06-19 11:34:52 -04:00
Diana Huang
c7bd5a8a15 Remove more references to fix tests. 2020-06-09 13:06:44 -04:00
Diana Huang
a0f24bbb64 Remove shoppingcart references from instructor. 2020-06-09 13:06:44 -04:00
Dave St.Germain
c6344aa577 Only the data download tab should appear for data researchers
TNL-7222
2020-05-15 08:11:45 -04:00
Dave St.Germain
b7927bedc9 Allow global staff to access data download tab 2020-05-04 11:31:53 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Dave St.Germain
7336ea91fe This refactors instructor dashboard access to use Bridgekeeper permissions and allows the Data Researcher course/org role to access only the data downloads tab of the dashboard.
TNL-7176
2020-04-22 11:06:08 -04:00
Diana Huang
99863aebff Remove course_id field from CourseMode.
Handle this change appropriately in CourseModeFactory.
2020-04-06 11:21:28 -04:00
Michael Terry
24aaebdfa5 Use relative dates flag for dates widget v2
Switch from a separate waffle flag for the dates widget v2 work
and just use the relative dates experiment flag instead.
2020-03-05 16:38:07 -05:00
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Awais Jibran
5577539b0a Fix due date extension view.
Return error when user is not enrolled in the course.
PROD-1339
2020-03-02 12:03:14 +05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Troy Sankey
c422dec083 Revert "Revert "Rename values in SiteConfiguration (2/3)""
This reverts commit b85aa4b3fb.
2020-02-26 12:54:24 -05:00
Troy Sankey
b85aa4b3fb Revert "Rename values in SiteConfiguration (2/3)" 2020-02-26 11:23:56 -05:00
Julia Eskew
3541643dd5 Rename values in SiteConfiguration (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-02-25 13:54:02 -05:00
Troy Sankey
3f85ba3fe6 Merge pull request #23144 from edx/pwnage101/rename_site_configuration_siteconfiguration_values_1.1
Rename values in SiteConfiguration/History (1/3) (retry)
2020-02-21 11:42:15 -05:00
Calen Pennington
98328ea426 On publish, add evenly spaced dates to self-paced courses 2020-02-21 10:50:22 -05:00
Troy Sankey
18deacde54 Revert "Revert "This stage does the following: (#22692)""
This reverts commit 84de6bc6de
which reverts commit cebeab4348
which implements the first stage of the `values` column rename in
SiteConfiguration.  However, I included a small change:

This time, we set a default value on the new `site_values` column so
that the ORM will happily deserialize the JSONField without throwing a
JSONDecodeError.
2020-02-19 12:01:57 -05:00
Calen Pennington
019a97c084 Duplicate signals handlers for course content dates from edx-when 2020-02-03 15:35:23 -05:00
Dave St.Germain
42adb72aa5 Merge pull request #22336 from edx/dcs/data-researcher
Add new role for course data researcher
2020-01-31 10:07:27 -05:00
Dave St.Germain
1aa8c9c53d Add a new courseware API Django app to support the courseware micro-frontend. 2020-01-28 14:59:07 -05:00
Dave St.Germain
3d82ce18f9 Check for data download permission in report endpoints 2020-01-27 13:55:18 -05:00
Julia Eskew
84de6bc6de Revert "This stage does the following: (#22692)"
This reverts commit cebeab4348.
2020-01-14 13:01:21 -05:00
Julia Eskew
cebeab4348 This stage does the following: (#22692)
- Adds the new field and migration to create the column.
- Makes all writes go to both old and new field.
2020-01-14 10:40:39 -05:00
Calen Pennington
151b309225 Convert custom storage subclasses into mixins so that we can store to either the filesystem or S3 2020-01-02 14:49:19 -05:00
Calen Pennington
0ee1c2f05a Remove S3ReportStorage, because S3BotoStorage already handles a custom_domain argument 2020-01-02 10:25:53 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
39d3a7ca17 Fix pep8 issues caused by the fixer. 2019-12-30 11:42:04 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
hasnain.naveed
c926a13f41 ENT-1961 | Making the manual enrollment reason field optional via configuration flag ENABLE_MANUAL_ENROLLMENT_REASON_FIELD. 2019-12-10 17:31:58 +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
Awais Qureshi
3bea5b5d24 BOM-1005
Fixing encoding issue.
2019-11-01 18:41:44 +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
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
Awais Qureshi
91e7d8a7be BOM-913
reduce functions moves into functools in python3. Fixed the import.
Fixing bytes issue.
2019-10-10 20:06:08 +05:00
Nimisha Asthagiri
8cfc33c0f1 Python 3: multi-line regex replacement of assertIn and assertNotIn 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
4914c42364 Python 3: resp.content regex searches 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
9bbc21ea8c Python 3: multi-lined assertIn, assertNotIn -> assertContains, assertNotContains 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
beb95eb69c Python 3: assertIn -> assertContains consistency 2019-09-30 08:51:01 -04:00
Nimisha Asthagiri
ccefde8d3c Python-3: assertNotIn(..response.content) -> assertNotContains 2019-09-30 08:50:38 -04:00
Nimisha Asthagiri
a6b219a9e9 Python-3: assertIn(..response.content) -> assertContains 2019-09-30 08:50:38 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Diana Huang
e80265bb9a Remove shoppingcart pdf generation.
DEPR-40
2019-09-25 09:07:09 -04:00
Jeremy Bowman
553d35e53e Upgrade mock BOM-596 (#21717) 2019-09-24 10:14:17 -04:00
Awais Qureshi
a0e4e94e31 BOM-482
Fixing python3
2019-09-20 20:18:18 +05:00