Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
edd6c9de
Commit
edd6c9de
authored
Nov 23, 2013
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move html templates to `templates/` folder, move XML to subdirectory
parent
9648043f
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
11 additions
and
12 deletions
+11
-12
mentoring/answer.py
+2
-2
mentoring/mentoring.py
+7
-8
mentoring/quizz.py
+2
-2
templates/html/answer_editable.html
+0
-0
templates/html/answer_read_only.html
+0
-0
templates/html/mentoring.html
+0
-0
templates/html/mentoring_progress.html
+0
-0
templates/html/quizz_rating.html
+0
-0
templates/html/quizz_yes-no-unsure.html
+0
-0
templates/html/tip.html
+0
-0
templates/xml/001_pre_goal_brainstorm.xml
+0
-0
templates/xml/002_getting_feedback.xml
+0
-0
templates/xml/003_reflecting_on_feedback.xml
+0
-0
templates/xml/004_deciding_on_your_improvement_goal.xml
+0
-0
templates/xml/005_checking_your_improvement_goal.xml
+0
-0
No files found.
mentoring/answer.py
View file @
edd6c9de
...
...
@@ -48,12 +48,12 @@ class AnswerBlock(XBlock):
def
mentoring_view
(
self
,
context
=
None
):
if
not
self
.
read_only
:
html
=
render_template
(
'
static
/html/answer_editable.html'
,
{
html
=
render_template
(
'
templates
/html/answer_editable.html'
,
{
'self'
:
self
,
'max_length'
:
Answer
.
_meta
.
get_field
(
'student_input'
)
.
max_length
,
})
else
:
html
=
render_template
(
'
static
/html/answer_read_only.html'
,
{
html
=
render_template
(
'
templates
/html/answer_read_only.html'
,
{
'self'
:
self
,
})
...
...
mentoring/mentoring.py
View file @
edd6c9de
...
...
@@ -55,7 +55,7 @@ class MentoringBlock(XBlock):
"""
fragment
,
named_children
=
self
.
get_children_fragment
(
context
)
fragment
.
add_content
(
render_template
(
'
static
/html/mentoring.html'
,
{
fragment
.
add_content
(
render_template
(
'
templates
/html/mentoring.html'
,
{
'self'
:
self
,
'named_children'
:
named_children
,
}))
...
...
@@ -63,7 +63,7 @@ class MentoringBlock(XBlock):
fragment
.
add_javascript
(
load_resource
(
'static/js/vendor/underscore-min.js'
))
fragment
.
add_javascript
(
load_resource
(
'static/js/mentoring.js'
))
fragment
.
add_resource
(
load_resource
(
'
static
/html/mentoring_progress.html'
)
.
format
(
fragment
.
add_resource
(
load_resource
(
'
templates
/html/mentoring_progress.html'
)
.
format
(
completed
=
self
.
runtime
.
resources_url
(
'images/correct-icon.png'
)),
"text/html"
)
...
...
@@ -88,7 +88,6 @@ class MentoringBlock(XBlock):
completed
=
completed
and
child_result
[
'completed'
]
self
.
completed
=
bool
(
completed
)
self
.
save
()
return
{
'submitResults'
:
submit_results
,
...
...
@@ -105,13 +104,13 @@ class MentoringBlock(XBlock):
"""
return
[
(
"Mentoring - Page 1, Pre-goal brainstom"
,
load_resource
(
'templates/001_pre_goal_brainstorm.xml'
)),
load_resource
(
'templates/
xml/
001_pre_goal_brainstorm.xml'
)),
(
"Mentoring - Page 2, Getting feedback"
,
load_resource
(
'templates/002_getting_feedback.xml'
)),
load_resource
(
'templates/
xml/
002_getting_feedback.xml'
)),
(
"Mentoring - Page 3, Reflecting on your feedback"
,
load_resource
(
'templates/003_reflecting_on_feedback.xml'
)),
load_resource
(
'templates/
xml/
003_reflecting_on_feedback.xml'
)),
(
"Mentoring - Page 4, Deciding on your improvement goal"
,
load_resource
(
'templates/004_deciding_on_your_improvement_goal.xml'
)),
load_resource
(
'templates/
xml/
004_deciding_on_your_improvement_goal.xml'
)),
(
"Mentoring - Page 5, Checking your improvement goal"
,
load_resource
(
'templates/005_checking_your_improvement_goal.xml'
)),
load_resource
(
'templates/
xml/
005_checking_your_improvement_goal.xml'
)),
]
mentoring/quizz.py
View file @
edd6c9de
...
...
@@ -75,7 +75,7 @@ class QuizzBlock(XBlock):
if
self
.
type
not
in
(
'yes-no-unsure'
,
'rating'
):
raise
ValueError
,
u'Invalid value for QuizzBlock.type: `{}`'
.
format
(
self
.
type
)
template_path
=
'
static
/html/quizz_{}.html'
.
format
(
self
.
type
)
template_path
=
'
templates
/html/quizz_{}.html'
.
format
(
self
.
type
)
html
=
render_template
(
template_path
,
{
'self'
:
self
,
})
...
...
@@ -94,7 +94,7 @@ class QuizzBlock(XBlock):
self
.
student_choice
=
submission
if
show_tip
:
formatted_tip
=
render_template
(
'
static
/html/tip.html'
,
{
formatted_tip
=
render_template
(
'
templates
/html/tip.html'
,
{
'self'
:
self
,
})
else
:
...
...
static
/html/answer_editable.html
→
templates
/html/answer_editable.html
View file @
edd6c9de
File moved
static
/html/answer_read_only.html
→
templates
/html/answer_read_only.html
View file @
edd6c9de
File moved
static
/html/mentoring.html
→
templates
/html/mentoring.html
View file @
edd6c9de
File moved
static
/html/mentoring_progress.html
→
templates
/html/mentoring_progress.html
View file @
edd6c9de
File moved
static
/html/quizz_rating.html
→
templates
/html/quizz_rating.html
View file @
edd6c9de
File moved
static
/html/quizz_yes-no-unsure.html
→
templates
/html/quizz_yes-no-unsure.html
View file @
edd6c9de
File moved
static
/html/tip.html
→
templates
/html/tip.html
View file @
edd6c9de
File moved
templates/001_pre_goal_brainstorm.xml
→
templates/
xml/
001_pre_goal_brainstorm.xml
View file @
edd6c9de
File moved
templates/002_getting_feedback.xml
→
templates/
xml/
002_getting_feedback.xml
View file @
edd6c9de
File moved
templates/003_reflecting_on_feedback.xml
→
templates/
xml/
003_reflecting_on_feedback.xml
View file @
edd6c9de
File moved
templates/004_deciding_on_your_improvement_goal.xml
→
templates/
xml/
004_deciding_on_your_improvement_goal.xml
View file @
edd6c9de
File moved
templates/005_checking_your_improvement_goal.xml
→
templates/
xml/
005_checking_your_improvement_goal.xml
View file @
edd6c9de
File moved
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