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
39e64c1e
Commit
39e64c1e
authored
Sep 27, 2012
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work in progress. Need to commit before rebasing to master
parent
7bf7eab6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
cms/djangoapps/contentstore/views.py
+1
-6
cms/templates/widgets/upload_assets.html
+2
-2
common/djangoapps/contentserver/middleware.py
+1
-3
common/lib/xmodule/xmodule/html_module.py
+9
-1
No files found.
cms/djangoapps/contentstore/views.py
View file @
39e64c1e
...
...
@@ -353,7 +353,7 @@ def save_item(request):
if
request
.
POST
[
'data'
]:
data
=
request
.
POST
[
'data'
]
modulestore
()
.
update_item
(
item_location
,
data
)
if
request
.
POST
[
'children'
]:
children
=
request
.
POST
[
'children'
]
modulestore
()
.
update_children
(
item_location
,
children
)
...
...
@@ -457,8 +457,3 @@ def upload_asset(request, org, course, coursename):
return
HttpResponse
(
'Upload completed'
)
class
UploadFileForm
(
forms
.
Form
):
title
=
forms
.
CharField
(
max_length
=
50
)
file
=
forms
.
FileField
()
cms/templates/widgets/upload_assets.html
View file @
39e64c1e
...
...
@@ -6,8 +6,8 @@
<input
type=
"submit"
value=
"Upload File"
>
</form>
</div>
<div
class=
"asset-upload-progress"
>
<div
class=
"bar"
></div>
<div
class=
"asset-upload-progress"
style=
"position:relative; width:400px; border: 1px solid #ddd; padding: 1px; border-radius: 3px;"
>
<div
class=
"bar"
style=
"background-color: #B4F5B4; width:0%; height:20px; border-radius: 3px;"
></div>
<div
class=
"percent"
>
0%
</div>
</div>
...
...
common/djangoapps/contentserver/middleware.py
View file @
39e64c1e
...
...
@@ -33,10 +33,8 @@ class StaticContentServer(object):
# see if the last-modified at hasn't changed, if not return a 302 (Not Modified)
logging
.
debug
(
request
.
META
)
# convert over the DB persistent last modified timestamp to a HTTP compatible
# timestamp
# timestamp
, so we can simply compare the strings
last_modified_at_str
=
content
.
last_modified_at
.
strftime
(
"
%
a,
%
d-
%
b-
%
Y
%
H:
%
M:
%
S GMT"
)
# see if the client has cached this content, if so then compare the
...
...
common/lib/xmodule/xmodule/html_module.py
View file @
39e64c1e
...
...
@@ -4,6 +4,7 @@ import logging
import
os
import
sys
from
lxml
import
etree
from
lxml.html
import
rewrite_links
from
path
import
path
from
.x_module
import
XModule
...
...
@@ -18,7 +19,9 @@ log = logging.getLogger("mitx.courseware")
class
HtmlModule
(
XModule
):
def
get_html
(
self
):
return
self
.
html
# cdodge: perform link substitutions for any references to course static content (e.g. images)
return
rewrite_links
(
self
.
html
,
self
.
rewrite_content_links
,
self
)
#return self.html
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
...
...
@@ -26,6 +29,11 @@ class HtmlModule(XModule):
instance_state
,
shared_state
,
**
kwargs
)
self
.
html
=
self
.
definition
[
'data'
]
def
rewrite_content_links
(
link
,
self
):
if
link
.
startswith
(
'xasset:'
):
logging
.
debug
(
'found link: {0}'
.
format
(
link
))
return
link
class
HtmlDescriptor
(
XmlDescriptor
,
EditingDescriptor
):
"""
...
...
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