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
405b6014
Commit
405b6014
authored
Nov 26, 2013
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add additional comments on MentoringBlock, QuizzBlock & Answer model
parent
edd6c9de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
mentoring/mentoring.py
+0
-1
mentoring/models.py
+5
-0
mentoring/quizz.py
+6
-2
No files found.
mentoring/mentoring.py
View file @
405b6014
# -*- coding: utf-8 -*-
# Imports ###########################################################
import
logging
...
...
mentoring/models.py
View file @
405b6014
from
django.db
import
models
class
Answer
(
models
.
Model
):
"""
Django model used to store AnswerBlock data that need to be shared
and queried accross XBlock instances (workaround).
"""
class
Meta
:
app_label
=
'mentoring'
unique_together
=
((
'student_id'
,
'name'
),)
...
...
mentoring/quizz.py
View file @
405b6014
...
...
@@ -36,16 +36,20 @@ def commas_to_list(commas_str):
class
QuizzBlock
(
XBlock
):
"""
TODO: Description
An XBlock used to ask multiple-choice questions
Must be a child of a MentoringBlock. Allow to display a tip/advice depending on the
values entered by the student, and supports multiple types of multiple-choice
set, with preset choices and author-defined values.
"""
question
=
String
(
help
=
"Question to ask the student"
,
scope
=
Scope
.
content
,
default
=
""
)
type
=
String
(
help
=
"Type of quizz"
,
scope
=
Scope
.
content
,
default
=
"yes-no-unsure"
)
student_choice
=
String
(
help
=
"Last input submitted by the student"
,
default
=
""
,
scope
=
Scope
.
user_state
)
low
=
String
(
help
=
"Label for low ratings"
,
scope
=
Scope
.
content
,
default
=
"Less"
)
high
=
String
(
help
=
"Label for high ratings"
,
scope
=
Scope
.
content
,
default
=
"More"
)
tip
=
String
(
help
=
"Mentoring tip to provide if needed"
,
scope
=
Scope
.
content
,
default
=
""
)
display
=
List
(
help
=
"List of choices to display the tip for"
,
scope
=
Scope
.
content
,
default
=
None
)
reject
=
List
(
help
=
"List of choices to reject"
,
scope
=
Scope
.
content
,
default
=
None
)
student_choice
=
String
(
help
=
"Last input submitted by the student"
,
default
=
""
,
scope
=
Scope
.
user_state
)
@classmethod
def
parse_xml
(
cls
,
node
,
runtime
,
keys
):
...
...
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