@ranger-01
2016-12-12T19:49:55.000000Z
字数 5148
阅读 929
questionnaire
srs
教务员或者相关人员可以创建一个问卷调查,并收集调查结果。从而以此调查结果为依据,改进教学质量(调查问卷的创建,调查结果的查看,可以不再eeap平台上面)
教务员:
1. CRUD(创建,预览,编辑,删除)试题
1. CRUD(创建,预览,编辑,删除)调查问卷
2. 发布调查问卷
3. 查看调查问卷统计信息
被调查者:
1. 查看,填写调查问卷,并提交
创建调查问卷
问卷管理
中的某一个问卷,选择发布,则返回一个URL 填写调查问卷
问卷管理
中的某个问卷,选择“统计”,显示该问卷的统计信息 1. 只支持单选,多选,填空三种类型的题目
1. 生成一个固定连接,类容就是生成预览时生成的html网页
find a questionnaire django app, but can not make it run
QQ questionnaire use CKEditor, find a django-ckeditor
Field | Type | Introduction |
---|---|---|
ID | integer | Questionnaire id |
Name | char | Questionnaire name |
Desc | text | Questionnaire purpose |
Valid_num | integer | How many use submit the form |
q_ids | many-to-many to question table | |
pub_url | text | the html address of questionnaire puhlished |
com_url | text | the html address when respondent finish the questionnaire |
is_pub | integer | Form is published or not |
Field | Type | Introduction |
---|---|---|
ID | integer | Question id |
Type | Integer | Question type(single, multi, completion) |
is_Mandatory | Integer | Is mandatory or not (if this depend on questionnaire, this field should used in many-to-many through ) |
Desc | text | Question content |
c_ids | many-to-many to choice table | |
is_used | integer | the question has been used by questionnaire or not |
tags | many-to-many to tag table | |
owner | foreginKey to user |
Field | Type | Introduction |
---|---|---|
ID | integer | choice id |
text | char | desc of the tag |
Field | Type | Introduction |
---|---|---|
ID | integer | choice id |
value | integer | For choice content, default is the choice_id |
Desc | text | choice content |
is_used | integer | the question has been used by questionnaire or not |
Field | Type | Introduction |
---|---|---|
ID | integer | Answer id |
qn_id | questinnaire, ForeginKkey | |
q_id | question, ForeginKkey | |
c_id | choice, ForeginKkey | |
u_id | answer belong to, ForeginKkey |
Create, Update question
URL: /api/v1/questions/
Method: POST
Data: {
choices: [
{
id: 0, // used when update
desc: 'choice description',
value: none,
is_used: 0
},
],
q_id: 0, // used when update
type: 0,
is_mandatory: 0,
desc: 'question content',
is_used: 0,
tags: [
'tag1',
'tag2'
]
}
ret: {
status: 200
data: {
c_ids: [0, 1, 2],
q_id: 0,
type: 0,
is_mandatory: 0,
desc: 'question content',
is_used: 0,
tags: [0, 1],
owner: 0
}
}
{
status: 400,
data: {
msg: 'create question error'
}
}
----------------------------------------------------------------------------------------
Delete question
URL: /api/v1/questions/
Method: POST
Data: {
q_id: 0,
}
ret: {
status: 400/200,
data: {
msg: 'create question error / delete success'
}
}
----------------------------------------------------------------------------------------
Get question info
URL: /api/v1/questions/:qid/
Method: GET
ret: {
status: 200
data: {
c_ids: [0, 1, 2],
q_id: 0,
type: 0,
is_mandatory: 0,
desc: 'question content',
is_used: 0,
tags: [0, 1],
owner: 0
}
}
{
status: 400,
data: {
msg: 'get question info error'
}
}
----------------------------------------------------------------------------------------
Get question list
URL: /api/v1/questions/
Method: GET
ret: {
status: 200
data: {
q_ids: [0, 1, 2],
}
}
{
status: 400,
data: {
msg: 'get questions error'
}
}
Create, Update
URL: /api/v1/questionnaires/
Method: POST
Data: {
id: 0, // used when update
q_ids: [0, 1, 2],
name: 'questionnaire-1',
desc: 'why i create this questionnaire',
valid_num: 0,
is_pub: 0
}
ret: {
status: 200
data: {
id: 0, // used when update
q_ids: [0, 1, 2],
name: 'questionnaire-1',
desc: 'why i create this questionnaire',
valid_num: 0,
is_pub: 0
pub_url: 'http:xxxxxxxx',
pub_url: 'http:xxxxxxxx'
}
}
{
status: 400,
data: {
msg: 'create questionnaire error'
}
}
----------------------------------------------------------------------------------------
Delete
URL: /api/v1/questionnaires/
Method: POST
Data: {
qn_id: 0,
}
ret: {
status: 400/200,
data: {
msg: 'create question error / delete success'
}
}
----------------------------------------------------------------------------------------
Get questionnaires info
URL: /api/v1/questionnaires/:qnid/
Method: GET
ret: {
status: 200
data: {
id: 0, // used when update
q_ids: [0, 1, 2],
name: 'questionnaire-1',
desc: 'why i create this questionnaire',
valid_num: 0,
is_pub: 0
pub_url: 'http:xxxxxxxx',
pub_url: 'http:xxxxxxxx'
}
}
{
status: 400,
data: {
msg: 'get question info error'
}
}
----------------------------------------------------------------------------------------
Get questionnaires list
URL: /api/v1/questionnaires/
Method: GET
ret: {
status: 200
data: {
qn_ids: [0, 1, 2],
}
}
{
status: 400,
data: {
msg: 'get questionnaires error'
}
}
submit questionnaire
URL: /api/v1/answers/
Method: POST
Data: {
qn_id: 0,
owner: 0,
answers: [
{
q_id: 0,
q_type: 0,
c_id: [0, 1],
text: 'this is just for completion'
},
]
}
ret: {
status: 200
data: {
msg: 'submit success'
}
}
{
status: 400,
data: {
msg: 'get questionnaires error'
}
}
report of questionnaire
URL: /api/v1/report/:qn_id/
Method: GET
ret: {
status: 200
data: {
answers: [
{
q_id: 0,
a_ids: [0, 1, 2]
}
]
}
}
{
status: 400,
data: {
msg: 'get questionnaires error'
}
}