Commit Graph

29540 Commits

Author SHA1 Message Date
Carlos de la Guardia
f9351ef830 MIT: CCX. Code Quality Fixes
Remove duplicated course listings template code on the student dashboard.
2015-04-10 23:30:27 -04:00
cewing
8ba74429b1 MIT: CCX. Fixes for API changes that affect the binding of descriptors to student context.
fix for making sure all descriptor fields are always available for course descriptors despite module_class tricks

add required fields to cache data for tests

use a different strategy to mock up the get_children method
2015-04-10 23:30:27 -04:00
Carlos de la Guardia
b315b4d747 MIT: CCX. Fixes for issues identified in code review
Switch to font awesome icons, to fix issue with toggling collapsible sections of the schedule in ccx coach dashboard

Ensure access check takes place after descriptor is bound to the user, or field override checks will never happen
2015-04-10 23:30:26 -04:00
Carlos de la Guardia
9ddee93401 MIT: CCX. Code Quality fixes
add doc strings; fix pep8 warning
address some minor issues brought up by the code review process
2015-04-10 23:30:26 -04:00
Carlos de la Guardia
b3da2a54bb MIT: CCX. Fix issues identified in code review
Original Commit Messages:

use edx's own get_parent method, rather than our own.

add field to unique constraint to avoid MultipleObjectsReturned in case of multiple browser clicks on submit

fix 0011 migration, inherit from TimeStampedField and add composite index (migration only)

fix bug where adding an already registered user to a ccx would cause a crash due to an undefined variable

add assertNumQueries tests to test modules where override field providers are used

remove unnecessary teardown

implement recommended style for checking empty list

import utility methods rather than use duplicate code

added comment explaining date conversion to string for json

add logging for invalid users or emails when enrolling students

add comment about xmodule user state

avoid using get_or_create, which seems to be causing a race condition on schedule change save

relocate badly placed edvent handlers to fix multiple submit problem
2015-04-10 23:30:26 -04:00
Carlos de la Guardia
3425424696 MIT: CCX. Use request thread local for access control decisions.
Use in tabs and other code to show or hide ccx coach tab depending on if the user has the coach role or not
2015-04-10 23:30:26 -04:00
cewing
7f691e4a92 MIT: CCX. Rename POC to CCX
Final official name is Custom Courses for EdX (CCX), rename all code to remove previous name.

Rename the FEATURE constant used to identify this feature

Rename the middleware for the CCX change

rename the constant used for storing the current poc id on the session.

rename the _PocContext threading local

rename the override provider in all places where it is referenced

`PersonalOnlineCoursesOverrideProvider` -> `CustomCoursesForEdxOverrideProvider`

generally rename symbols from overrides.py to replace `poc` with `ccx` where possible without changing model names or attributes

rename more symbols from poc to ccx
rename util functions from app utils module

general symbol renaming poc -> ccx in views.py and related url changes

Rename the coach role wherever it is used.

reword poc_coach to ccx_coach

UI rename

replace POC with CCX globally

template context variable renamed

rename poc_ to ccx_ in urls and all related locations (views, js, scss etc)

remove pocs migrations

Final massive renaming, including models.  Re-built migration.

cleaning up a few tailing references

Fix reference typo in schedule template JS

undo modifications made on the fly in test setup to ensure that our tests are properly isolated from the rest of the system tests.

Fixes jazkarta/edx-platform#38

Clean up some leftover strings and comments

fixing more strings and comments in python files

fix a naming error in the schedule tab that was causing problems in deleting courseware items.

Fixes jazkarta/edx-platform#36

updating tests and utility code to match changes in infrastructure from latest rebase
2015-04-10 23:30:25 -04:00
cewing
fbaab9674f MIT CCX: Prevent the discussion tab from displaying
When the POC feature is enabled and there is an active poc displaying discussions leads to undefined behaviors.  Hide the tab to prevent usability problems.
2015-04-10 23:30:25 -04:00
Carlos de la Guardia
97748e56ea MIT: CCX. Fix test failures
Django double-importing overwrites the TESTUSER object, invalidating identity comparisons.  Use a string instead to avoid the problem.

The get_current_poc function operates using a threadlocal and so no longer requires the user as an argument
2015-04-10 23:28:09 -04:00
cewing
0b184881f5 MIT: CCX. Implement display of CCXs in user-facing templates such as dashboard
Show the display name for the POC in the menu for switching.

Remove the MOOC: prefix from the MOOC title to avoid truncation issues.

Incorporate the display name of the POC into the display of course org/number/name at the top of the page in the default theme.

Provide warning on the grading policy page in system warning style.

Provide a PocMembership model api that returns PocMemberships for a user.  Default to active memberships.

Build generator that yields triplets of poc, membership and course for each poc membership a user has.

This is an analog of the `get_course_enrollment_pairs` in common/djangoapps/students/views.py and is used in the student dashboard to provide pocs as options for a student to view.

refactor to use model api instead of inline code.

