Commit Graph

402 Commits

Author SHA1 Message Date
Nimisha Asthagiri
d240785b17 MA-722 Render xBlock API Support 2015-06-05 11:18:48 -04:00
John Eskew
c33c782fcb Wrap _invoke_xblock_handler in a bulk_op. 2015-05-29 15:57:19 -04:00
Calen Pennington
a2cbd16680 Merge pull request #7789 from cpennington/wrap-csm
Wrap access to CSM (inside FieldDataCache) to use the new interface
2015-05-20 16:11:07 -04:00
Calen Pennington
cacdbc35d7 Remove the ability to select_for_updates from FieldDataCache.
The only consumer of that functionality (the XQueue callback) already
does retries, so newly introduce integrity errors (due to multiple
commiters trying to update a StudentModule) won't break the XQueue
processing pipeline.
2015-05-20 15:07:29 -04:00
Calen Pennington
e6db0af1f1 Use current OpaqueKeys methods when loading a block for the XQueue callback 2015-05-20 15:07:29 -04:00
Calen Pennington
8d9d6ce0ec Clarify the interface used by xqueue_callback to load an XBlock 2015-05-20 15:07:28 -04:00
Calen Pennington
3430024d22 Add a temporary set_grade method to the FieldDataCache and UserStateCache 2015-05-20 15:07:26 -04:00
Calen Pennington
7a9923e289 Inline find_or_create 2015-05-20 15:07:24 -04:00
David Baumgold
37ab2fc16a Wrap block with license info in LMS only 2015-05-18 14:35:08 -04:00
Ned Batchelder
7c704f3959 Move xmodule_modifiers.py to openedx/core/lib/xblock_utils.py 2015-05-14 16:03:50 -04:00
David Ormsbee
69af4113c2 Merge pull request #7979 from edx/ormsbee/new_relic_xb_tx_reporting
Customize the transaction name sent to New Relic for XBlock handlers.
2015-05-11 11:06:47 -04:00
Phil McGachey
73b854e4f0 [LTI Provider] Adding signals for scoring events 2015-05-11 07:45:50 -04:00
David Ormsbee
f1f34b5ddf Customize the transaction name sent to New Relic for XBlock handlers.
Currently, all XBlock/XModule handlers are lumped together in the
same transaction (courseware.module_render:handle_xblock_callback).
This makes it difficult to pinpoint problems with specific handlers.
With this change, the transaction name will now look like:

  OpenAssessmentBlockWithMixins.save_submission
  CapaDescriptorWithMixins.xmodule_handler/problem_show
