Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2eaddefb
Commit
2eaddefb
authored
Mar 07, 2014
by
Han Su Kim
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2866 from edx/release
Release Hotfix-03-06-2014
parents
1900f937
f42d42d1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
46 deletions
+34
-46
cms/envs/bok_choy.py
+0
-5
cms/envs/common.py
+5
-3
cms/envs/test.py
+0
-5
common/lib/xmodule/xmodule/html_module.py
+3
-3
common/lib/xmodule/xmodule/modulestore/mongo/base.py
+8
-19
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
+2
-2
lms/envs/bok_choy.py
+0
-5
lms/envs/common.py
+16
-3
requirements/edx/edx-private.txt
+0
-1
No files found.
cms/envs/bok_choy.py
View file @
2eaddefb
...
...
@@ -16,8 +16,6 @@ os.environ['SERVICE_VARIANT'] = 'bok_choy'
os
.
environ
[
'CONFIG_ROOT'
]
=
path
(
__file__
)
.
abspath
()
.
dirname
()
#pylint: disable=E1120
from
.aws
import
*
# pylint: disable=W0401, W0614
from
xmodule.modulestore
import
prefer_xmodules
######################### Testing overrides ####################################
...
...
@@ -49,8 +47,5 @@ for log_name, log_level in LOG_OVERRIDES:
# Use the auto_auth workflow for creating users and logging them in
FEATURES
[
'AUTOMATIC_AUTH_FOR_TESTING'
]
=
True
# Enable XBlocks
XBLOCK_SELECT_FUNCTION
=
prefer_xmodules
# Unfortunately, we need to use debug mode to serve staticfiles
DEBUG
=
True
cms/envs/common.py
View file @
2eaddefb
...
...
@@ -34,9 +34,6 @@ from path import path
from
lms.lib.xblock.mixin
import
LmsBlockMixin
from
cms.lib.xblock.mixin
import
CmsBlockMixin
from
xmodule.modulestore.inheritance
import
InheritanceMixin
from
xmodule.modulestore
import
prefer_xmodules
from
xmodule.x_module
import
XModuleMixin
from
dealer.git
import
git
############################ FEATURE CONFIGURATION #############################
...
...
@@ -220,6 +217,11 @@ X_FRAME_OPTIONS = 'ALLOW'
############# XBlock Configuration ##########
# Import after sys.path fixup
from
xmodule.modulestore.inheritance
import
InheritanceMixin
from
xmodule.modulestore
import
prefer_xmodules
from
xmodule.x_module
import
XModuleMixin
# This should be moved into an XBlock Runtime/Application object
# once the responsibility of XBlock creation is moved out of modulestore - cpennington
XBLOCK_MIXINS
=
(
LmsBlockMixin
,
CmsBlockMixin
,
InheritanceMixin
,
XModuleMixin
)
...
...
cms/envs/test.py
View file @
2eaddefb
...
...
@@ -16,7 +16,6 @@ from .common import *
import
os
from
path
import
path
from
warnings
import
filterwarnings
from
xmodule.modulestore
import
prefer_xmodules
# Nose Test Runner
TEST_RUNNER
=
'django_nose.NoseTestSuiteRunner'
...
...
@@ -158,10 +157,6 @@ INSTALLED_APPS += ('external_auth', )
filterwarnings
(
'ignore'
,
message
=
'No request passed to the backend, unable to rate-limit'
)
################################# XBLOCK ######################################
XBLOCK_SELECT_FUNCTION
=
prefer_xmodules
################################# CELERY ######################################
CELERY_ALWAYS_EAGER
=
True
...
...
common/lib/xmodule/xmodule/html_module.py
View file @
2eaddefb
...
...
@@ -229,7 +229,7 @@ class AboutFields(object):
)
data
=
String
(
help
=
"Html contents to display for this module"
,
default
=
""
,
default
=
u
""
,
scope
=
Scope
.
content
)
...
...
@@ -263,7 +263,7 @@ class StaticTabFields(object):
default
=
"Empty"
,
)
data
=
String
(
default
=
textwrap
.
dedent
(
"""
\
default
=
textwrap
.
dedent
(
u
"""
\
<p>This is where you can add additional pages to your courseware. Click the 'edit' button to begin editing.</p>
"""
),
scope
=
Scope
.
content
,
...
...
@@ -300,7 +300,7 @@ class CourseInfoFields(object):
)
data
=
String
(
help
=
"Html contents to display for this module"
,
default
=
"<ol></ol>"
,
default
=
u
"<ol></ol>"
,
scope
=
Scope
.
content
)
...
...
common/lib/xmodule/xmodule/modulestore/mongo/base.py
View file @
2eaddefb
...
...
@@ -60,6 +60,9 @@ class MongoKeyValueStore(InheritanceKeyValueStore):
"""
def
__init__
(
self
,
data
,
children
,
metadata
):
super
(
MongoKeyValueStore
,
self
)
.
__init__
()
if
not
isinstance
(
data
,
dict
):
self
.
_data
=
{
'data'
:
data
}
else
:
self
.
_data
=
data
self
.
_children
=
children
self
.
_metadata
=
metadata
...
...
@@ -72,9 +75,6 @@ class MongoKeyValueStore(InheritanceKeyValueStore):
elif
key
.
scope
==
Scope
.
settings
:
return
self
.
_metadata
[
key
.
field_name
]
elif
key
.
scope
==
Scope
.
content
:
if
key
.
field_name
==
'data'
and
not
isinstance
(
self
.
_data
,
dict
):
return
self
.
_data
else
:
return
self
.
_data
[
key
.
field_name
]
else
:
raise
InvalidScopeError
(
key
)
...
...
@@ -85,9 +85,6 @@ class MongoKeyValueStore(InheritanceKeyValueStore):
elif
key
.
scope
==
Scope
.
settings
:
self
.
_metadata
[
key
.
field_name
]
=
value
elif
key
.
scope
==
Scope
.
content
:
if
key
.
field_name
==
'data'
and
not
isinstance
(
self
.
_data
,
dict
):
self
.
_data
=
value
else
:
self
.
_data
[
key
.
field_name
]
=
value
else
:
raise
InvalidScopeError
(
key
)
...
...
@@ -99,9 +96,7 @@ class MongoKeyValueStore(InheritanceKeyValueStore):
if
key
.
field_name
in
self
.
_metadata
:
del
self
.
_metadata
[
key
.
field_name
]
elif
key
.
scope
==
Scope
.
content
:
if
key
.
field_name
==
'data'
and
not
isinstance
(
self
.
_data
,
dict
):
self
.
_data
=
None
else
:
if
key
.
field_name
in
self
.
_data
:
del
self
.
_data
[
key
.
field_name
]
else
:
raise
InvalidScopeError
(
key
)
...
...
@@ -112,9 +107,6 @@ class MongoKeyValueStore(InheritanceKeyValueStore):
elif
key
.
scope
==
Scope
.
settings
:
return
key
.
field_name
in
self
.
_metadata
elif
key
.
scope
==
Scope
.
content
:
if
key
.
field_name
==
'data'
and
not
isinstance
(
self
.
_data
,
dict
):
return
True
else
:
return
key
.
field_name
in
self
.
_data
else
:
return
False
...
...
@@ -655,6 +647,10 @@ class MongoModuleStore(ModuleStoreWriteBase):
# layer but added it here to enable quick conversion. I'll need to reconcile these.
if
metadata
is
None
:
metadata
=
{}
if
definition_data
is
None
:
definition_data
=
{}
if
system
is
None
:
services
=
{}
if
self
.
i18n_service
:
...
...
@@ -673,11 +669,6 @@ class MongoModuleStore(ModuleStoreWriteBase):
services
=
services
,
)
xblock_class
=
system
.
load_block_type
(
location
.
category
)
if
definition_data
is
None
:
if
hasattr
(
xblock_class
,
'data'
)
and
xblock_class
.
data
.
default
is
not
None
:
definition_data
=
xblock_class
.
data
.
default
else
:
definition_data
=
{}
dbmodel
=
self
.
_create_new_field_data
(
location
.
category
,
location
,
definition_data
,
metadata
)
xmodule
=
system
.
construct_xblock_from_class
(
xblock_class
,
...
...
@@ -793,8 +784,6 @@ class MongoModuleStore(ModuleStoreWriteBase):
"""
try
:
definition_data
=
xblock
.
get_explicitly_set_fields_by_scope
()
if
len
(
definition_data
)
==
1
and
'data'
in
definition_data
:
definition_data
=
definition_data
[
'data'
]
payload
=
{
'definition.data'
:
definition_data
,
'metadata'
:
own_metadata
(
xblock
),
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
View file @
2eaddefb
...
...
@@ -300,7 +300,7 @@ class TestMongoKeyValueStore(object):
assert_false
(
self
.
kvs
.
has
(
key
))
def
test_read_non_dict_data
(
self
):
self
.
kvs
.
_data
=
'xml_data'
self
.
kvs
=
MongoKeyValueStore
(
'xml_data'
,
self
.
children
,
self
.
metadata
)
assert_equals
(
'xml_data'
,
self
.
kvs
.
get
(
KeyValueStore
.
Key
(
Scope
.
content
,
None
,
None
,
'data'
)))
def
_check_write
(
self
,
key
,
value
):
...
...
@@ -313,7 +313,7 @@ class TestMongoKeyValueStore(object):
yield
(
self
.
_check_write
,
KeyValueStore
.
Key
(
Scope
.
settings
,
None
,
None
,
'meta'
),
'new_settings'
)
def
test_write_non_dict_data
(
self
):
self
.
kvs
.
_data
=
'xml_data'
self
.
kvs
=
MongoKeyValueStore
(
'xml_data'
,
self
.
children
,
self
.
metadata
)
self
.
_check_write
(
KeyValueStore
.
Key
(
Scope
.
content
,
None
,
None
,
'data'
),
'new_data'
)
def
test_write_invalid_scope
(
self
):
...
...
lms/envs/bok_choy.py
View file @
2eaddefb
...
...
@@ -4,8 +4,6 @@ Settings for bok choy tests
import
os
from
path
import
path
from
xmodule.modulestore
import
prefer_xmodules
CONFIG_ROOT
=
path
(
__file__
)
.
abspath
()
.
dirname
()
#pylint: disable=E1120
TEST_ROOT
=
CONFIG_ROOT
.
dirname
()
.
dirname
()
/
"test_root"
...
...
@@ -60,8 +58,5 @@ LOG_OVERRIDES = [
for
log_name
,
log_level
in
LOG_OVERRIDES
:
logging
.
getLogger
(
log_name
)
.
setLevel
(
log_level
)
# Enable XBlocks
XBLOCK_SELECT_FUNCTION
=
prefer_xmodules
# Unfortunately, we need to use debug mode to serve staticfiles
DEBUG
=
True
lms/envs/common.py
View file @
2eaddefb
...
...
@@ -34,9 +34,6 @@ from path import path
from
.discussionsettings
import
*
from
lms.lib.xblock.mixin
import
LmsBlockMixin
from
xmodule.modulestore.inheritance
import
InheritanceMixin
from
xmodule.modulestore
import
prefer_xmodules
from
xmodule.x_module
import
XModuleMixin
################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
...
...
@@ -437,6 +434,11 @@ DOC_STORE_CONFIG = {
############# XBlock Configuration ##########
# Import after sys.path fixup
from
xmodule.modulestore.inheritance
import
InheritanceMixin
from
xmodule.modulestore
import
prefer_xmodules
from
xmodule.x_module
import
XModuleMixin
# This should be moved into an XBlock Runtime/Application object
# once the responsibility of XBlock creation is moved out of modulestore - cpennington
XBLOCK_MIXINS
=
(
LmsBlockMixin
,
InheritanceMixin
,
XModuleMixin
)
...
...
@@ -1201,6 +1203,17 @@ FEATURES['CLASS_DASHBOARD'] = False
if
FEATURES
.
get
(
'CLASS_DASHBOARD'
):
INSTALLED_APPS
+=
(
'class_dashboard'
,)
######################## CAS authentication ###########################
if
FEATURES
.
get
(
'AUTH_USE_CAS'
):
CAS_SERVER_URL
=
'https://provide_your_cas_url_here'
AUTHENTICATION_BACKENDS
=
(
'django.contrib.auth.backends.ModelBackend'
,
'django_cas.backends.CASBackend'
,
)
INSTALLED_APPS
+=
(
'django_cas'
,)
MIDDLEWARE_CLASSES
+=
(
'django_cas.middleware.CASMiddleware'
,)
###################### Registration ##################################
# For each of the fields, give one of the following values:
...
...
requirements/edx/edx-private.txt
View file @
2eaddefb
<<<<<<< HEAD
# Requirements for edx.org that aren't necessarily needed for Open edX.
-e git+ssh://git@github.com/jazkarta/edX-jsdraw.git@df9d048e331a642193e5aa2e03650fb84a9d715f#egg=edx-jsdraw
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment