Skip to content

Commit 4a63844

Browse files
Siddharth Kanojiyaparthivgls
authored andcommitted
Add unique constraint and update index pages for modules: 10.0 (openeducat#122)
* [ADD] Add support links in index pages * [IMP] code unique constraints and other changes * [IMP] update test case for build fix * [IMP] check for session conflict for faculty with alrady created lectures
1 parent 182cc81 commit 4a63844

File tree

42 files changed

+250
-286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+250
-286
lines changed

openeducat_activity/static/description/index.html

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,14 @@ <h2 class="oe_slogan">Student Activity</h2>
3636
</div>
3737
</section>
3838

39-
<section class="jumbotron"
40-
style="color: white; background-color: #606061;">
41-
<div class="container">
42-
<div class="row">
43-
<div class="col-md-9">
44-
<p class="mt16">
45-
<strong>Need help or just looking for more information on OpenEduCat ?
46-
We are ready and waiting for your questions.</strong>
47-
</p>
48-
</div>
49-
<div class="col-md-3">
50-
<a class="btn btn-primary btn-lg pull-right mt8"
51-
style="color: #FFFFFF !important;"
52-
href="https://www.openeducat.org/page/website.contactus"><i
53-
class="fa fa-arrow-right"></i> Contact Us Now </a>
54-
</div>
55-
</div>
39+
<section class="oe_container">
40+
<div class="oe_mt16 oe_mb16">
41+
<h2 class="oe_slogan">Need Any Help?</h2>
42+
</div>
43+
<div class="oe_slogan">
44+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="mailto:[email protected]"><i class="fa fa-envelope"></i> Email </a>
45+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="https://www.openeducat.org/page/contactus"><i class="fa fa-phone"></i> Contact Us </a>
46+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="https://www.openeducat.org/page/contactus"><i class="fa fa-check-square"></i> Request Customization </a>
47+
<a class="mt8 btn btn-primary btn-lg" style="color: #FFFFFF !important;margin-right: 7px;" href="https://www.openeducat.org/page/return-and-refund-policy"><i class="fa fa-share-square" style=""></i> Returns and Refunds Policy</a>
5648
</div>
5749
</section>

openeducat_admission/models/admission.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def onchange_student(self):
130130
self.street2 = student.street2 or False
131131
self.phone = student.phone or False
132132
self.mobile = student.mobile or False
133+
self.email = student.email or False
133134
self.zip = student.zip or False
134135
self.city = student.city or False
135136
self.country_id = student.country_id and \

openeducat_admission/static/description/index.html

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,14 @@ <h2 class="oe_slogan">Time Period based Report</h2>
8585
</div>
8686
</section>
8787

88-
<section class="jumbotron"
89-
style="color: white; background-color: #606061;">
90-
<div class="container">
91-
<div class="row">
92-
<div class="col-md-9">
93-
<p class="mt16">
94-
<strong>Need help or just looking for more information on OpenEduCat ?
95-
We are ready and waiting for your questions.</strong>
96-
</p>
97-
</div>
98-
<div class="col-md-3">
99-
<a class="btn btn-primary btn-lg pull-right mt8"
100-
style="color: #FFFFFF !important;"
101-
href="https://www.openeducat.org/page/website.contactus"><i
102-
class="fa fa-arrow-right"></i> Contact Us Now </a>
103-
</div>
104-
</div>
88+
<section class="oe_container">
89+
<div class="oe_mt16 oe_mb16">
90+
<h2 class="oe_slogan">Need Any Help?</h2>
91+
</div>
92+
<div class="oe_slogan">
93+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="mailto:[email protected]"><i class="fa fa-envelope"></i> Email </a>
94+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="https://www.openeducat.org/page/contactus"><i class="fa fa-phone"></i> Contact Us </a>
95+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="https://www.openeducat.org/page/contactus"><i class="fa fa-check-square"></i> Request Customization </a>
96+
<a class="mt8 btn btn-primary btn-lg" style="color: #FFFFFF !important;margin-right: 7px;" href="https://www.openeducat.org/page/return-and-refund-policy"><i class="fa fa-share-square" style=""></i> Returns and Refunds Policy</a>
10597
</div>
10698
</section>

openeducat_admission/test/batch_course_fees.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
-
4747
!record {model: op.batch, id: batch_test}:
4848
name: 'BOA-S1'
49-
code: 'boas1'
49+
code: 'boas1t'
5050
course_id: course_test
5151
start_date: !eval str(int(time.strftime('%Y')) - 1) +'-06-02'
5252
end_date: !eval str(int(time.strftime('%Y')) + 2) +'-06-02'

openeducat_assignment/models/assignment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class OpAssignment(models.Model):
3838
required=True)
3939
assignment_type_id = fields.Many2one(
4040
'op.assignment.type', 'Assignment Type', required=True)
41-
marks = fields.Float('Marks', track_visibility='onchange')
41+
marks = fields.Float('Marks', required=True, track_visibility='onchange')
4242
description = fields.Text('Description', required=True)
4343
state = fields.Selection(
4444
[('draft', 'Draft'), ('publish', 'Published'),

openeducat_assignment/models/assignment_sub_line.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class OpAssignmentSubLine(models.Model):
4343
submission_date = fields.Datetime(
4444
'Submission Date', readonly=True,
4545
default=lambda self: fields.Datetime.now(), required=True)
46+
marks = fields.Float('Marks', track_visibility='onchange')
4647
note = fields.Text('Note')
4748
user_id = fields.Many2one(
4849
'res.users', related='student_id.user_id', string='User')

openeducat_assignment/models/assignment_type.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ class OpAssignmentType(models.Model):
2626
_name = 'op.assignment.type'
2727

2828
name = fields.Char('Name', size=256, required=True)
29-
code = fields.Char('Code', size=4, required=True)
29+
code = fields.Char('Code', size=16, required=True)
30+
31+
_sql_constraints = [
32+
('unique_assignment_type_code',
33+
'unique(code)', 'Code should be unique per assignment type!')]

openeducat_assignment/static/description/index.html

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,14 @@ <h2 class="oe_slogan">Assignment Submission</h2>
5757
</div>
5858
</section>
5959

60-
61-
<section class="jumbotron"
62-
style="color: white; background-color: #606061;">
63-
<div class="container">
64-
<div class="row">
65-
<div class="col-md-9">
66-
<p class="mt16">
67-
<strong>Need help or just looking for more information on
68-
OpenEduCat ? We are ready and waiting for your questions.</strong>
69-
</p>
70-
</div>
71-
<div class="col-md-3">
72-
<a class="btn btn-primary btn-lg pull-right mt8"
73-
style="color: #FFFFFF !important;"
74-
href="https://www.openeducat.org/page/website.contactus"><i
75-
class="fa fa-arrow-right"></i> Contact Us Now </a>
76-
</div>
77-
</div>
78-
</div>
60+
<section class="oe_container">
61+
<div class="oe_mt16 oe_mb16">
62+
<h2 class="oe_slogan">Need Any Help?</h2>
63+
</div>
64+
<div class="oe_slogan">
65+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="mailto:[email protected]"><i class="fa fa-envelope"></i> Email </a>
66+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="https://www.openeducat.org/page/contactus"><i class="fa fa-phone"></i> Contact Us </a>
67+
<a class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" href="https://www.openeducat.org/page/contactus"><i class="fa fa-check-square"></i> Request Customization </a>
68+
<a class="mt8 btn btn-primary btn-lg" style="color: #FFFFFF !important;margin-right: 7px;" href="https://www.openeducat.org/page/return-and-refund-policy"><i class="fa fa-share-square" style=""></i> Returns and Refunds Policy</a>
69+
</div>
7970
</section>

openeducat_assignment/test/assignment_sub_values.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-
99
!record {model: op.assignment.type, id: assignment_type_ea_test}:
1010
name: 'External Assignment'
11-
code: 'ea'
11+
code: 'exa'
1212
-
1313
Backoffice Admin can create batch, course, student, faculty and partner there for I checked it with that user who is backoffice admin.
1414
-
@@ -27,7 +27,7 @@
2727
-
2828
!record {model: op.batch, id: batch_test}:
2929
name: 'BOA-S1'
30-
code: 'boas1'
30+
code: 'boas1t'
3131
course_id: course_test
3232
start_date: !eval str(int(time.strftime('%Y')) - 1) +'-06-02'
3333
end_date: !eval str(int(time.strftime('%Y')) + 2) +'-06-02'
@@ -61,7 +61,7 @@
6161
-
6262
!record {model: op.subject, id: subject_fa_test}:
6363
name: 'Financial Accounting'
64-
code: 'BOA1-001'
64+
code: 'BOA1-001t'
6565
type: 'theory'
6666
-
6767
I create 1st Partner for student

openeducat_assignment/views/assignment_sub_line_view.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<field name="student_id" domain="[('user_id','=',uid)]"/>
4141
<field name="assignment_id" domain="[('allocation_ids','=',student_id),('state','=','publish')]"/>
4242
<field name="submission_date" />
43+
<field name="marks" attrs="{'readonly':[('state','=','accept')]}" />
4344
</group>
4445
<group string="Description">
4546
<field name="description" nolabel="1" />

0 commit comments

Comments
 (0)