2015-05-08 16:53:01 -04:00
Adam Palay
afec81b662 prevent overly nesting _field_data (TNL-2050) 2015-05-07 14:05:27 -04:00
Phil McGachey
31790ab415 [LTI Provider] Wiring up LTI views to the courseware template 2015-04-27 11:52:26 -04:00
David Ormsbee
03c3bbb379 Merge pull request #6636 from jazkarta/feature-pocs
MIT CCx (was Personal Online Courses)
2015-04-11 11:15:43 -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
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
aamir-khan
917ca595cc ECOM-1289: added the re-verification service to implement the re-verification xblock 2015-04-07 18:09:53 +05: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
Waheed Ahmed
d9b685d5df Fixed beta tester functionality for ora problems.
TNL-1736
2015-04-02 16:51:58 +05:00
Zia Fazal
cc04bb990e Add new gating logic to restrict users from accessing courseware when an entrance exam is required
- added entrance exam check on course info
- staff can by pass gating and added tests
- refined gating logic
- changes after rebasing with Asad's branch
- check ENTRANCE_EXAMS feature is enabled
- updated test to reflect new logic
- catering anonymous user in entrance exam permission
- fixed broken tests
- change after feedback on 16/3
- fix for a broken test
- created new entrance_exams module
- fixed quality error and improved test coverage
- put get_required_content back in milestones helper
- Refactored entrance exams logic
- Refactored tabs logic
- Fixed broken unit test
- changes after feedback from dan-f on 3/27
- removed unnecessary user.is_anonymous check
- Addressed PR feedback
- Addressed commit-specific feedback
- Rework guard clauses
- Add coverage for course info case
2015-03-31 12:12:04 -04:00
Calen Pennington
de23d6defe Clear cached children when binding an XModuleDescriptor/XBlock to a particular user 2015-03-17 10:55:06 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
Matt Drayer
cd05391335 Cleaned up milestones API references 2015-03-12 15:58:21 -04:00
asadiqbal
5a7ac441e5 Entrance Exam authoring and messaging updates
Multi-commit history:
- hide drag functionality for entrance exam section.
- hide entrance exam subsection elements e.g. delete, drag, name etc.
- show unit/verticals expanded in case of entrance exam
- modify code in order to allow user to update entrance exam score from UI.
- write down unit tests.
- write down Jasmine tests.
- add bok-choy test
- updated bok-choy test
- internationalize string
- repositioned sequential block creatori
- SOL-221 (entrance exam message)
- SOL-199 LMS Part (show entrance exam content) and hide the course navigation bar.
- redirect the view in case of entrance exam.
- update code structure as per suggestions
- write down unit tests
- fix pep8
- instead of hiding the exam requirement message, now also showing the exam the completion message (success state).
- write down unit test to show exam completion message.
- Update code as per review suggestions
- update doc string
- addressed review suggestions
- change sequential message text
- css adjustments
- added new css class for entrance exam score in studio
- added Jasmine test for remaning coverage
- sequential message should appear under the context of entrance exam subsection.
- updated text in CMS and LMS as per suggestions.
- added unit text to insure sequential message should not be present in other chapters rather then entrance exam.
- skip setter if empty prerequisite course list
- exclude logic from xblock_info.js that is specifically related to entrance exam.
- added js tests and updated code as per suggestions
- added tests
- addressed several PR issues
- Several small fixes (style, refactoring)
- Fixed score update issue
- added some more unit tests.
- code suggested changes.
- addressed PR feedback
2015-03-10 09:24:43 -04:00
Zia Fazal
e21ff20375 backend changes based on feedback
Conflicts:
	lms/djangoapps/courseware/courses.py
	lms/djangoapps/instructor_task/api.py

refined entrance exam student attempts reset

Quality improvements 1/16

added rescore, delete state and task history functionality

added unit tests for entrance exam reset attempts

added unit tests for re scoring of entrance exam and task history

improved test coverage

Got rid of pep violation

feedback changes and added jasmine test

added more jasmine tests for Javascript changes

added bok-choy tests for UI changes

replaced input containing <p> tags with <label>

Removed ee element assertions to avoid js error

Added call to super.setUp()

changes based on feedback on 2/18

Writing tests in JS instead of coffee script

commit related to skip entrance exam 2/13

fixed bad-continuation quality error

fixed broken bok-choy test

changes based on feedback on 2/18

added js tests and removed coffee script tests

fixed broken bok-choy and unit tests

changes left while rebasing

rephrase test titles

do not need these libs

changes based on feedback on 2/24

changes text which was left

Changes based on feedback on 3/3
2015-03-04 15:32:56 +05:00
Calen Pennington
cbcb0ee8ab Teach edx-mako to force csrf_tokens to unicode (from smart_strings) 2015-02-27 13:38:16 -05:00
stv
66f28fd8da Fix Pylint: I0022(deprecated-pragma) 2015-02-19 19:56:51 -08:00
Xavier Antoviaque
05c857478b xblock-external-ui: Adds support for CORS headers (cross-domain request)
xblock-external-ui: Alternate referer check for CORS requests
xblock-external-ui: Allow to disable httponly on session cookies
xblock-external-ui: Add a unit test for CorsCSRFMiddleware
2015-02-17 10:24:27 +01:00
Xavier Antoviaque
2ba4957951 xblock-external-ui: Add XBlock API call to render XBlock views
xblock-external-ui: Include CSRF token in the API answer
xblock-external-ui: Include full path when building local_url
xblock-external-ui: Fix TestHandleXBlockCallback & bok_choy, add tests
xblock-external-ui: Only return `instance` in `_invoke_xblock_handler()`
xblock-external-ui: Group resources by hash tag to avoid duplicate loads
xblock-external-ui: PEP8
xblock-external-ui: Fail early if the XBlock view is called anonymously

    We used to serve anonymous requests, but most XBlocks assume that the
    user is logged in, which can generate a lot of errors when the user is
    accessed or when an XBlock ajax callback is queried. Fail early to only
    get one error per page load, and prevent displaying the XBlock
    altogether when the LMS doesn't find an active user session.

