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
dfbfc790
Commit
dfbfc790
authored
Nov 05, 2012
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work on templating, bugfix
parent
e94a78c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
13 deletions
+16
-13
common/lib/xmodule/xmodule/self_assessment_module.py
+10
-9
lms/envs/dev.py
+2
-2
lms/templates/self_assessment_prompt.html
+1
-1
lms/templates/self_assessment_rubric.html
+3
-1
No files found.
common/lib/xmodule/xmodule/self_assessment_module.py
View file @
dfbfc790
...
...
@@ -104,12 +104,7 @@ class SelfAssessmentModule(XModule):
self
.
prompt
=
definition
[
'prompt'
]
self
.
submit_message
=
definition
[
'submitmessage'
]
#Forms to append to prompt and rubric that capture student responses.
#Do not change ids and names, as javascript (selfassessment/display.coffee) depends on them
# TODO: use templates -- system.render_template will pull them from the right place (lms/templates dir)
# TODO:
#set context variables and render template
previous_answer
=
''
if
len
(
self
.
student_answers
)
>
0
:
previous_answer
=
self
.
student_answers
[
len
(
self
.
student_answers
)
-
1
]
...
...
@@ -122,7 +117,7 @@ class SelfAssessmentModule(XModule):
'ajax_url'
:
system
.
ajax_url
,
'section_name'
:
'sa-wrapper'
,
}
self
.
html
=
self
.
system
.
render_template
(
'self_assessment_prompt.html'
,
context
)
self
.
html
=
self
.
system
.
render_template
(
'self_assessment_prompt.html'
,
self
.
context
)
def
get_score
(
self
):
return
{
'score'
:
self
.
score
}
...
...
@@ -183,9 +178,15 @@ class SelfAssessmentModule(XModule):
# TODO: expecting something like get['answer']
self
.
temp_answer
=
get
.
keys
()[
0
]
log
.
debug
(
self
.
temp_answer
)
return
{
'success'
:
True
,
'rubric'
:
self
.
rubric
}
return
{
'success'
:
True
,
'rubric'
:
self
.
system
.
render_template
(
'self_assessment_rubric.html'
,
self
.
context
)
}
else
:
return
{
'success'
:
False
,
'message'
:
'Too many attempts.'
}
return
{
'success'
:
False
,
'message'
:
'Too many attempts.'
}
def
save_problem
(
self
,
get
):
'''
...
...
lms/envs/dev.py
View file @
dfbfc790
...
...
@@ -63,10 +63,10 @@ CACHES = {
XQUEUE_INTERFACE
=
{
"url"
:
"https://sandbox-xqueue.edx.org"
,
"url"
:
'http://127.0.0.1:3031'
,
"django_auth"
:
{
"username"
:
"lms"
,
"password"
:
"
***REMOVED***
"
"password"
:
"
abcd
"
},
"basic_auth"
:
(
'anant'
,
'agarwal'
),
}
...
...
lms/templates/self_assessment_prompt.html
View file @
dfbfc790
<section
class=
"${ section_name }"
>
${ prompt }
% if previous_answer_given
% if previous_answer_given
:
:
<br/>
Previous answer: ${ previous_answer }
<br/>
% endif
...
...
lms/templates/self_assessment_rubric.html
View file @
dfbfc790
<section
class=
"${section_name}"
>
<br/><br/><b>
Rubric
</b>
${ rubric }
Please assess your performance given the above rubric:
<br/>
<select
name=
"assessment"
id=
"assessment"
>
<option
value=
"incorrect"
>
Incorrect
</option>
...
...
@@ -11,6 +12,6 @@
<br/>
<input
type=
"button"
value=
"Save"
id=
"save"
name=
"save"
/>
<p
id=
"save_message"
></p>
<input
type=
"hidden"
id=
"ajax_url"
name=
"ajax_url"
url=
"${
self_assessment['ajax_url']
}"
>
<input
type=
"hidden"
id=
"ajax_url"
name=
"ajax_url"
url=
"${
ajax_url
}"
>
</section>
<br/><br/>
\ 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