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
83ae2b7a
Commit
83ae2b7a
authored
Apr 16, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13 from open-craft/hotfixes-port
Five fixes from edx-release
parents
5acc98da
e0f7fad3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
20 deletions
+13
-20
problem_builder/mcq.py
+1
-3
problem_builder/mentoring.py
+0
-9
problem_builder/public/css/mentoring.css
+9
-4
problem_builder/public/js/mentoring_assessment_view.js
+2
-3
problem_builder/questionnaire.py
+1
-1
No files found.
problem_builder/mcq.py
View file @
83ae2b7a
...
...
@@ -141,9 +141,7 @@ class MCQBlock(SubmittingXBlockMixin, QuestionnaireAbstractBlock):
all_values
=
set
(
self
.
all_choice_values
)
correct
=
set
(
data
.
correct_choices
)
if
not
all_values
:
add_error
(
self
.
_
(
u"No choices set yet."
))
elif
not
correct
:
if
all_values
and
not
correct
:
add_error
(
self
.
_
(
u"You must indicate the correct answer[s], or the student will always get this question wrong."
)
)
...
...
problem_builder/mentoring.py
View file @
83ae2b7a
...
...
@@ -621,15 +621,6 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
html
+=
child
.
render
(
'mentoring_view'
,
{})
.
content
# TODO: frament_text_rewriting ?
return
html
def
clean_studio_edits
(
self
,
data
):
"""
Given POST data dictionary 'data', clean the data before validating it.
e.g. fix capitalization, remove trailing spaces, etc.
"""
if
data
.
get
(
'mode'
)
==
'assessment'
and
'max_attempts'
not
in
data
:
# assessment has a default of 2 max_attempts
data
[
'max_attempts'
]
=
2
def
validate
(
self
):
"""
Validates the state of this XBlock except for individual field values.
...
...
problem_builder/public/css/mentoring.css
View file @
83ae2b7a
...
...
@@ -42,12 +42,13 @@
font-style
:
italic
;
}
.mentoring
h4
{
margin-
bottom
:
2
0px
;
.mentoring
fieldset
{
margin-
top
:
1
0px
;
}
.mentoring
h4
{
margin-top
:
25px
;
.mentoring
h3
{
margin-top
:
0px
;
margin-bottom
:
7px
;
}
.mentoring
.submit
{
...
...
@@ -64,6 +65,10 @@
display
:
table
;
/* Enable line-wrapping in IE8 */
}
.mentoring
.choices
legend
.question
p
:last-child
{
/* Selector must be more specific than 'div.course-wrapper section.course-content p' */
margin-bottom
:
0
;
}
.mentoring
.attempts
{
margin-left
:
10px
;
display
:
inline-block
;
...
...
problem_builder/public/js/mentoring_assessment_view.js
View file @
83ae2b7a
...
...
@@ -56,10 +56,9 @@ function MentoringAssessmentView(runtime, element, mentoring) {
tryAgainDOM
.
show
();
var
attempts_data
=
$
(
'.attempts'
,
element
).
data
();
if
(
attempts_data
.
num_attempts
>=
attempts_data
.
max_attempts
)
{
if
(
attempts_data
.
max_attempts
>
0
&&
attempts_data
.
num_attempts
>=
attempts_data
.
max_attempts
)
{
tryAgainDOM
.
attr
(
"disabled"
,
"disabled"
);
}
else
{
}
else
{
tryAgainDOM
.
removeAttr
(
"disabled"
);
}
...
...
problem_builder/questionnaire.py
View file @
83ae2b7a
...
...
@@ -104,7 +104,7 @@ class QuestionnaireAbstractBlock(StudioEditableXBlockMixin, StudioContainerXBloc
template_path
=
'templates/html/{}.html'
.
format
(
name
.
lower
())
context
=
context
or
{}
context
=
context
.
copy
()
if
context
else
{}
context
[
'self'
]
=
self
context
[
'custom_choices'
]
=
self
.
custom_choices
context
[
'hide_header'
]
=
context
.
get
(
'hide_header'
,
False
)
or
not
self
.
show_title
...
...
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