Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
c7209a73
Commit
c7209a73
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Add links from the editing page for the cms to the corresponding page in the lms
parent
71f39bc4
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cms/djangoapps/contentstore/views.py
+9
-1
9 additions, 1 deletion
cms/djangoapps/contentstore/views.py
cms/envs/aws.py
+2
-0
2 additions, 0 deletions
cms/envs/aws.py
cms/envs/dev.py
+2
-0
2 additions, 0 deletions
cms/envs/dev.py
cms/templates/unit.html
+1
-0
1 addition, 0 deletions
cms/templates/unit.html
with
14 additions
and
1 deletion
cms/djangoapps/contentstore/views.py
+
9
−
1
View file @
c7209a73
...
...
@@ -8,6 +8,7 @@ from django.contrib.auth.decorators import login_required
from
django.core.context_processors
import
csrf
from
django_future.csrf
import
ensure_csrf_cookie
from
django.core.urlresolvers
import
reverse
from
django.conf
import
settings
from
xmodule.modulestore
import
Location
from
xmodule.x_module
import
ModuleSystem
...
...
@@ -111,7 +112,14 @@ def edit_item(request):
'
category
'
:
item
.
category
,
'
url_name
'
:
item
.
url_name
,
'
previews
'
:
get_module_previews
(
request
,
item
),
'
metadata
'
:
item
.
metadata
'
metadata
'
:
item
.
metadata
,
# TODO: It would be nice to able to use reverse here in some form, but we don't have the lms urls imported
'
lms_link
'
:
"
{lms_base}/courses/{course_id}/jump_to/{location}
"
.
format
(
lms_base
=
settings
.
LMS_BASE
,
# TODO: These will need to be changed to point to the particular instance of this problem in the particular course
course_id
=
[
course
.
id
for
course
in
modulestore
().
get_courses
()
if
course
.
location
.
org
==
item
.
location
.
org
and
course
.
location
.
course
==
item
.
location
.
course
][
0
],
location
=
item
.
location
,
)
})
...
...
This diff is collapsed.
Click to expand it.
cms/envs/aws.py
+
2
−
0
View file @
c7209a73
...
...
@@ -19,6 +19,8 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
with
open
(
ENV_ROOT
/
"
cms.env.json
"
)
as
env_file
:
ENV_TOKENS
=
json
.
load
(
env_file
)
LMS_BASE
=
ENV_TOKENS
[
'
LMS_BASE
'
]
SITE_NAME
=
ENV_TOKENS
[
'
SITE_NAME
'
]
LOG_DIR
=
ENV_TOKENS
[
'
LOG_DIR
'
]
...
...
This diff is collapsed.
Click to expand it.
cms/envs/dev.py
+
2
−
0
View file @
c7209a73
...
...
@@ -36,6 +36,8 @@ DATABASES = {
}
}
LMS_BASE
=
"
http://localhost:8000
"
REPOS
=
{
'
edx4edx
'
:
{
'
branch
'
:
'
master
'
,
...
...
This diff is collapsed.
Click to expand it.
cms/templates/unit.html
+
1
−
0
View file @
c7209a73
...
...
@@ -42,6 +42,7 @@
</section>
</section>
${contents}
<a
class=
"lms-link"
href=
"${lms_link}"
>
View in LMS
</a>
<section
class=
"previews"
>
% for preview in previews:
<section
class=
"preview"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment