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
987d7bcc
Commit
987d7bcc
authored
Aug 20, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
book_url doesn't come from settings
parent
6a05a812
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
lms/djangoapps/staticbook/views.py
+4
-1
lms/templates/staticbook.html
+2
-2
No files found.
lms/djangoapps/staticbook/views.py
View file @
987d7bcc
from
django.conf
import
settings
from
django.contrib.auth.decorators
import
login_required
from
mitxmako.shortcuts
import
render_to_response
...
...
@@ -13,8 +14,10 @@ def index(request, course_id, book_index, page=0):
textbook
=
course
.
textbooks
[
int
(
book_index
)]
table_of_contents
=
textbook
.
table_of_contents
book_url
=
settings
.
BOOK_URL
return
render_to_response
(
'staticbook.html'
,
{
'page'
:
int
(
page
),
'course'
:
course
,
{
'page'
:
int
(
page
),
'course'
:
course
,
'book_url'
:
book_url
,
'table_of_contents'
:
table_of_contents
,
'staff_access'
:
staff_access
})
...
...
lms/templates/staticbook.html
View file @
987d7bcc
...
...
@@ -32,7 +32,7 @@ function goto_page(n) {
if
(
n
<
10
)
{
prefix
=
"00"
;
}
$
(
"#bookpage"
).
attr
(
"src"
,
"${
settings.BOOK_URL
}p"
+
prefix
+
n
+
".png"
);
$
(
"#bookpage"
).
attr
(
"src"
,
"${
book_url
}p"
+
prefix
+
n
+
".png"
);
$
.
cookie
(
"book_page"
,
n
,
{
'expires'
:
3650
,
'path'
:
'/'
});
};
...
...
@@ -113,7 +113,7 @@ $("#open_close_accordion a").click(function(){
</ul>
</nav>
<img
id=
"bookpage"
src=
"${
settings.BOOK_URL
}p${ "
%
03i
"%(
page
)
}.
png
"
>
<img
id=
"bookpage"
src=
"${
book_url
}p${ "
%
03i
"%(
page
)
}.
png
"
>
</section>
</section>
</div>
...
...
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