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
1277c5f8
Commit
1277c5f8
authored
Aug 22, 2012
by
Kyle Fiedler
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/bridger/new_wiki' of github.com:MITx/mitx into feature/bridger/new_wiki
parents
d0c92aa1
788c74e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
common/lib/xmodule/xmodule/course_module.py
+13
-4
lms/djangoapps/course_wiki/views.py
+1
-1
No files found.
common/lib/xmodule/xmodule/course_module.py
View file @
1277c5f8
...
...
@@ -60,6 +60,8 @@ class CourseDescriptor(SequenceDescriptor):
def
__init__
(
self
,
system
,
definition
=
None
,
**
kwargs
):
super
(
CourseDescriptor
,
self
)
.
__init__
(
system
,
definition
,
**
kwargs
)
self
.
textbooks
=
self
.
definition
[
'data'
][
'textbooks'
]
self
.
wiki_slug
=
self
.
definition
[
'data'
][
'wiki_slug'
]
or
self
.
location
.
course
msg
=
None
if
self
.
start
is
None
:
...
...
@@ -94,8 +96,19 @@ class CourseDescriptor(SequenceDescriptor):
for
textbook
in
xml_object
.
findall
(
"textbook"
):
textbooks
.
append
(
cls
.
Textbook
.
from_xml_object
(
textbook
))
xml_object
.
remove
(
textbook
)
#Load the wiki tag if it exists
wiki_slug
=
None
wiki_tag
=
xml_object
.
find
(
"wiki"
)
if
wiki_tag
is
not
None
:
wiki_slug
=
wiki_tag
.
attrib
.
get
(
"slug"
,
default
=
None
)
xml_object
.
remove
(
wiki_tag
)
definition
=
super
(
CourseDescriptor
,
cls
)
.
definition_from_xml
(
xml_object
,
system
)
definition
.
setdefault
(
'data'
,
{})[
'textbooks'
]
=
textbooks
definition
[
'data'
][
'wiki_slug'
]
=
wiki_slug
return
definition
def
has_started
(
self
):
...
...
@@ -206,10 +219,6 @@ class CourseDescriptor(SequenceDescriptor):
return
self
.
location
.
course
@property
def
wiki_slug
(
self
):
return
self
.
location
.
course
@property
def
org
(
self
):
return
self
.
location
.
org
lms/djangoapps/course_wiki/views.py
View file @
1277c5f8
...
...
@@ -80,7 +80,7 @@ def course_wiki_redirect(request, course_id):
urlpath
=
URLPath
.
create_article
(
root
,
course_slug
,
title
=
course
.
number
,
title
=
course
_slug
,
content
=
"This is the wiki for **{0}**'s _{1}_."
.
format
(
course
.
org
,
course
.
title
),
user_message
=
"Course page automatically created."
,
user
=
None
,
...
...
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