Files
shcool/college/views/exam_import_wizard_views.xml
T
2026-08-27 19:53:56 +08:00

61 lines
2.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- ===================== 批量导入题库向导:表单 ===================== -->
<record id="yuthon_school_exam_import_wizard_view_form" model="ir.ui.view">
<field name="name">yuthon.school.exam.import.wizard.form</field>
<field name="model">yuthon.school.exam.import.wizard</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_title">
<h2>按章节批量导入题库</h2>
</div>
<group>
<group>
<field name="exam_id"/>
<field name="course_id"/>
<field name="import_all_course"/>
</group>
<group>
<field name="chapter_ids" widget="many2many_tags"
invisible="import_all_course"
options="{'no_create': True}"/>
<field name="question_type"/>
<field name="exclude_existing"/>
</group>
</group>
<div class="text-muted mb-2">
选择章节或勾选“导入整门课程题目”后,下方会自动列出匹配的题目;
取消勾选即可排除不需要导入的题目。
</div>
<field name="line_ids" options="{'no_create': True}">
<list editable="bottom">
<field name="selected"/>
<field name="sequence" widget="handle"/>
<field name="question_text_short" string="题干"/>
<field name="question_type"/>
<field name="chapter_id"/>
<field name="visibility"/>
<field name="score"/>
</list>
</field>
</sheet>
<footer>
<button name="action_confirm_import" type="object"
string="确认导入" class="oe_highlight"/>
<button special="cancel" string="取消" class="btn-secondary"/>
</footer>
</form>
</field>
</record>
<!-- ===================== 批量导入题库向导:动作 ===================== -->
<record id="action_yuthon_school_exam_import_wizard" model="ir.actions.act_window">
<field name="name">从题库批量导入题目</field>
<field name="res_model">yuthon.school.exam.import.wizard</field>
<field name="view_mode">form</field>
<field name="view_id" ref="yuthon_school_exam_import_wizard_view_form"/>
<field name="target">new</field>
</record>
</odoo>