Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
b1e09c82
Commit
b1e09c82
authored
Jan 30, 2014
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move openassessment_compose to openassessment.xblock, include XBlock workbench at /workbench
parent
3246b816
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
67 additions
and
51 deletions
+67
-51
.gitignore
+0
-3
apps/openassessment/xblock/openassessmentblock.py
+10
-6
apps/openassessment/xblock/static/css/openassessment_compose.css
+0
-0
apps/openassessment/xblock/static/html/openassessment_compose.html
+0
-0
apps/openassessment/xblock/static/js/src/openassessment_compose.js
+0
-0
apps/openassessment_compose/openassessment_compose/__init__.py
+0
-1
apps/openassessment_compose/setup.py
+0
-34
requirements/base.txt
+2
-1
settings/base.py
+13
-4
setup.py
+22
-2
urls.py
+20
-0
No files found.
.gitignore
View file @
b1e09c82
...
@@ -42,6 +42,3 @@ nosetests.xml
...
@@ -42,6 +42,3 @@ nosetests.xml
# some mac thing
# some mac thing
.DS_Store
.DS_Store
# If the XBlock repo is checked out here, ignore it
XBlock
XBlock/*
apps/openassessment
_compose/openassessment_compose/openassessment_compose
.py
→
apps/openassessment
/xblock/openassessmentblock
.py
View file @
b1e09c82
...
@@ -12,12 +12,16 @@ from xblock.fragment import Fragment
...
@@ -12,12 +12,16 @@ from xblock.fragment import Fragment
mako_default_filters
=
[
'unicode'
,
'h'
,
'trim'
]
mako_default_filters
=
[
'unicode'
,
'h'
,
'trim'
]
class
openassessmentComposeX
Block
(
XBlock
):
class
OpenAssessment
Block
(
XBlock
):
"""
"""
Displays a question and gives an area where students can compose a response.
Displays a question and gives an area where students can compose a response.
"""
"""
question
=
String
(
default
=
u"Undefined question"
,
scope
=
Scope
.
content
,
help
=
"A question to display to a student"
)
question
=
String
(
default
=
u"Undefined question"
,
scope
=
Scope
.
content
,
help
=
"A question to display to a student"
)
def
_get_xblock_trace
(
self
):
def
_get_xblock_trace
(
self
):
"""Uniquely identify this xblock by context.
"""Uniquely identify this xblock by context.
...
@@ -50,8 +54,8 @@ class openassessmentComposeXBlock(XBlock):
...
@@ -50,8 +54,8 @@ class openassessmentComposeXBlock(XBlock):
frag
.
add_css
(
load
(
"static/css/openassessment_compose.css"
))
frag
.
add_css
(
load
(
"static/css/openassessment_compose.css"
))
# XXX: I'm sure there's a more socially acceptable way to get our values
# XXX: I'm sure there's a more socially acceptable way to get our values
# into the js. But once we've invoked mako it's so tempting....
# into the js. But once we've invoked mako it's so tempting....
#frag.add_javascript(Template(load("static/js/src/openassessment_compose.js"),
#frag.add_javascript(Template(load("static/js/src/openassessment_compose.js"),
# default_filters=mako_default_filters,
# default_filters=mako_default_filters,
# output_encoding='utf-8'
# output_encoding='utf-8'
# ).render(xblock_trace=trace))
# ).render(xblock_trace=trace))
frag
.
add_javascript
(
load
(
"static/js/src/openassessment_compose.js"
))
frag
.
add_javascript
(
load
(
"static/js/src/openassessment_compose.js"
))
...
@@ -74,9 +78,9 @@ class openassessmentComposeXBlock(XBlock):
...
@@ -74,9 +78,9 @@ class openassessmentComposeXBlock(XBlock):
def
workbench_scenarios
():
def
workbench_scenarios
():
"""A canned scenario for display in the workbench."""
"""A canned scenario for display in the workbench."""
return
[
return
[
(
"Open
assessmentComposeX
Block"
,
(
"Open
Assessment
Block"
,
"""<vertical_demo>
"""<vertical_demo>
<openassessment
_compose
/>
<openassessment/>
</vertical_demo>
</vertical_demo>
"""
),
"""
),
]
]
apps/openassessment
_compose/openassessment_compose
/static/css/openassessment_compose.css
→
apps/openassessment
/xblock
/static/css/openassessment_compose.css
View file @
b1e09c82
File moved
apps/openassessment
_compose/openassessment_compose
/static/html/openassessment_compose.html
→
apps/openassessment
/xblock
/static/html/openassessment_compose.html
View file @
b1e09c82
File moved
apps/openassessment
_compose/openassessment_compose
/static/js/src/openassessment_compose.js
→
apps/openassessment
/xblock
/static/js/src/openassessment_compose.js
View file @
b1e09c82
File moved
apps/openassessment_compose/openassessment_compose/__init__.py
deleted
100644 → 0
View file @
3246b816
from
.openassessment_compose
import
openassessmentComposeXBlock
apps/openassessment_compose/setup.py
deleted
100644 → 0
View file @
3246b816
"""Setup for openassessment_compose XBlock."""
import
os
from
setuptools
import
setup
def
package_data
(
pkg
,
root
):
"""Generic function to find package_data for `pkg` under `root`."""
data
=
[]
for
dirname
,
_
,
files
in
os
.
walk
(
os
.
path
.
join
(
pkg
,
root
)):
for
fname
in
files
:
data
.
append
(
os
.
path
.
relpath
(
os
.
path
.
join
(
dirname
,
fname
),
pkg
))
return
{
pkg
:
data
}
setup
(
name
=
'openassessment_compose-xblock'
,
version
=
'0.1'
,
description
=
'openassessment Composition XBlock'
,
packages
=
[
'openassessment_compose'
,
],
install_requires
=
[
'XBlock'
,
'Mako'
,
# XXX: convert to django template, eliminate dependency
],
entry_points
=
{
'xblock.v1'
:
[
'openassessment_compose = openassessment_compose:openassessmentComposeXBlock'
,
]
},
package_data
=
package_data
(
"openassessment_compose"
,
"static"
),
)
requirements/base.txt
View file @
b1e09c82
# edX Internal Requirements
# edX Internal Requirements
-e git+https://github.com/edx/XBlock.git@
fa88607
#egg=XBlock
-e git+https://github.com/edx/XBlock.git@
24c8bbd6
#egg=XBlock
# Third Party Requirements
# Third Party Requirements
django==1.4.8
django==1.4.8
djangorestframework==2.3.5
djangorestframework==2.3.5
Mako==0.9.1
settings/base.py
View file @
b1e09c82
...
@@ -96,7 +96,7 @@ SECRET_KEY = ')68&-c!+og)cy$o9pju_$c707+fett&ph%t%gqgu-@5)!cl$cr'
...
@@ -96,7 +96,7 @@ SECRET_KEY = ')68&-c!+og)cy$o9pju_$c707+fett&ph%t%gqgu-@5)!cl$cr'
TEMPLATE_LOADERS
=
(
TEMPLATE_LOADERS
=
(
'django.template.loaders.filesystem.Loader'
,
'django.template.loaders.filesystem.Loader'
,
'django.template.loaders.app_directories.Loader'
,
'django.template.loaders.app_directories.Loader'
,
#
'django.template.loaders.eggs.Loader',
'django.template.loaders.eggs.Loader'
,
)
)
MIDDLEWARE_CLASSES
=
(
MIDDLEWARE_CLASSES
=
(
...
@@ -109,8 +109,7 @@ MIDDLEWARE_CLASSES = (
...
@@ -109,8 +109,7 @@ MIDDLEWARE_CLASSES = (
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
)
ROOT_URLCONF
=
'common_grading.urls'
ROOT_URLCONF
=
'urls'
#ROOT_URLCONF = 'urls'
# Python dotted path to the WSGI application used by Django's runserver.
# Python dotted path to the WSGI application used by Django's runserver.
# WSGI_APPLICATION = 'peer_grading.wsgi.application'
# WSGI_APPLICATION = 'peer_grading.wsgi.application'
...
@@ -130,9 +129,17 @@ INSTALLED_APPS = (
...
@@ -130,9 +129,17 @@ INSTALLED_APPS = (
'django.contrib.staticfiles'
,
'django.contrib.staticfiles'
,
'django.contrib.admin'
,
'django.contrib.admin'
,
'django.contrib.admindocs'
,
'django.contrib.admindocs'
,
# Third party
'django_extensions'
,
# XBlock
'workbench'
,
'demo_xblocks'
,
# edx-tim apps
'submissions'
,
'submissions'
,
'openassessment.peer'
,
'openassessment.peer'
,
'openasssessment_compose'
,
)
)
# A sample logging configuration. The only tangible logging
# A sample logging configuration. The only tangible logging
...
@@ -163,3 +170,5 @@ LOGGING = {
...
@@ -163,3 +170,5 @@ LOGGING = {
},
},
}
}
}
}
# TODO: add config for XBLOCK_WORKBENCH { SCENARIO_CLASSES }
setup.py
View file @
b1e09c82
#!/usr/bin/env python
#!/usr/bin/env python
import
os
from
setuptools
import
setup
from
setuptools
import
setup
PACKAGES
=
[
'submissions'
,
'openassessment.peer'
,
'openassessment_compose'
]
PACKAGES
=
[
'submissions'
,
'openassessment.peer'
,
'openassessment.xblock'
]
def
package_data
(
pkg
,
root
):
"""Generic function to find package_data for `pkg` under `root`."""
data
=
[]
for
dirname
,
_
,
files
in
os
.
walk
(
os
.
path
.
join
(
pkg
,
root
)):
for
fname
in
files
:
data
.
append
(
os
.
path
.
relpath
(
os
.
path
.
join
(
dirname
,
fname
),
pkg
))
return
{
pkg
:
data
}
def
is_requirement
(
line
):
def
is_requirement
(
line
):
...
@@ -41,4 +54,11 @@ setup(
...
@@ -41,4 +54,11 @@ setup(
packages
=
PACKAGES
,
packages
=
PACKAGES
,
package_dir
=
{
''
:
'apps'
},
package_dir
=
{
''
:
'apps'
},
install_requires
=
REQUIREMENTS
,
install_requires
=
REQUIREMENTS
,
entry_points
=
{
'xblock.v1'
:
[
'openassessment = openassessment.xblock.openassessmentblock:OpenAssessmentBlock'
,
]
},
package_data
=
package_data
(
"openassessment.xblock"
,
"static"
),
)
)
urls.py
0 → 100644
View file @
b1e09c82
from
django.conf.urls
import
include
,
patterns
,
url
from
django.contrib
import
admin
import
submissions.urls
import
workbench.urls
admin
.
autodiscover
()
urlpatterns
=
patterns
(
''
,
# Django built-in
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
# Provided by XBlock
url
(
r'^workbench/'
,
include
(
workbench
.
urls
))
# edx-tim apps
# url(r'^submissions', include(submissions.urls)),
)
\ No newline at end of file
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