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
285beb38
Commit
285beb38
authored
Jul 21, 2014
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up from rebase with master.
parent
d447c075
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
cms/static/js/views/pages/group_configurations.js
+9
-9
common/lib/xmodule/xmodule/modulestore/mongo/base.py
+2
-1
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+6
-3
No files found.
cms/static/js/views/pages/group_configurations.js
View file @
285beb38
define
([
'jquery'
,
'underscore'
,
'gettext'
,
'js/views/
baseview
'
,
'jquery'
,
'underscore'
,
'gettext'
,
'js/views/
pages/base_page
'
,
'js/views/group_configurations_list'
],
function
(
$
,
_
,
gettext
,
Base
View
,
GroupConfigurationsList
)
{
function
(
$
,
_
,
gettext
,
Base
Page
,
GroupConfigurationsList
)
{
'use strict'
;
var
GroupConfigurationsPage
=
Base
View
.
extend
({
var
GroupConfigurationsPage
=
Base
Page
.
extend
({
initialize
:
function
()
{
Base
View
.
prototype
.
initialize
.
call
(
this
);
Base
Page
.
prototype
.
initialize
.
call
(
this
);
this
.
listView
=
new
GroupConfigurationsList
({
collection
:
this
.
collection
});
},
render
:
function
()
{
render
Page
:
function
()
{
var
hash
=
this
.
getLocationHash
();
this
.
hideLoadingIndicator
();
this
.
$
(
'.content-primary'
).
append
(
this
.
listView
.
render
().
el
);
this
.
$el
.
append
(
this
.
listView
.
render
().
el
);
this
.
addButtonActions
();
this
.
addWindowActions
();
this
.
addWindowActions
();
if
(
hash
)
{
// Strip leading '#' to get id string to match
this
.
expandConfiguration
(
hash
.
replace
(
'#'
,
''
))
this
.
expandConfiguration
(
hash
.
replace
(
'#'
,
''
))
;
}
return
$
.
Deferred
().
resolve
().
promise
();
},
addButtonActions
:
function
()
{
...
...
common/lib/xmodule/xmodule/modulestore/mongo/base.py
View file @
285beb38
...
...
@@ -1011,7 +1011,8 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase):
xblock
=
self
.
create_xmodule
(
location
,
**
kwargs
)
xblock
=
self
.
update_item
(
xblock
,
user_id
,
allow_not_found
=
True
)
return
xblock
# Retrieve the item from the store so that it has edit info attributes
return
self
.
get_item
(
xblock
.
location
)
def
create_child
(
self
,
user_id
,
parent_usage_key
,
block_type
,
block_id
=
None
,
**
kwargs
):
"""
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
285beb38
...
...
@@ -539,7 +539,7 @@ class TestMixedModuleStore(unittest.TestCase):
"""
self
.
initdb
(
default_ms
)
item
=
self
.
store
.
create_item
(
self
.
course_locations
[
self
.
MONGO_COURSEID
],
'problem'
,
self
.
user_id
,
block_id
=
'orphan'
self
.
user_id
,
self
.
course_locations
[
self
.
MONGO_COURSEID
]
.
course_key
,
'problem'
,
block_id
=
'orphan'
)
self
.
assertTrue
(
self
.
store
.
has_changes
(
item
.
location
))
self
.
store
.
publish
(
item
.
location
,
self
.
user_id
)
...
...
@@ -618,10 +618,13 @@ class TestMixedModuleStore(unittest.TestCase):
self
.
assertEqual
(
parent
,
self
.
course_locations
[
self
.
XML_COURSEID1
])
def
verify_get_parent_locations_results
(
self
,
expected_results
):
def
branch_agnostic
(
location
):
return
location
if
location
is
None
else
location
.
for_branch
(
None
)
for
child_location
,
parent_location
,
revision
in
expected_results
:
self
.
assertEqual
(
parent_location
,
self
.
store
.
get_parent_location
(
child_location
,
revision
=
revision
)
branch_agnostic
(
parent_location
)
,
branch_agnostic
(
self
.
store
.
get_parent_location
(
child_location
,
revision
=
revision
)
)
)
@ddt.data
(
'draft'
,
'split'
)
...
...
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