provide pocs as possible targets for a student to visit from their dashboard.

Unset the current active poc when visiting the dashboard so as to avoid needing to switch active pocs when viewing a plain course.  This ensures we can leave template code for the display of courses unchanged.

Update templates to show pocs in a course-like view on a student's dashboard.

Revert a portion of the template change so that the poc title will still render properly when a poc is being viewed.
2015-04-10 23:28:09 -04:00
Carlos de la Guardia
bb7eed58db MIT: CCX. Refactore using backbone.js 2015-04-10 23:28:00 -04:00
cewing
96ca1da054 MIT: CCX. Increase test coverage
Improve testing of views and utils

Test api methods added to models.
2015-04-10 23:21:13 -04:00
cewing
6f1a2ed531 MIT: CCX. Fix issues identified in code review
Remove over-cautious assertion and allow calling errors to be calling errors

fix problems in auto_enroll method

ensure that the active poc is wiped out if the user has no poc membership
2015-04-10 23:21:13 -04:00
Carlos de la Guardia
91aa7b06ce MIT: CCX. Handle setting dates for blocks
Add date widget for setting start and due dates for the course sections, plus simple server side validation for avoiding db corruption from bad dates

Add immediate feedback for date validation errors
2015-04-10 23:19:47 -04:00
cewing
d4a1e99a83 MIT: CCX. Implement auto-enroll for CCX students
Based loosely on course enrollment model

Ensure that registered users are 'active' when they are enrolled in a POC

Respect the 'auto enroll' and 'email students' checkboxes in the UI

Add an auto_enroll flag to the PocFutureMembership model so we can automatically enroll non-users when they have registered and activated their account.

Build a future enrollment using the auto_enroll value from the request so we can ensure that non-existent users can be auto-enrolled

Ensure that any user added by way of the one-at-a-time UI is automatically auto-enrolled

Update tests with email sending to use the flag from the request

Provide api on the PocMembership object to auto-enroll a newly active member in this poc.

This method will delete the passed PocFutureMembership object and will automatically enroll the user in the POC named in that future membership as well as the MOOC from which it was created

Conditionally activate poc memberships that are pending when a new registree first activates their account.
2015-04-10 23:18:39 -04:00
Chris Rossi
2b4da4d836 MIT: CCX. Address performance issues.
Use client's session to set POC for test, now that we have the capability to do that.

Use a middleware to set the current POC one time per request, and avoid having to look up the stack for the current request in 'get_current_poc'.

Fetch all overrides for a block at one time.

Speed up the lineage computation by doing some caching.

Unused import.

Get field overrides once per user per block.

Streamline configuration.

Fix poc config tuples
2015-04-10 23:17:38 -04:00
cewing
a1ed62089f MIT: CCX. Code Quality fixes
Remove unused assertion.  Login is required so this will never be used.  No point in having it here.
2015-04-10 23:17:08 -04:00
cewing
98b663dc69 MIT: CCX. Implement mechanism for switching POC and MOOC views
Ensure there is a consistent key for the session dict that will store the value of the poc_id if one is active.  If none is active, the mooc is assumed to be active.

Add mooc_name, mooc_url and active to the dict for each poc membership.

Update the navigation template to show link to mooc if poc is active, or to poc if not.

Ensure the switch_active_pocs view is covered well with tests.
2015-04-10 23:16:44 -04:00
cewing
591c75a3eb MIT: CCX. Provide template data for active POCs
Add a utility function to get template data for the POCs to which a user is actively registered

Add tests for the new utility
2015-04-10 23:16:02 -04:00
Chris Rossi
eecefec8a0 MIT: CCX. Implement coach customization of grading policy for a CCX
Story #35 As a coach I can see and edit the json for the grading policy.

Story #34 Recalculate grading policy

Repair the broken test for grading by providing an explicit POC context for the request to run in
2015-04-10 23:15:29 -04:00
Chris Rossi
2c586ddbe4 MIT: CCX. Code Quality fixes 2015-04-10 23:15:15 -04:00
Chris Rossi
e66fe2b311 MIT: CCX. Properly handle possible representations of the course key 2015-04-10 23:13:57 -04:00
Chris Rossi
aa1333c363 MIT: CCX. Hide course blocks not in the CCX from view for coaches and students 2015-04-10 23:13:11 -04:00
cewing
6cfc3a025f MIT: CCX. Implement individual student enrollments 2015-04-10 23:12:35 -04:00
Chris Rossi
630d1ce0d4 MIT: CCX. Implement coach interactions with student grades
Story #4: Coaches sees grades.

Story #9: Coach downloads grades.
2015-04-10 23:12:14 -04:00
cewing
cabb1962a6 MIT: CCX. Code Quality fixes 2015-04-10 23:11:56 -04:00
cewing
12625a9255 MIT: CCX. Increase test coverage
Implelement test coverage for utility code supporting enrollments in CCXs

