TNCSC_Odoo/addons/community_school/views/school_assignment_views.xml
selvi 40f4b9dc81
Some checks failed
CI / Brand-leak check (push) Has been cancelled
CI / flake8 / pylint-odoo / manifest completeness (push) Has been cancelled
CI / Install all modules with --test-enable (push) Has been cancelled
assignment submission updated
2026-10-06 20:36:21 +05:30

156 lines
7.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ── Assignment list view ── -->
<record id="view_school_assignment_list" model="ir.ui.view">
<field name="name">community.school.assignment.list</field>
<field name="model">community.school.assignment</field>
<field name="arch" type="xml">
<list string="Assignments">
<field name="name"/>
<field name="class_id"/>
<field name="teacher_id"/>
<field name="due_date"/>
<field name="max_score"/>
<field name="submission_count" string="Submissions"/>
<field name="state" widget="badge"/>
</list>
</field>
</record>
<!-- ── Assignment form view ── -->
<record id="view_school_assignment_form" model="ir.ui.view">
<field name="name">community.school.assignment.form</field>
<field name="model">community.school.assignment</field>
<field name="arch" type="xml">
<form string="Assignment">
<header>
<button name="action_publish" string="Publish" type="object"
class="btn-primary" invisible="state != 'draft'"/>
<button name="action_close" string="Close" type="object"
invisible="state != 'published'"/>
<button name="action_reset_draft" string="Reset to Draft" type="object"
invisible="state == 'draft'"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,published,closed"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_view_submissions" type="object"
class="oe_stat_button" icon="fa-upload">
<field name="submission_count" widget="statinfo" string="Submissions"/>
</button>
</div>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" placeholder="Assignment Title…"/></h1>
</div>
<group>
<group>
<field name="class_id"/>
<field name="teacher_id" readonly="1"/>
<field name="term_id" readonly="1"/>
</group>
<group>
<field name="due_date"/>
<field name="max_score"/>
</group>
</group>
<notebook>
<page string="Instructions" name="description">
<field name="description" widget="html" options="{'collaborative': True}"/>
</page>
<page string="Submissions" name="submissions">
<field name="submission_ids" mode="list" readonly="1">
<list>
<field name="student_id"/>
<field name="submitted_on"/>
<field name="is_late" string="Late?"/>
<field name="attachment_name" string="File"/>
<field name="score"/>
<field name="state" widget="badge"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="action_school_assignment" model="ir.actions.act_window">
<field name="name">Assignments</field>
<field name="res_model">community.school.assignment</field>
<field name="view_mode">list,form</field>
</record>
<!-- ── Submission list view ── -->
<record id="view_school_submission_list" model="ir.ui.view">
<field name="name">community.school.submission.list</field>
<field name="model">community.school.submission</field>
<field name="arch" type="xml">
<list string="Submissions">
<field name="assignment_id"/>
<field name="student_id"/>
<field name="class_id"/>
<field name="submitted_on"/>
<field name="is_late" string="Late?"/>
<field name="attachment_name" string="File"/>
<field name="score"/>
<field name="state" widget="badge"/>
</list>
</field>
</record>
<!-- ── Submission form view ── -->
<record id="view_school_submission_form" model="ir.ui.view">
<field name="name">community.school.submission.form</field>
<field name="model">community.school.submission</field>
<field name="arch" type="xml">
<form string="Submission">
<header>
<button name="action_grade" string="Mark as Graded" type="object"
class="btn-primary" invisible="state == 'graded'"/>
<field name="state" widget="statusbar" statusbar_visible="submitted,graded"/>
</header>
<sheet>
<group>
<group string="Assignment">
<field name="assignment_id"/>
<field name="class_id" readonly="1"/>
</group>
<group string="Student">
<field name="student_id"/>
<field name="enrollment_id"/>
</group>
</group>
<group>
<group string="Submission">
<field name="submitted_on"/>
<field name="is_late" readonly="1"/>
<field name="attachment_name" string="File Name" readonly="1"/>
<field name="attachment_data" string="File" widget="binary"
filename="attachment_name"/>
</group>
<group string="Grading">
<field name="score"/>
<field name="feedback"/>
</group>
</group>
<group string="Student Notes">
<field name="notes" nolabel="1"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_school_submission" model="ir.actions.act_window">
<field name="name">Submissions</field>
<field name="res_model">community.school.submission</field>
<field name="view_mode">list,form</field>
</record>
</odoo>