xblock-external-ui: Add request params in view render context
xblock-external-ui: HTTP error status when file is too large for handler
xblock-external-ui: Fix unicode encodings in XBlock rendering
xblock-external-ui: Feature flag for API call ENABLE_XBLOCK_VIEW_ENDPOINT
2015-02-16 12:39:38 +01:00
Calen Pennington
89d4749057 get the raw DescriptorSystem, not the CombinedSystem when instantiating xmodules (TNL-1226)
get the raw DescriptorSystem, not the CombinedSystem when instantiating xmodules (TNL-1226)

quality fixes

remove trailing comma
2015-02-10 09:47:44 -05:00
Muzaffar yousaf
ae102de3be Merge pull request #6777 from edx/muzaffar/student-info-tnl836
Get user anonymous id via xblock user service.
2015-01-30 19:35:26 +05:00
Matt Drayer
8b03ad3906 Decoupled entrance exam scoring from milestone fulfillment 2015-01-28 22:00:25 -05:00
muzaffaryousaf
4d72910060 Adding get_anonymous_user_id in Xblock 'user' service.
TNL-836
2015-01-28 12:47:49 +05:00
Jason Bau
7f1b60b286 Implement user service to return currently-logged-in user
returns XBlockuser with 2 data layers
2015-01-16 11:40:06 -05:00
Matt Drayer
3c669e3838 New feature contribution: Entrance Exams 2015-01-15 20:35:24 -05:00
Andy Armstrong
561c57dbe9 Extend preview to support cohorted courseware
TNL-651
2015-01-15 10:33:44 -05:00
Braden MacDonald
9a116529ce Add module key and library source info to problem events 2015-01-12 10:39:13 -08:00
Calen Pennington
d919d2ae46 Teach LMS how to render XBlockAsides
[PLAT-217]
2014-12-13 08:26:28 -05:00
Calen Pennington
980f30c17f Move lms.lib.xblock into lms.djangoapps.lms_xblock in preparation add database backed configuration to it 2014-12-12 21:45:21 -05:00
Andy Armstrong
4d75c18098 Fix Mako templates to use latest request context
Fixed the edX middleware to lazily create request
context for Mako templates, so that it is based on
any changes made to the request object.

Verified that with this fix the "Instructor" tab is
correctly hidden when a staff member is viewing
the course as a student.
2014-12-09 23:38:31 -05:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Braden MacDonald
a8f622af7f Consistently ensure dog_stats_api tags are formatted correctly 2014-10-09 12:35:26 -07:00
Calen Pennington
1a682dacd1 Include caching definitions in split bulk operations 2014-09-29 22:35:41 -04:00
Ned Batchelder
616bbbab4e Importable python_lib.zip assets
Lots of plumbing to allow an asset named python_lib.zip to be imported
by jailed Python code.

This function can find the "python_lib.zip" asset, and is passed down
through ModuleSystem and LoncapaSystem so that capa problems have access
to the zipfile.
2014-09-18 17:59:12 -04:00
swdanielli
504a7a21ba add pyfs service 2014-08-25 12:25:03 -04:00
Calen Pennington
50082387eb Add a request-token to identify which xblock html was rendered as part of the current request
[STUD-2903]
2014-08-15 11:04:52 -04:00
Carson Gee
87fa6cc753 Check if user is anonymous before calling PSYCHOMETRICS
LTI grade callbacks for example, come in with an anonymous user.  This causes a
stack trace in the psychometrics app that leads to the LTI service
getting a 404.  This adds a check before that callback gets registered.
2014-08-01 12:34:12 -04:00