576 lines
32 KiB
XML
576 lines
32 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<!-- ============================================================
|
|
考试模块视图:题库 / 考试发布 / 答卷 / 答题记录
|
|
============================================================ -->
|
|
|
|
<!-- ===================== 题库:列表 ===================== -->
|
|
<record id="yuthon_school_exam_question_view_tree" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.question.tree</field>
|
|
<field name="model">yuthon.school.exam.question</field>
|
|
<field name="arch" type="xml">
|
|
<list>
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="question_text_short" string="题干"/>
|
|
<field name="question_type"/>
|
|
<field name="difficulty"/>
|
|
<field name="course_id"/>
|
|
<field name="chapter_id" optional="show"/>
|
|
<field name="score"/>
|
|
<field name="teacher_id" optional="hide"/>
|
|
<field name="visibility" optional="show"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 题库:表单 ===================== -->
|
|
<record id="yuthon_school_exam_question_view_form" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.question.form</field>
|
|
<field name="model">yuthon.school.exam.question</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="question_type"/>
|
|
<field name="difficulty"/>
|
|
<field name="score"/>
|
|
<field name="visibility"/>
|
|
</group>
|
|
<group>
|
|
<field name="course_id"/>
|
|
<field name="chapter_id"/>
|
|
<field name="teacher_id" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<field name="question_text" widget="html" string="题干"/>
|
|
<notebook>
|
|
<page string="选项" name="options"
|
|
invisible="question_type not in ('single_choice','multiple_choice')">
|
|
<field name="option_ids">
|
|
<list editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="label"/>
|
|
<field name="content"/>
|
|
<field name="is_correct" string="正确答案"/>
|
|
</list>
|
|
</field>
|
|
<div class="text-muted mt-2">
|
|
单选题请只勾选一个正确答案;多选题可勾选多个正确答案。
|
|
</div>
|
|
</page>
|
|
<page string="答案与解析" name="answer">
|
|
<group>
|
|
<field name="correct_answer"
|
|
invisible="question_type not in ('true_false','fill_blank')"
|
|
required="question_type in ('true_false','fill_blank')"/>
|
|
<field name="reference_answer" widget="html"
|
|
invisible="question_type != 'essay'"/>
|
|
</group>
|
|
<field name="explanation" widget="html" string="答案说明 / 解析" nolabel="1"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 题库:搜索 ===================== -->
|
|
<record id="yuthon_school_exam_question_view_search" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.question.search</field>
|
|
<field name="model">yuthon.school.exam.question</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<field name="question_text"/>
|
|
<field name="course_id"/>
|
|
<field name="chapter_id"/>
|
|
<filter name="mine" string="我的题目" domain="[('teacher_id','=',uid)]"/>
|
|
<filter name="public" string="公开题库" domain="[('visibility','=','public')]"/>
|
|
<filter name="private" string="私有题库" domain="[('visibility','=','private')]"/>
|
|
<filter name="single_choice" string="单选题" domain="[('question_type','=','single_choice')]"/>
|
|
<filter name="multiple_choice" string="多选题" domain="[('question_type','=','multiple_choice')]"/>
|
|
<filter name="true_false" string="判断题" domain="[('question_type','=','true_false')]"/>
|
|
<filter name="fill_blank" string="填空题" domain="[('question_type','=','fill_blank')]"/>
|
|
<filter name="essay" string="简答题" domain="[('question_type','=','essay')]"/>
|
|
<group expand="0" string="分组">
|
|
<filter name="group_chapter" string="按章节" context="{'group_by':'chapter_id'}"/>
|
|
<filter name="group_course" string="按课程" context="{'group_by':'course_id'}"/>
|
|
<filter name="group_type" string="按题型" context="{'group_by':'question_type'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 考试发布:列表 ===================== -->
|
|
<record id="yuthon_school_exam_view_tree" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.tree</field>
|
|
<field name="model">yuthon.school.exam</field>
|
|
<field name="arch" type="xml">
|
|
<list decoration-info="state == 'published'" decoration-muted="state == 'closed'">
|
|
<field name="name"/>
|
|
<field name="course_id"/>
|
|
<field name="start_time"/>
|
|
<field name="end_time"/>
|
|
<field name="duration_minutes"/>
|
|
<field name="total_score"/>
|
|
<field name="state" widget="badge"
|
|
decoration-success="state == 'published'"
|
|
decoration-muted="state == 'closed'"
|
|
decoration-warning="state == 'draft'"/>
|
|
<field name="teacher_id" optional="hide"/>
|
|
<field name="supervisor_teacher_ids" widget="many2many_tags" string="监督老师" optional="hide"/>
|
|
<field name="paper_count" string="答卷"/>
|
|
<field name="submitted_count" string="已交"/>
|
|
<field name="graded_count" string="已阅"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 考试发布:表单 ===================== -->
|
|
<record id="yuthon_school_exam_view_form" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.form</field>
|
|
<field name="model">yuthon.school.exam</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="action_import_from_question_bank" type="object"
|
|
string="按章节批量导入"
|
|
class="btn-secondary" invisible="state != 'draft'"/>
|
|
<button name="action_publish" type="object" string="发布考试"
|
|
class="oe_highlight" invisible="state != 'draft'"/>
|
|
<button name="action_close" type="object" string="截止考试"
|
|
invisible="state != 'published'"/>
|
|
<button name="action_reopen" type="object" string="重新开放"
|
|
invisible="state != 'closed'"/>
|
|
<button name="action_draft" type="object" string="撤回草稿"
|
|
invisible="state != 'draft' and state != 'published'"
|
|
confirm="撤回草稿将删除已生成的待考答卷,是否继续?"/>
|
|
<field name="state" widget="statusbar" statusbar_visible="draft,published,closed"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="name" placeholder="考试名称"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="course_id"/>
|
|
<field name="chapter_ids" widget="many2many_tags"/>
|
|
<field name="teacher_id" readonly="1"/>
|
|
<field name="supervisor_teacher_ids" widget="many2many_tags"
|
|
options="{'no_create': True}"/>
|
|
</group>
|
|
<group>
|
|
<field name="start_time"/>
|
|
<field name="end_time"/>
|
|
<field name="duration_minutes"/>
|
|
<field name="pass_score"/>
|
|
<field name="total_score" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<field name="description" widget="html" string="考试说明"/>
|
|
<notebook>
|
|
<page string="试卷题目" name="lines">
|
|
<field name="line_ids">
|
|
<list editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="question_id"/>
|
|
<field name="question_type" readonly="1"/>
|
|
<field name="score"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
<page string="答卷" name="papers">
|
|
<field name="paper_ids" readonly="1"
|
|
options="{'no_create': True, 'no_delete': True}"
|
|
context="{'tree_view_ref': 'college.yuthon_school_exam_paper_view_tree_teacher'}">
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 考试发布:搜索 ===================== -->
|
|
<record id="yuthon_school_exam_view_search" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.search</field>
|
|
<field name="model">yuthon.school.exam</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<field name="course_id"/>
|
|
<filter name="mine" string="我发布的" domain="[('teacher_id','=',uid)]"/>
|
|
<filter name="supervised" string="我监督的" domain="[('supervisor_teacher_ids','in',[uid])]"/>
|
|
<filter name="published" string="已发布" domain="[('state','=','published')]"/>
|
|
<filter name="closed" string="已截止" domain="[('state','=','closed')]"/>
|
|
<filter name="draft" string="草稿" domain="[('state','=','draft')]"/>
|
|
<group expand="0" string="分组">
|
|
<filter name="group_course" string="按课程" context="{'group_by':'course_id'}"/>
|
|
<filter name="group_state" string="按状态" context="{'group_by':'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答卷:列表 ===================== -->
|
|
<record id="yuthon_school_exam_paper_view_tree" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.paper.tree</field>
|
|
<field name="model">yuthon.school.exam.paper</field>
|
|
<field name="arch" type="xml">
|
|
<list decoration-success="is_passed == True" decoration-danger="is_passed == False">
|
|
<header>
|
|
<button name="action_download_report" type="object" string="批量下载" icon="fa-download"
|
|
class="btn-secondary"
|
|
groups="college.group_student"/>
|
|
</header>
|
|
<field name="exam_id" string="考试名称"/>
|
|
<field name="course_id" string="所属课程" optional="show"/>
|
|
<field name="chapter_ids" widget="many2many_tags" string="关联章节" optional="show"/>
|
|
<field name="state" widget="badge"/>
|
|
<field name="score"/>
|
|
<field name="total_score"/>
|
|
<field name="is_passed"/>
|
|
<field name="submit_time" optional="show"/>
|
|
<button name="action_open_take_page" type="object" string="开始考试" icon="fa-play"
|
|
class="btn-primary" invisible="state != 'pending'"/>
|
|
<button name="action_open_take_page" type="object" string="继续考试" icon="fa-play-circle"
|
|
class="btn-info" invisible="state != 'in_progress'"/>
|
|
<button name="action_open_result_view_page" type="object" string="查看" icon="fa-eye"
|
|
class="btn-primary" invisible="state != 'graded'"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答卷:老师评阅列表(只显示待评阅) ===================== -->
|
|
<record id="yuthon_school_exam_paper_view_tree_teacher" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.paper.tree.teacher</field>
|
|
<field name="model">yuthon.school.exam.paper</field>
|
|
<field name="arch" type="xml">
|
|
<list decoration-success="is_passed == True" decoration-danger="is_passed == False">
|
|
<field name="name" string="答卷标题"/>
|
|
<field name="student_id"/>
|
|
<field name="state" widget="badge"/>
|
|
<field name="score"/>
|
|
<field name="total_score"/>
|
|
<field name="is_passed"/>
|
|
<field name="submit_time" optional="show"/>
|
|
<button name="action_open_review_page" type="object" string="评阅" icon="fa-pencil-square-o"
|
|
class="btn-primary" invisible="state != 'submitted'"
|
|
groups="college.group_teacher,base.group_system"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答卷:考试结果列表(只显示已评阅) ===================== -->
|
|
<record id="yuthon_school_exam_paper_view_tree_result" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.paper.tree.result</field>
|
|
<field name="model">yuthon.school.exam.paper</field>
|
|
<field name="arch" type="xml">
|
|
<list decoration-success="is_passed == True" decoration-danger="is_passed == False">
|
|
<header>
|
|
<button name="action_download_report" type="object" string="下载" icon="fa-download"
|
|
class="btn-secondary"
|
|
groups="college.group_teacher,base.group_system"/>
|
|
</header>
|
|
<field name="name" string="答卷标题"/>
|
|
<field name="student_id"/>
|
|
<field name="state" widget="badge"/>
|
|
<field name="score"/>
|
|
<field name="total_score"/>
|
|
<field name="is_passed"/>
|
|
<field name="submit_time" optional="show"/>
|
|
<button name="action_open_result_view_page" type="object" string="查看" icon="fa-eye"
|
|
class="btn-primary" invisible="state != 'graded'"
|
|
groups="college.group_teacher,base.group_system"/>
|
|
<button name="action_open_review_page" type="object" string="修改" icon="fa-pencil-square-o"
|
|
class="btn-warning" invisible="state != 'graded'"
|
|
groups="college.group_teacher,base.group_system"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答卷:老师评阅表单 ===================== -->
|
|
<record id="yuthon_school_exam_paper_form" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.paper.form.teacher</field>
|
|
<field name="model">yuthon.school.exam.paper</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="action_open_review_page" type="object" string="进入评阅页"
|
|
class="oe_highlight" invisible="state != 'submitted'"/>
|
|
<button name="action_open_result_view_page" type="object" string="查看评阅结果"
|
|
class="oe_highlight" invisible="state != 'graded'"/>
|
|
<button name="action_open_review_page" type="object" string="修改评阅"
|
|
class="btn-warning" invisible="state != 'graded'"/>
|
|
<button name="action_save_grade" type="object" string="保存评分"
|
|
class="btn-secondary" invisible="state not in ('submitted','graded')"/>
|
|
<button name="action_download_report" type="object" string="下载试卷"
|
|
class="btn-secondary" invisible="state not in ('submitted','graded')"/>
|
|
<field name="state" widget="statusbar" statusbar_visible="pending,in_progress,submitted,graded"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="exam_id" string="考试名称" readonly="1"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="course_id" string="所属课程" readonly="1"/>
|
|
<field name="chapter_ids" widget="many2many_tags" string="关联章节" readonly="1"/>
|
|
<field name="student_id" readonly="1"/>
|
|
<field name="start_time" readonly="1"/>
|
|
<field name="submit_time" readonly="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="score" readonly="1"/>
|
|
<field name="total_score" readonly="1"/>
|
|
<field name="pass_score" readonly="1"/>
|
|
<field name="is_passed" readonly="1"/>
|
|
</group>
|
|
</group>
|
|
<field name="answer_ids" readonly="0" mode="list">
|
|
<list editable="bottom">
|
|
<field name="sequence" invisible="1" readonly="1"/>
|
|
<field name="question_text_short" string="题干" readonly="1"/>
|
|
<field name="question_type" readonly="1"/>
|
|
<field name="answer_display" string="学生作答" readonly="1"/>
|
|
<field name="score" groups="college.group_teacher,base.group_system"/>
|
|
<field name="teacher_comment" widget="text" string="评语"
|
|
groups="college.group_teacher,base.group_system"/>
|
|
<field name="max_score" readonly="1"/>
|
|
<field name="is_correct" readonly="1"/>
|
|
<button name="action_view_answer_form" type="object" string="详情" icon="fa-eye"
|
|
groups="college.group_teacher,base.group_system"/>
|
|
</list>
|
|
</field>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答卷:学生考试表单 ===================== -->
|
|
<record id="yuthon_school_exam_paper_form_student" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.paper.form.student</field>
|
|
<field name="model">yuthon.school.exam.paper</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="action_open_take_page" type="object" string="开始考试"
|
|
class="oe_highlight" invisible="state != 'pending'"/>
|
|
<button name="action_submit" type="object" string="提交答卷"
|
|
class="oe_highlight" invisible="state != 'in_progress'"
|
|
confirm="提交后不能再修改,是否继续?"/>
|
|
<button name="action_open_result_view_page" type="object" string="查看评阅结果"
|
|
class="oe_highlight" invisible="state != 'graded'"/>
|
|
<button name="action_download_report" type="object" string="下载试卷"
|
|
class="btn-secondary" invisible="state != 'graded'"/>
|
|
<field name="state" widget="statusbar" statusbar_visible="pending,in_progress,submitted,graded"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="name" string="考试/学员" readonly="1"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="exam_id" string="考试名称" readonly="1"/>
|
|
<field name="course_id" string="所属课程" readonly="1"/>
|
|
<field name="chapter_ids" widget="many2many_tags" string="关联章节" readonly="1"/>
|
|
<field name="student_id" readonly="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="total_score" readonly="1"/>
|
|
<field name="pass_score" readonly="1"/>
|
|
<field name="score" readonly="1" invisible="state == 'in_progress'"/>
|
|
<field name="is_passed" readonly="1" invisible="state == 'in_progress'"/>
|
|
</group>
|
|
</group>
|
|
<field name="description" widget="html" string="考试说明" readonly="1" nolabel="1"/>
|
|
<separator string="试卷题目" invisible="state == 'pending'"/>
|
|
<field name="answer_ids" readonly="0" mode="list"
|
|
invisible="state in ('pending',)">
|
|
<list>
|
|
<field name="sequence" invisible="1"/>
|
|
<field name="question_text_short" string="题干"/>
|
|
<field name="question_type"/>
|
|
<field name="answer_display" string="我的作答"/>
|
|
<field name="score" readonly="1"/>
|
|
<field name="max_score" readonly="1"/>
|
|
<button name="action_view_answer_form" type="object" string="作答" icon="fa-pencil"
|
|
invisible="parent.state not in ('in_progress',)"/>
|
|
</list>
|
|
</field>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答卷:搜索 ===================== -->
|
|
<record id="yuthon_school_exam_paper_view_search" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.paper.search</field>
|
|
<field name="model">yuthon.school.exam.paper</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<field name="exam_id"/>
|
|
<field name="student_id"/>
|
|
<filter name="submitted" string="待评阅" domain="[('state','=','submitted')]"/>
|
|
<filter name="graded" string="已评阅" domain="[('state','=','graded')]"/>
|
|
<filter name="mine" string="我的答卷" domain="[('user_id','=',uid)]"/>
|
|
<group expand="0" string="分组">
|
|
<filter name="group_exam" string="按考试" context="{'group_by':'exam_id'}"/>
|
|
<filter name="group_state" string="按状态" context="{'group_by':'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答题记录:表单(作答/评阅弹窗) ===================== -->
|
|
<record id="yuthon_school_exam_answer_view_form" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.answer.form</field>
|
|
<field name="model">yuthon.school.exam.answer</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<group>
|
|
<field name="question_type" readonly="1"/>
|
|
<field name="max_score" readonly="1"/>
|
|
<field name="is_correct" readonly="1"/>
|
|
</group>
|
|
<field name="question_text" widget="html" readonly="1" string="题干" nolabel="1"/>
|
|
<separator string="学生作答"/>
|
|
<group>
|
|
<field name="selected_option_id" string="选择答案"
|
|
invisible="question_type != 'single_choice'"
|
|
required="question_type == 'single_choice'"/>
|
|
<field name="selected_option_ids" widget="many2many_checkboxes" string="选择答案"
|
|
invisible="question_type != 'multiple_choice'"
|
|
required="question_type == 'multiple_choice'"/>
|
|
<field name="answer_choice" string="判断"
|
|
invisible="question_type != 'true_false'"
|
|
required="question_type == 'true_false'"/>
|
|
<field name="answer_text" string="作答"
|
|
invisible="question_type not in ('fill_blank','essay')"
|
|
required="question_type in ('fill_blank','essay')"/>
|
|
</group>
|
|
<separator string="评阅" groups="college.group_teacher,base.group_system"/>
|
|
<group groups="college.group_teacher,base.group_system">
|
|
<field name="score" string="得分"/>
|
|
<field name="teacher_comment" string="评语"/>
|
|
</group>
|
|
<separator string="答案说明"/>
|
|
<field name="explanation" widget="html" readonly="1" string="解析" nolabel="1"/>
|
|
<field name="reference_answer" widget="html" readonly="1" string="参考答案" nolabel="1"
|
|
invisible="question_type != 'essay'"/>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答题记录:老师评阅列表 ===================== -->
|
|
<record id="yuthon_school_exam_answer_view_tree_grade" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.answer.tree.grade</field>
|
|
<field name="model">yuthon.school.exam.answer</field>
|
|
<field name="arch" type="xml">
|
|
<list editable="bottom">
|
|
<field name="paper_id" readonly="1"/>
|
|
<field name="question_text_short" string="题干"/>
|
|
<field name="question_type"/>
|
|
<field name="answer_display" string="学生作答"/>
|
|
<field name="score"/>
|
|
<field name="max_score"/>
|
|
<field name="is_correct"/>
|
|
<field name="teacher_comment"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 答题记录:搜索 ===================== -->
|
|
<record id="yuthon_school_exam_answer_view_search" model="ir.ui.view">
|
|
<field name="name">yuthon.school.exam.answer.search</field>
|
|
<field name="model">yuthon.school.exam.answer</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="paper_id"/>
|
|
<field name="question_id"/>
|
|
<filter name="submitted" string="待评阅" domain="[('paper_id.state','=','submitted')]"/>
|
|
<filter name="essay" string="简答题" domain="[('question_type','=','essay')]"/>
|
|
<group expand="0" string="分组">
|
|
<filter name="group_paper" string="按答卷" context="{'group_by':'paper_id'}"/>
|
|
<filter name="group_type" string="按题型" context="{'group_by':'question_type'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===================== 动作 ===================== -->
|
|
<record id="action_yuthon_school_exam_question" model="ir.actions.act_window">
|
|
<field name="name">题库</field>
|
|
<field name="res_model">yuthon.school.exam.question</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="search_view_id" ref="yuthon_school_exam_question_view_search"/>
|
|
<field name="context">{'search_default_group_chapter': 1}</field>
|
|
</record>
|
|
|
|
<record id="action_yuthon_school_exam" model="ir.actions.act_window">
|
|
<field name="name">考试管理</field>
|
|
<field name="res_model">yuthon.school.exam</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="search_view_id" ref="yuthon_school_exam_view_search"/>
|
|
<field name="context">{'search_default_mine': 1}</field>
|
|
</record>
|
|
|
|
<record id="action_yuthon_school_exam_paper_grade" model="ir.actions.act_window">
|
|
<field name="name">评阅试卷</field>
|
|
<field name="res_model">yuthon.school.exam.paper</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="view_id" ref="yuthon_school_exam_paper_view_tree_teacher"/>
|
|
<field name="view_ids" eval="[
|
|
(5, 0, 0),
|
|
(0, 0, {'view_mode': 'list', 'view_id': ref('yuthon_school_exam_paper_view_tree_teacher')}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_school_exam_paper_form')}),
|
|
]"/>
|
|
<field name="search_view_id" ref="yuthon_school_exam_paper_view_search"/>
|
|
<field name="domain">[('state','=','submitted')]</field>
|
|
</record>
|
|
|
|
<record id="action_yuthon_school_exam_paper_student" model="ir.actions.act_window">
|
|
<field name="name">我的考试</field>
|
|
<field name="res_model">yuthon.school.exam.paper</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="view_id" ref="yuthon_school_exam_paper_view_tree"/>
|
|
<field name="view_ids" eval="[
|
|
(5, 0, 0),
|
|
(0, 0, {'view_mode': 'list', 'view_id': ref('yuthon_school_exam_paper_view_tree')}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_school_exam_paper_form_student')}),
|
|
]"/>
|
|
<field name="search_view_id" ref="yuthon_school_exam_paper_view_search"/>
|
|
<field name="domain">[('user_id','=',uid)]</field>
|
|
<field name="context">{'search_default_mine': 1}</field>
|
|
</record>
|
|
|
|
<record id="action_yuthon_school_exam_result" model="ir.actions.act_window">
|
|
<field name="name">考试结果</field>
|
|
<field name="res_model">yuthon.school.exam.paper</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="view_id" ref="yuthon_school_exam_paper_view_tree_result"/>
|
|
<field name="view_ids" eval="[
|
|
(5, 0, 0),
|
|
(0, 0, {'view_mode': 'list', 'view_id': ref('yuthon_school_exam_paper_view_tree_result')}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_school_exam_paper_form')}),
|
|
]"/>
|
|
<field name="search_view_id" ref="yuthon_school_exam_paper_view_search"/>
|
|
<field name="domain">[('state','=','graded')]</field>
|
|
</record>
|
|
|
|
<record id="action_yuthon_school_exam_answer_grade" model="ir.actions.act_window">
|
|
<field name="name">逐题评阅</field>
|
|
<field name="res_model">yuthon.school.exam.answer</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="view_id" ref="yuthon_school_exam_answer_view_tree_grade"/>
|
|
<field name="search_view_id" ref="yuthon_school_exam_answer_view_search"/>
|
|
<field name="domain">[('paper_id.state','=','submitted')]</field>
|
|
</record>
|
|
|
|
</odoo> |