Commit Graph

41 Commits

Author SHA1 Message Date
M. Zulqarnain
36748ff78f pyupgrade on LMS instructor app (#26533) 2021-02-22 12:58:35 +05:00
M. Zulqarnain
0213fde968 BOM-2281 : Pylint amnesty for grades,gating and instructor app (#26343)
* pyint amnesty for grades,gating and instructor app
2021-02-03 18:14:35 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05: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
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
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
Amit
0c513e2139 INCR-449: Make compatible with Python 3.x (#21100)
* INCR-449: Make compatible with Python 3.x

* INCR-449: Fixes for line long
2019-07-16 10:41:06 -04:00
Dave St.Germain
e15b86c9f3 Added a reason field for due date extensions 2019-04-30 15:22:50 -04:00
Dave St.Germain
b4ccd03740 This adds a new django app -- edx-when -- that will copy start and due dates to mysql and allow per-learner overrides in the instructor dashboard, using the existing IDDE interface.
It adds a data migration for existing IDDE data.
2019-04-24 12:26:19 -04:00
cclauss
c0c935b685 Old style exceptions --> new style for Python 3 2019-02-19 13:09:23 +01:00
Matthew Piatetsky
764319d3e0 fix unicode strings in lms/ part 2 2019-02-13 10:35:56 -05:00
Calen Pennington
72f556c1a9 Import courseware module from fully-qualified module name 2018-10-10 15:34:33 -04:00
Troy Sankey
a7ecfe1cd3 Fixup! refactor email_exists, and handle many more cases 2018-05-18 15:34:35 -04:00
Jeremy Bowman
669aa13ad6 PLAT-1873 to_deprecated_string() cleanup part 2 2018-01-08 17:26:55 -05:00
John Eskew
7dfb6cc681 Change all UTC timezones to import from pytz instead of Django. 2017-10-05 11:12:52 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
John Eskew
3b57542ab0 Revert "Merge pull request #15170 from edx/jeskew/PLAT_1316_partitions_inheritance"
This reverts commit f97f052591, reversing
changes made to 800bcd8e20.
2017-05-30 12:42:54 -04:00
John Eskew
76389d8678 Run all files touched in inheritance/partition work through isort. 2017-05-25 13:24:08 -04:00
John Eskew
66f3aa5ccf Move fields.py, inheritance.py, and partitions to openedx/core. 2017-05-25 13:24:08 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Eric Fischer
0cf3e39c31 Replace bulk email settings with admin config models
Moves ENABLE_INSTRUCTOR_EMAIL and REQUIRE_COURSE_EMAIL_AUTH from settings files
to admin-accessible configuration models. This allows for the bulk email settings
to be modified without a new AMI deploy. See TNL-4504.

Also updates tests:
    -python tests mock out the new configurations in place of the old settings
    -lettuce test has been moved to bokchoy
        (note that there was some loss of coverage here - the lettuce tests had
        been doing some voodoo to allow for cross-process inspection of emails
        messages being "sent" by the server, from the client! In discussion with
        testeng, this seems outside the realm of a visual acceptance test. So,
        the bokchoy test simply confirm the successful queueing of the message,
        and leaves the validation of sending messages to the relevant unit tests.)
    -bok choy fixture has been added, to replace the settings in acceptance.py
    -lettuce and bok choy databases have been updated to reflect the backend changes

The new default is to have bulk_email disabled, we'll need to call this out in the
next OpenEdx release to ensure administrators enable this feature if needed.
2016-05-16 11:09:39 -04:00
John Eskew
8a9845c26e Remove ModuleStoreEnum.Type.xml 2016-04-12 11:53:51 -04:00
Chris Rossi
3256eb1ff6 Architecture for arbitrary field overrides, field overrides for
individual students, and a reimplementation of the individual due date
feature.

This work introduces an architecture, used with the 'authored_data'
portion of LmsFieldData, which allows arbitrary field overrides to be
made for fields that are part of the course content or settings (Mongo
data).  The basic architecture is extensible by means of writing and
configuring arbitrary field override providers.

One concrete implementation of a field override provider is provided
which allows for overrides to be for individual students.  This provider
is then used as a basis for reimplementing the individual due date
extensions feature as a proof of concept for the design.

One can imagine writing override providers that provide overrides based
on a student's membership in a cohort or other similar idea.  This work
is being done, in fact, to pave the way for the Personal Online Courses
feature being developed by MIT, which will use an override provider very
much long those lines.
2015-04-06 13:04:44 -07:00
stv
988144f0b4 Fix PEP8: E712 comparison to True
should be 'if cond is True:' or 'if cond:'
2014-11-25 10:16:05 -05:00
Don Mitchell
afa57f505b Remove client side parsing of module_id
in analytics dashboard.
LMS-11209
2014-09-03 21:59:29 -04:00
Braden MacDonald
c3abf326ff Friendly error if invalid student identifier is entered for due date extension 2014-08-20 17:09:57 -07:00
Braden MacDonald
9c93cd8dd6 Fix: Display error when attempting to reset nonexistent due date extension 2014-08-19 23:29:36 -07:00
Braden MacDonald
3ab8779190 Fix: API allowed an individual due date extension on units with no due date 2014-08-19 23:23:06 -07:00
Braden MacDonald
a08ab9ff11 Fix: an individual extended due date must not precede the normal due date LMS-6563 2014-08-19 23:23:06 -07:00
Chris Rossi
700504c52f Fix a bug in Individual Due Date Extensions (IDDE).
The IDDE implementation relied on a StudentModule being created for a
particular block in order to set the extended due date on that block.
Since StudentModules seem to be created on demand whenever data is
written to an attribute with Scope.user_state, it meant that if a
homework problem hadn't yet been touched by a student it was possible
that the due date extension wouldn't take effect for that problem, even
if the due date extension was successfully set for the parent unit.

This patch fixes this problem by creating new StudentModules as
necessary in order to make sure extended due dates propogate properly to
all problems in a unit.
2014-07-15 15:54:55 -04:00
Nimisha Asthagiri
eecff6e0aa ModulestoreEnum class. 2014-06-27 14:37:35 -04:00
Calen Pennington
155ffe37ca Merge remote-tracking branch 'edx/master' into opaque-keys-merge-master
Conflicts:
	cms/djangoapps/contentstore/views/item.py
	cms/djangoapps/contentstore/views/tests/test_container.py
	cms/djangoapps/contentstore/views/tests/test_tabs.py
	common/lib/xmodule/xmodule/modulestore/mongo/draft.py
	lms/djangoapps/certificates/management/commands/gen_cert_report.py
	lms/djangoapps/certificates/queue.py
	lms/djangoapps/certificates/views.py
	lms/djangoapps/courseware/module_render.py
	lms/djangoapps/courseware/tests/test_module_render.py
	lms/djangoapps/instructor/views/api.py
	lms/djangoapps/instructor/views/instructor_dashboard.py
	lms/djangoapps/instructor/views/legacy.py
	lms/djangoapps/shoppingcart/tests/test_models.py
	lms/djangoapps/verify_student/views.py
2014-05-09 15:29:32 -04:00
Don Mitchell
bd4595fad2 Fix missing field access 2014-05-09 11:19:54 -04:00
Don Mitchell
7be81341d7 Revert StudentModule.module_state_key to field rather than computed property 2014-05-09 10:41:12 -04:00
Calen Pennington
cd746bf8e5 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-08 12:09:23 -04:00
Usman Khalid
c955fd0bce When sending bulk email check if course is authorized.
Also the idash_mode property is stored seperately for each course.

LMS-2565
2014-05-02 20:09:25 +05:00
Chris Rossi
831f907c79 Add individual due dates feature.
Adds a feature to the edX platform which allows instructors to set
individual due dates for students on particular coursework. This code is
meant primarily for on-campus use--it is not intended that this feature
would be used for MOOCs. It adds a new tab, "Extensions", to the beta
instructor dashboard which allows changing due dates per student. This
feature is enabled by setting FEATURES['INDIVIDUAL_DUE_DATES'] = True.
2014-01-14 10:19:02 -05:00
Sarina Canelake
91d85f5c2a Enable alerts when a task succeeds.
Note: Alerts are pop-up boxes. Not sure if this is desireable, but I couldn't figure out
how to make a success message show up in the same place that error messages do.
2013-09-27 12:17:53 -04:00
Sarina Canelake
07e76b3b2f Enable use of student usernames on student admin page
This is in addition to email addresses, which also work.
2013-09-27 12:17:35 -04:00
Adam Palay
8bbc11cb2b rename stripping function, make it more explicit 2013-09-12 10:10:19 -04:00
Adam Palay
bc424173ad move _clean_fields to tools.py 2013-09-12 10:10:18 -04:00