bugfix: prevent UnboundNameError if user does not exist in database.
2015-04-10 23:11:07 -04:00
Chris Rossi
a2cb7fd276 MIT: CCX. Implement Custom Courses for Edx.
This feature provides the ability to designate a "coach" who can create customized runs of an existing course, invite students to participate, and manage students through the run of the course.

In this squashed commit we implement the initial scifi, add the 'POC Coach' course role, refine the scifi, add migrations for models, create POCs, enforce POC Coach role, provide panels for Coach Dashboard, set up rudimentary display of course outline, add and remove units, show/hide all units, and save schedule changes, set dates when adding units, edit dates on units already added and provide some tests.

We also provide mechanisms for invitation and enrollment in a POC (to become CCX) and control the display of blocks to students in a POC.
2015-04-10 23:10:48 -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
Piotr Mitros
cd8147cbde Merge pull request #7451 from edx/pmitros/disable-email-auth
Make e-mail activation optional
2015-04-06 20:38:51 +03:00
Piotr Mitros
c656998e8d Make e-mail activation optional 2015-04-06 12:50:18 -04:00
Sarina Canelake
d2c7db0f4b Merge pull request #7600 from louyihua/fix_paging_header_i18n
Fix i18n breaking in some js and underscore files
2015-04-06 11:00:01 -04:00
Sarina Canelake
aca6054639 Merge pull request #7599 from louyihua/i18n_fastgenerate
Add i18n_fastgenerate
2015-04-06 10:54:44 -04:00
Adam
a8bd6dc32d Merge pull request #7570 from edx/adam/bulk-email-changes
use different queue for smaller emails (TNL-1591)
2015-04-06 10:01:51 -04:00
Mark Hoeber
e931df20ec Merge pull request #7578 from edx/markhoeber-redirect-enrollment-api-doc
Redirect Enrollment API to Platform API doc
2015-04-06 09:50:13 -04:00
Sarina Canelake
c35dbd3f49 Merge pull request #7602 from edx/sarina/20150406-translations-update
Update translations (autogenerated message)
2015-04-06 09:26:46 -04:00
Sarina Canelake
4dea3aa9df Update translations (autogenerated message) 2015-04-06 09:26:06 -04:00
Adam Palay
c2e5bd3d98 use different queue for smaller emails (TNL-1591) 2015-04-06 08:13:55 -04:00
Braden MacDonald
5f87bc08c5 Merge pull request #7534 from open-craft/mentoring-req-update
Add mentoring v2 and its bump dependency xblock-utils for Harvard
2015-04-05 17:47:52 -07:00
louyihua
2d47f80391 Fix i18n breaking in some js and underscore files
1. Spliting strings inside the call to `gettext()` in javascript breaks the string extraction process, so the string should kept in one line.
2. Using escape string inside a string in `gettext()` may cause the extractor to misunderstand the escape string, so that it will escape this escape string.
2015-04-06 01:28:06 +08:00
louyihua
faafda086d Add i18n_fastgenerate
So the time-consuming i18n_extract step can be skipped for situations that only the translated strings are modified while the source strings are still the same.
2015-04-05 18:59:43 +08:00
Braden MacDonald
f2fb8bf752 Bump mentoring and its dependency xblock-utils for Harvard 2015-04-03 13:49:51 -07:00
Will Daly
83e391ee9f Merge pull request #7590 from edx/release
Merge release back into master (hotfix-2015-04-03)
2015-04-03 15:43:24 -04:00
Will Daly
08cb8dd541 Merge pull request #7583 from edx/hotfix/2015-04-03
Hotfix: Add proxy to allow IE9 to make xdomain requests
2015-04-03 14:43:29 -04:00
Greg Price
7ee640412c Merge pull request #7588 from edx/gprice/debug-toolbar-order
Move debug toolbar to end of devstack middleware
2015-04-03 14:39:59 -04:00
Renzo Lucioni
e39bc1a813 Merge pull request #7581 from edx/renzo/clean-up-admin
Update SKU field help text and verbose name
2015-04-03 13:52:59 -04:00
Greg Price
8936224437 Move debug toolbar to end of devstack middleware
The django debug toolbar circumvents other middleware with process_view
functions, so it needs to go at the end of our MIDDLEWARE_CLASSES
setting.

https://django-debug-toolbar.readthedocs.org/en/1.3/tips.html#middleware-isn-t-working-correctly
2015-04-03 13:50:57 -04:00
Kelketek
5795ba3faf Merge pull request #7482 from open-craft/fix_duplicate_rcb
Fix duplication of Randomized Content Blocks
2015-04-03 12:50:09 -05:00
Kelketek
e469e4da9e Merge pull request #7585 from edx/kelketek/update-xblock-hash
Update XBlock Hash
2015-04-03 12:03:24 -05:00
Nimisha Asthagiri
a204cacd74 Merge pull request #7561 from edx/mobile/PLAT-520
PLAT-520 Fix Asset store import of null values.
2015-04-03 12:46:21 -04:00