effective_cpd 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +117 -0
- data/Rakefile +18 -0
- data/app/assets/config/effective_cpd_manifest.js +2 -0
- data/app/assets/javascripts/effective_cpd.js +2 -0
- data/app/assets/javascripts/effective_cpd/activities.js +49 -0
- data/app/assets/javascripts/effective_cpd/activities_new.js +21 -0
- data/app/assets/stylesheets/effective_cpd.scss +1 -0
- data/app/assets/stylesheets/effective_cpd/_activities.scss +19 -0
- data/app/controllers/admin/cpd_activities_controller.rb +13 -0
- data/app/controllers/admin/cpd_categories_controller.rb +13 -0
- data/app/controllers/admin/cpd_cycles_controller.rb +13 -0
- data/app/controllers/admin/cpd_rules_controller.rb +13 -0
- data/app/controllers/admin/cpd_statements_controller.rb +13 -0
- data/app/controllers/effective/cpd_cycles_controller.rb +19 -0
- data/app/controllers/effective/cpd_statement_activities_controller.rb +27 -0
- data/app/controllers/effective/cpd_statements_controller.rb +71 -0
- data/app/datatables/admin/effective_cpd_activities_datatable.rb +31 -0
- data/app/datatables/admin/effective_cpd_categories_datatable.rb +24 -0
- data/app/datatables/admin/effective_cpd_cycles_datatable.rb +22 -0
- data/app/datatables/admin/effective_cpd_rules_datatable.rb +43 -0
- data/app/datatables/admin/effective_cpd_statements_datatable.rb +30 -0
- data/app/datatables/effective_cpd_datatable.rb +30 -0
- data/app/datatables/effective_cpd_statements_datatable.rb +23 -0
- data/app/helpers/effective_cpd_helper.rb +37 -0
- data/app/mailers/effective/cpd_mailer.rb +7 -0
- data/app/models/effective/cpd_activity.rb +41 -0
- data/app/models/effective/cpd_category.rb +35 -0
- data/app/models/effective/cpd_cycle.rb +113 -0
- data/app/models/effective/cpd_rule.rb +108 -0
- data/app/models/effective/cpd_scorer.rb +158 -0
- data/app/models/effective/cpd_statement.rb +95 -0
- data/app/models/effective/cpd_statement_activity.rb +78 -0
- data/app/views/admin/cpd_activities/_form.html.haml +20 -0
- data/app/views/admin/cpd_categories/_form.html.haml +21 -0
- data/app/views/admin/cpd_categories/_form_cpd_category.html.haml +5 -0
- data/app/views/admin/cpd_cycles/_form.html.haml +17 -0
- data/app/views/admin/cpd_cycles/_form_content.html.haml +32 -0
- data/app/views/admin/cpd_cycles/_form_cpd_cycle.html.haml +21 -0
- data/app/views/admin/cpd_cycles/_form_cpd_rules.html.haml +56 -0
- data/app/views/admin/cpd_statements/_form.html.haml +6 -0
- data/app/views/effective/cpd_statement_activities/_form.html.haml +70 -0
- data/app/views/effective/cpd_statements/_activities.html.haml +64 -0
- data/app/views/effective/cpd_statements/_activities_new.html.haml +39 -0
- data/app/views/effective/cpd_statements/_agreements.html.haml +6 -0
- data/app/views/effective/cpd_statements/_cpd_statement.html.haml +5 -0
- data/app/views/effective/cpd_statements/_layout.html.haml +37 -0
- data/app/views/effective/cpd_statements/_summary.html.haml +36 -0
- data/app/views/effective/cpd_statements/activities.html.haml +25 -0
- data/app/views/effective/cpd_statements/agreements.html.haml +14 -0
- data/app/views/effective/cpd_statements/complete.html.haml +13 -0
- data/app/views/effective/cpd_statements/start.html.haml +13 -0
- data/app/views/effective/cpd_statements/submit.html.haml +20 -0
- data/app/views/layouts/effective_cpd_mailer_layout.html.haml +7 -0
- data/config/effective_cpd.rb +29 -0
- data/config/routes.rb +28 -0
- data/db/migrate/01_create_effective_cpd.rb.erb +98 -0
- data/db/seeds.rb +472 -0
- data/lib/effective_cpd.rb +18 -0
- data/lib/effective_cpd/engine.rb +11 -0
- data/lib/effective_cpd/version.rb +3 -0
- data/lib/generators/effective_cpd/install_generator.rb +46 -0
- data/lib/generators/templates/effective_cpd_mailer_preview.rb +4 -0
- data/lib/tasks/effective_cpd_tasks.rake +6 -0
- metadata +233 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
%h1= resource.cpd_cycle
|
3
|
+
|
4
|
+
- if resource.cpd_cycle.all_steps_content.present?
|
5
|
+
.mb-2= resource.cpd_cycle.all_steps_content
|
6
|
+
|
7
|
+
- if resource.cpd_cycle.agreements_content.present?
|
8
|
+
.mb-2= resource.cpd_cycle.agreements_content
|
9
|
+
|
10
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
11
|
+
= render('agreements', f: f, form: f)
|
12
|
+
= f.hidden_field :current_step
|
13
|
+
|
14
|
+
= f.submit 'Save and Continue', center: true
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
%h1= resource.cpd_cycle
|
3
|
+
|
4
|
+
- if resource.cpd_cycle.all_steps_content.present?
|
5
|
+
.mb-2= resource.cpd_cycle.all_steps_content
|
6
|
+
|
7
|
+
- if resource.cpd_cycle.complete_content.present?
|
8
|
+
.mb-2= resource.cpd_cycle.complete_content
|
9
|
+
|
10
|
+
= render(resource)
|
11
|
+
|
12
|
+
%hr
|
13
|
+
.text-center= link_to 'Home', root_url, class: 'btn btn-primary'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
%h1= resource.cpd_cycle
|
3
|
+
|
4
|
+
- if resource.cpd_cycle.all_steps_content.present?
|
5
|
+
.mb-2= resource.cpd_cycle.all_steps_content
|
6
|
+
|
7
|
+
- if resource.cpd_cycle.start_content.present?
|
8
|
+
.mb-2= resource.cpd_cycle.start_content
|
9
|
+
|
10
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
11
|
+
= f.hidden_field :current_step
|
12
|
+
|
13
|
+
= f.submit 'Start', center: true
|
@@ -0,0 +1,20 @@
|
|
1
|
+
= render('layout') do
|
2
|
+
%h1= resource.cpd_cycle
|
3
|
+
|
4
|
+
- if resource.cpd_cycle.all_steps_content.present?
|
5
|
+
.mb-2= resource.cpd_cycle.all_steps_content
|
6
|
+
|
7
|
+
- if resource.cpd_cycle.submit_content.present?
|
8
|
+
.mb-2= resource.cpd_cycle.submit_content
|
9
|
+
|
10
|
+
= render(resource)
|
11
|
+
|
12
|
+
%p= link_to 'Change Activities', wizard_path(:activities)
|
13
|
+
|
14
|
+
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
15
|
+
= f.hidden_field :current_step
|
16
|
+
|
17
|
+
= f.check_box :confirm_readonly,
|
18
|
+
label: 'Yes, I understand that I will not be able to modify this statement after submission'
|
19
|
+
|
20
|
+
= f.submit 'Save and Continue', center: true
|
@@ -0,0 +1,29 @@
|
|
1
|
+
EffectiveCpd.setup do |config|
|
2
|
+
config.cpd_cycles_table_name = :cpd_cycles
|
3
|
+
config.cpd_categories_table_name = :cpd_categories
|
4
|
+
config.cpd_activities_table_name = :cpd_activities
|
5
|
+
config.cpd_rules_table_name = :cpd_rules
|
6
|
+
config.cpd_statement_activities_table_name = :cpd_statement_activities
|
7
|
+
config.cpd_statements_table_name = :cpd_statements
|
8
|
+
|
9
|
+
# Layout Settings
|
10
|
+
# Configure the Layout per controller, or all at once
|
11
|
+
config.layout = {
|
12
|
+
cpd: 'application',
|
13
|
+
admin: 'admin'
|
14
|
+
}
|
15
|
+
|
16
|
+
config.cycle_label = 'year' # 'cycle', 'season'
|
17
|
+
config.credit_label = 'credit' # 'credit', 'PDH', 'PDU', 'CCC'
|
18
|
+
|
19
|
+
# Notifications Mailer Settings
|
20
|
+
#
|
21
|
+
# Schedule rake effective_cpd:notify to run every 10 minutes
|
22
|
+
# to send out email poll notifications
|
23
|
+
#
|
24
|
+
config.mailer = {
|
25
|
+
layout: 'effective_cpd_mailer_layout',
|
26
|
+
default_from: 'no-reply@example.com'
|
27
|
+
}
|
28
|
+
|
29
|
+
end
|
data/config/routes.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
mount EffectiveCpd::Engine => '/', as: 'effective_cpd'
|
3
|
+
end
|
4
|
+
|
5
|
+
EffectiveCpd::Engine.routes.draw do
|
6
|
+
scope module: 'effective' do
|
7
|
+
resources :cpd_cycles, path: "cpd_#{EffectiveCpd.cycle_label.pluralize.parameterize.underscore}", only: [:show] do
|
8
|
+
resources :cpd_statements, path: :statements, only: [:new, :show] do
|
9
|
+
resources :build, controller: :cpd_statements, only: [:show, :update]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
resources :cpd_statements, only: [] do
|
14
|
+
resources :cpd_statement_activities, except: [:index, :show]
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
namespace :admin do
|
20
|
+
resources :cpd_categories, except: [:show]
|
21
|
+
resources :cpd_activities, except: [:show]
|
22
|
+
resources :cpd_cycles, except: [:show]
|
23
|
+
resources :cpd_rules, only: [:index]
|
24
|
+
|
25
|
+
resources :cpd_statements, only: [:index, :edit, :update]
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
class CreateEffectiveCpd < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table <%= @cpd_cycles_table_name %> do |t|
|
4
|
+
t.string :title
|
5
|
+
|
6
|
+
t.datetime :start_at
|
7
|
+
t.datetime :end_at
|
8
|
+
|
9
|
+
t.integer :required_score
|
10
|
+
|
11
|
+
t.datetime :updated_at
|
12
|
+
t.datetime :created_at
|
13
|
+
end
|
14
|
+
|
15
|
+
create_table <%= @cpd_categories_table_name %> do |t|
|
16
|
+
t.string :title
|
17
|
+
t.integer :position
|
18
|
+
|
19
|
+
t.datetime :updated_at
|
20
|
+
t.datetime :created_at
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table <%= @cpd_activities_table_name %> do |t|
|
24
|
+
t.references :cpd_category
|
25
|
+
|
26
|
+
t.string :title
|
27
|
+
t.integer :position
|
28
|
+
|
29
|
+
t.string :amount_label
|
30
|
+
t.string :amount2_label
|
31
|
+
|
32
|
+
t.boolean :requires_upload_file, default: false
|
33
|
+
|
34
|
+
t.datetime :updated_at
|
35
|
+
t.datetime :created_at
|
36
|
+
end
|
37
|
+
|
38
|
+
create_table <%= @cpd_rules_table_name %> do |t|
|
39
|
+
t.references :cpd_cycle
|
40
|
+
t.integer :ruleable_id
|
41
|
+
t.string :ruleable_type
|
42
|
+
|
43
|
+
t.text :credit_description
|
44
|
+
t.string :formula
|
45
|
+
|
46
|
+
t.integer :max_credits_per_cycle
|
47
|
+
t.integer :max_cycles_can_carry_forward
|
48
|
+
t.boolean :unavailable, default: false
|
49
|
+
|
50
|
+
t.datetime :updated_at
|
51
|
+
t.datetime :created_at
|
52
|
+
end
|
53
|
+
|
54
|
+
create_table <%= @cpd_statement_activities_table_name %> do |t|
|
55
|
+
t.references :cpd_statement
|
56
|
+
t.references :cpd_activity
|
57
|
+
t.references :cpd_category
|
58
|
+
t.references :original
|
59
|
+
|
60
|
+
t.integer :amount
|
61
|
+
t.integer :amount2
|
62
|
+
|
63
|
+
t.text :description
|
64
|
+
|
65
|
+
t.integer :carry_over
|
66
|
+
t.integer :score
|
67
|
+
t.integer :carry_forward
|
68
|
+
|
69
|
+
t.text :reduced_messages
|
70
|
+
|
71
|
+
t.datetime :updated_at
|
72
|
+
t.datetime :created_at
|
73
|
+
end
|
74
|
+
|
75
|
+
create_table <%= @cpd_statements_table_name %> do |t|
|
76
|
+
t.references :cpd_cycle
|
77
|
+
|
78
|
+
t.integer :user_id
|
79
|
+
t.string :user_type
|
80
|
+
|
81
|
+
t.string :token
|
82
|
+
|
83
|
+
t.integer :score
|
84
|
+
|
85
|
+
t.boolean :confirm_read
|
86
|
+
t.boolean :confirm_factual
|
87
|
+
t.boolean :confirm_readonly
|
88
|
+
|
89
|
+
t.datetime :completed_at
|
90
|
+
|
91
|
+
t.text :wizard_steps
|
92
|
+
|
93
|
+
t.datetime :updated_at
|
94
|
+
t.datetime :created_at
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
end
|
data/db/seeds.rb
ADDED
@@ -0,0 +1,472 @@
|
|
1
|
+
puts "Running effective_cpd seeds"
|
2
|
+
|
3
|
+
now = Time.zone.now
|
4
|
+
|
5
|
+
if Rails.env.test?
|
6
|
+
Effective::CpdCycle.delete_all
|
7
|
+
Effective::CpdCategory.delete_all
|
8
|
+
Effective::CpdActivity.delete_all
|
9
|
+
Effective::CpdRule.delete_all
|
10
|
+
|
11
|
+
ActionText::RichText.where(record_type: ['Effective::CpdCycle', 'Effective::CpdCycle', 'Effective::CpdActivity']).delete_all
|
12
|
+
end
|
13
|
+
|
14
|
+
# Build the first CpdCycle
|
15
|
+
cycle = Effective::CpdCycle.create!(
|
16
|
+
title: "#{now.year} Continuing Professional Development",
|
17
|
+
start_at: now.beginning_of_year,
|
18
|
+
end_at: now.end_of_year,
|
19
|
+
required_score: 100,
|
20
|
+
all_steps_content: "<div>All Steps Content</div>",
|
21
|
+
start_content: "<div>Start Content</div>",
|
22
|
+
activities_content: "<div>Activities Content</div>",
|
23
|
+
submit_content: "<div>Submit Content</div>",
|
24
|
+
complete_content: "<div>Complete Content</div>"
|
25
|
+
)
|
26
|
+
|
27
|
+
# Professional Practice
|
28
|
+
category = Effective::CpdCategory.create!(
|
29
|
+
title: 'Professional Practice',
|
30
|
+
body: "A registrant who is actively practicing applied biology (performing technical work) or influencing (having some effect on how the professional is practiced) the practice of applied biology. <em>Note: Points claimed in this category cannot also be claimed under the Management category</em>",
|
31
|
+
)
|
32
|
+
Effective::CpdRule.create!(
|
33
|
+
cpd_cycle: cycle,
|
34
|
+
ruleable: category,
|
35
|
+
credit_description: 'Upto a maximum of 20 claimable points per CPD year. Points cannot be carried forward to future years.',
|
36
|
+
max_credits_per_cycle: 20
|
37
|
+
)
|
38
|
+
|
39
|
+
activity = Effective::CpdActivity.create!(
|
40
|
+
cpd_category: category,
|
41
|
+
position: 0,
|
42
|
+
title: 'Practicing applied biology',
|
43
|
+
amount_label: 'points',
|
44
|
+
)
|
45
|
+
|
46
|
+
Effective::CpdRule.create!(
|
47
|
+
cpd_cycle: cycle,
|
48
|
+
ruleable: activity,
|
49
|
+
formula: 'amount',
|
50
|
+
credit_description: '1 point equals 1 CPD point',
|
51
|
+
max_cycles_can_carry_forward: nil
|
52
|
+
)
|
53
|
+
|
54
|
+
activity = Effective::CpdActivity.create!(
|
55
|
+
cpd_category: category,
|
56
|
+
position: 1,
|
57
|
+
title: 'Influencing the practice of applied biology',
|
58
|
+
amount_label: 'points',
|
59
|
+
)
|
60
|
+
Effective::CpdRule.create!(
|
61
|
+
cpd_cycle: cycle,
|
62
|
+
ruleable: activity,
|
63
|
+
formula: 'amount',
|
64
|
+
credit_description: '1 point equals 1 CPD point',
|
65
|
+
max_cycles_can_carry_forward: nil
|
66
|
+
)
|
67
|
+
|
68
|
+
# Management
|
69
|
+
category = Effective::CpdCategory.create!(
|
70
|
+
title: 'Management',
|
71
|
+
body: "The management, evaluation, direction/supervision of professionals; and the management, evaluation and direction/management of projects or activities being carried out by professionals <em>Note: Points claimed in this category cannot also be claimed under the Professional Practice category.</em>",
|
72
|
+
)
|
73
|
+
Effective::CpdRule.create!(
|
74
|
+
cpd_cycle: cycle,
|
75
|
+
ruleable: category,
|
76
|
+
credit_description: 'Upto a maximum of 20 claimable points per CPD year. Points cannot be carried forward to future years.',
|
77
|
+
max_credits_per_cycle: 20
|
78
|
+
)
|
79
|
+
|
80
|
+
activity = Effective::CpdActivity.create!(
|
81
|
+
cpd_category: category,
|
82
|
+
position: 0,
|
83
|
+
title: 'Assessment and evaluation of professionals who are conducting applied biology',
|
84
|
+
body: "e.g. determining who is best for the particular work.",
|
85
|
+
amount_label: 'points',
|
86
|
+
)
|
87
|
+
Effective::CpdRule.create!(
|
88
|
+
cpd_cycle: cycle,
|
89
|
+
ruleable: activity,
|
90
|
+
formula: 'amount',
|
91
|
+
credit_description: '1 point equals 1 CPD point',
|
92
|
+
max_cycles_can_carry_forward: nil
|
93
|
+
)
|
94
|
+
|
95
|
+
activity = Effective::CpdActivity.create!(
|
96
|
+
cpd_category: category,
|
97
|
+
position: 1,
|
98
|
+
title: 'Overseeing projects or activities',
|
99
|
+
body: "e.g. reviewing professional documents being carried out by professionals.",
|
100
|
+
amount_label: 'points',
|
101
|
+
)
|
102
|
+
Effective::CpdRule.create!(
|
103
|
+
cpd_cycle: cycle,
|
104
|
+
ruleable: activity,
|
105
|
+
formula: 'amount',
|
106
|
+
credit_description: '1 point equals 1 CPD point',
|
107
|
+
max_cycles_can_carry_forward: nil
|
108
|
+
)
|
109
|
+
|
110
|
+
activity = Effective::CpdActivity.create!(
|
111
|
+
cpd_category: category,
|
112
|
+
position: 2,
|
113
|
+
title: 'Establishing financial (cost assessments) and time limits for projects, and scope of projects',
|
114
|
+
amount_label: 'points',
|
115
|
+
)
|
116
|
+
Effective::CpdRule.create!(
|
117
|
+
cpd_cycle: cycle,
|
118
|
+
ruleable: activity,
|
119
|
+
formula: 'amount',
|
120
|
+
credit_description: '1 point equals 1 CPD point',
|
121
|
+
max_cycles_can_carry_forward: nil
|
122
|
+
)
|
123
|
+
|
124
|
+
activity = Effective::CpdActivity.create!(
|
125
|
+
cpd_category: category,
|
126
|
+
position: 3,
|
127
|
+
title: 'Other',
|
128
|
+
amount_label: 'points',
|
129
|
+
)
|
130
|
+
Effective::CpdRule.create!(
|
131
|
+
cpd_cycle: cycle,
|
132
|
+
ruleable: activity,
|
133
|
+
formula: 'amount',
|
134
|
+
credit_description: '1 point equals 1 CPD point',
|
135
|
+
max_cycles_can_carry_forward: nil
|
136
|
+
)
|
137
|
+
|
138
|
+
# Formal Learning
|
139
|
+
category = Effective::CpdCategory.create!(
|
140
|
+
title: 'Formal Learning',
|
141
|
+
body: "Learning that has academic or technical credit, and may include assignments or examinations to evaluate learning that assists a registrant in practicing due diligence with regards to clients and their professional requirements; and to maintain, enhance or to develop practice competence in areas of practice.",
|
142
|
+
)
|
143
|
+
Effective::CpdRule.create!(
|
144
|
+
cpd_cycle: cycle,
|
145
|
+
ruleable: category,
|
146
|
+
credit_description: 'Upto a maximum of 35 claimable points per CPD year. Points may be carried over upto a maximum of 2 years after the year in which they were earned.',
|
147
|
+
max_credits_per_cycle: 35
|
148
|
+
)
|
149
|
+
|
150
|
+
activity = Effective::CpdActivity.create!(
|
151
|
+
cpd_category: category,
|
152
|
+
title: 'From post-secondary education institutes, suppliers, employers, government or professional associations',
|
153
|
+
amount_label: 'points',
|
154
|
+
)
|
155
|
+
Effective::CpdRule.create!(
|
156
|
+
cpd_cycle: cycle,
|
157
|
+
ruleable: activity,
|
158
|
+
formula: 'amount',
|
159
|
+
credit_description: '1 point equals 1 CPD point',
|
160
|
+
max_cycles_can_carry_forward: 2
|
161
|
+
)
|
162
|
+
|
163
|
+
activity = Effective::CpdActivity.create!(
|
164
|
+
cpd_category: category,
|
165
|
+
position: 0,
|
166
|
+
title: 'Online, in classroom settings, a combination, or other methods',
|
167
|
+
amount_label: 'points',
|
168
|
+
)
|
169
|
+
Effective::CpdRule.create!(
|
170
|
+
cpd_cycle: cycle,
|
171
|
+
ruleable: activity,
|
172
|
+
formula: 'amount',
|
173
|
+
credit_description: '1 point equals 1 CPD point',
|
174
|
+
max_cycles_can_carry_forward: 2
|
175
|
+
)
|
176
|
+
|
177
|
+
# Informal Learning
|
178
|
+
category = Effective::CpdCategory.create!(
|
179
|
+
title: 'Informal Learning',
|
180
|
+
body: "Learning that has academic or technical credit, and may include assignments or examinations to evaluate learning that assists a registrant in practicing due diligence with regards to clients and their professional requirements; and to maintain, enhance or to develop practice competence in areas of practice.",
|
181
|
+
)
|
182
|
+
Effective::CpdRule.create!(
|
183
|
+
cpd_cycle: cycle,
|
184
|
+
ruleable: category,
|
185
|
+
credit_description: 'Upto a maximum of 15 claimable points per CPD year. Points may be carried over upto a maximum of 2 years after the year in which they were earned.',
|
186
|
+
max_credits_per_cycle: 15
|
187
|
+
)
|
188
|
+
|
189
|
+
activity = Effective::CpdActivity.create!(
|
190
|
+
cpd_category: category,
|
191
|
+
position: 1,
|
192
|
+
title: 'Self-directed studies',
|
193
|
+
amount_label: 'points',
|
194
|
+
)
|
195
|
+
Effective::CpdRule.create!(
|
196
|
+
cpd_cycle: cycle,
|
197
|
+
ruleable: activity,
|
198
|
+
formula: 'amount',
|
199
|
+
credit_description: '1 point equals 1 CPD point',
|
200
|
+
max_cycles_can_carry_forward: 2
|
201
|
+
)
|
202
|
+
|
203
|
+
activity = Effective::CpdActivity.create!(
|
204
|
+
cpd_category: category,
|
205
|
+
position: 2,
|
206
|
+
title: 'Attendance at conferences, seminars, workshops, technical presentations, clinics',
|
207
|
+
amount_label: 'points',
|
208
|
+
)
|
209
|
+
Effective::CpdRule.create!(
|
210
|
+
cpd_cycle: cycle,
|
211
|
+
ruleable: activity,
|
212
|
+
formula: 'amount',
|
213
|
+
credit_description: '1 point equals 1 CPD point',
|
214
|
+
max_cycles_can_carry_forward: 2
|
215
|
+
)
|
216
|
+
|
217
|
+
activity = Effective::CpdActivity.create!(
|
218
|
+
cpd_category: category,
|
219
|
+
position: 3,
|
220
|
+
title: 'Formalized and structured on the job training',
|
221
|
+
amount_label: 'points',
|
222
|
+
)
|
223
|
+
Effective::CpdRule.create!(
|
224
|
+
cpd_cycle: cycle,
|
225
|
+
ruleable: activity,
|
226
|
+
formula: 'amount',
|
227
|
+
credit_description: '1 point equals 1 CPD point',
|
228
|
+
max_cycles_can_carry_forward: 2
|
229
|
+
)
|
230
|
+
|
231
|
+
activity = Effective::CpdActivity.create!(
|
232
|
+
cpd_category: category,
|
233
|
+
position: 4,
|
234
|
+
title: 'Attendance at meetings of technical, professional or managerial associations or societies',
|
235
|
+
amount_label: 'points',
|
236
|
+
)
|
237
|
+
Effective::CpdRule.create!(
|
238
|
+
cpd_cycle: cycle,
|
239
|
+
ruleable: activity,
|
240
|
+
formula: 'amount',
|
241
|
+
credit_description: '1 point equals 1 CPD point',
|
242
|
+
max_cycles_can_carry_forward: 2
|
243
|
+
)
|
244
|
+
|
245
|
+
activity = Effective::CpdActivity.create!(
|
246
|
+
cpd_category: category,
|
247
|
+
position: 5,
|
248
|
+
title: 'Structured discussion of technical or professional issues with peers',
|
249
|
+
amount_label: 'points',
|
250
|
+
)
|
251
|
+
Effective::CpdRule.create!(
|
252
|
+
cpd_cycle: cycle,
|
253
|
+
ruleable: activity,
|
254
|
+
formula: 'amount',
|
255
|
+
credit_description: '1 point equals 1 CPD point',
|
256
|
+
max_cycles_can_carry_forward: 2
|
257
|
+
)
|
258
|
+
|
259
|
+
# Presentations
|
260
|
+
category = Effective::CpdCategory.create!(
|
261
|
+
title: 'Presentations',
|
262
|
+
body: "<div>Lecture/talk/speech that is of a technical and/or professional nature that are outside the normal daily job function(s)</div>",
|
263
|
+
)
|
264
|
+
Effective::CpdRule.create!(
|
265
|
+
cpd_cycle: cycle,
|
266
|
+
ruleable: category,
|
267
|
+
credit_description: 'Upto a maximum of 15 claimable points per CPD year. Points may be carried over upto a maximum of 2 years after the year in which they were earned.',
|
268
|
+
max_credits_per_cycle: 15
|
269
|
+
)
|
270
|
+
|
271
|
+
activity = Effective::CpdActivity.create!(
|
272
|
+
cpd_category: category,
|
273
|
+
position: 0,
|
274
|
+
title: 'Conference, symposium, workshop, seminar meeting, course, training session, lunch presentations',
|
275
|
+
amount_label: 'points',
|
276
|
+
)
|
277
|
+
Effective::CpdRule.create!(
|
278
|
+
cpd_cycle: cycle,
|
279
|
+
ruleable: activity,
|
280
|
+
formula: 'amount',
|
281
|
+
credit_description: '1 point equals 1 CPD point',
|
282
|
+
max_cycles_can_carry_forward: 2
|
283
|
+
)
|
284
|
+
|
285
|
+
activity = Effective::CpdActivity.create!(
|
286
|
+
cpd_category: category,
|
287
|
+
position: 1,
|
288
|
+
title: 'Post-secondary education institutes, employers, government, professional associations, public organizations',
|
289
|
+
amount_label: 'points',
|
290
|
+
)
|
291
|
+
Effective::CpdRule.create!(
|
292
|
+
cpd_cycle: cycle,
|
293
|
+
ruleable: activity,
|
294
|
+
formula: 'amount',
|
295
|
+
credit_description: '1 point equals 1 CPD point',
|
296
|
+
max_cycles_can_carry_forward: 2
|
297
|
+
)
|
298
|
+
|
299
|
+
activity = Effective::CpdActivity.create!(
|
300
|
+
cpd_category: category,
|
301
|
+
position: 2,
|
302
|
+
title: 'Other',
|
303
|
+
amount_label: 'points',
|
304
|
+
)
|
305
|
+
Effective::CpdRule.create!(
|
306
|
+
cpd_cycle: cycle,
|
307
|
+
ruleable: activity,
|
308
|
+
formula: 'amount',
|
309
|
+
credit_description: '1 point equals 1 CPD point',
|
310
|
+
max_cycles_can_carry_forward: 2
|
311
|
+
)
|
312
|
+
|
313
|
+
# Contributions to Knowledge
|
314
|
+
category = Effective::CpdCategory.create!(
|
315
|
+
title: 'Contributions to Knowledge',
|
316
|
+
body: "Activities which expand or develop new biological and/or technical/scientific knowledge in the biological profession are recognized that are outside the normal daily job function(s).",
|
317
|
+
)
|
318
|
+
Effective::CpdRule.create!(
|
319
|
+
cpd_cycle: cycle,
|
320
|
+
ruleable: category,
|
321
|
+
credit_description: 'Upto a maximum of 30 claimable points per CPD year. Points may be carried over upto a maximum of 2 years after the year in which they were earned.',
|
322
|
+
max_credits_per_cycle: 30
|
323
|
+
)
|
324
|
+
|
325
|
+
activity = Effective::CpdActivity.create!(
|
326
|
+
cpd_category: category,
|
327
|
+
position: 0,
|
328
|
+
title: 'Development of published standards, practices, codes',
|
329
|
+
amount_label: 'standard, practice, code',
|
330
|
+
)
|
331
|
+
Effective::CpdRule.create!(
|
332
|
+
cpd_cycle: cycle,
|
333
|
+
ruleable: activity,
|
334
|
+
formula: '10 * amount',
|
335
|
+
credit_description: '1 publication equals 10 CPD points',
|
336
|
+
max_credits_per_cycle: 10,
|
337
|
+
max_cycles_can_carry_forward: 2
|
338
|
+
)
|
339
|
+
|
340
|
+
activity = Effective::CpdActivity.create!(
|
341
|
+
cpd_category: category,
|
342
|
+
position: 1,
|
343
|
+
title: 'Development of published policy(ies), reference(s), guidelines(s), guidance(s)',
|
344
|
+
amount_label: 'standard, practice, guideline',
|
345
|
+
)
|
346
|
+
Effective::CpdRule.create!(
|
347
|
+
cpd_cycle: cycle,
|
348
|
+
ruleable: activity,
|
349
|
+
formula: '10 * amount',
|
350
|
+
credit_description: '1 publication equals 10 CPD points',
|
351
|
+
max_credits_per_cycle: 10,
|
352
|
+
max_cycles_can_carry_forward: 2
|
353
|
+
)
|
354
|
+
|
355
|
+
activity = Effective::CpdActivity.create!(
|
356
|
+
cpd_category: category,
|
357
|
+
position: 2,
|
358
|
+
title: 'Publication of papers in scientific peer-reviewed journals',
|
359
|
+
amount_label: 'hour',
|
360
|
+
)
|
361
|
+
Effective::CpdRule.create!(
|
362
|
+
cpd_cycle: cycle,
|
363
|
+
ruleable: activity,
|
364
|
+
formula: 'amount',
|
365
|
+
credit_description: '1 hour equals 1 CPD point',
|
366
|
+
max_credits_per_cycle: 15,
|
367
|
+
max_cycles_can_carry_forward: 2
|
368
|
+
)
|
369
|
+
|
370
|
+
activity = Effective::CpdActivity.create!(
|
371
|
+
cpd_category: category,
|
372
|
+
position: 3,
|
373
|
+
title: 'Publication of articles in non-peer-reviewed journals',
|
374
|
+
amount_label: 'article',
|
375
|
+
)
|
376
|
+
Effective::CpdRule.create!(
|
377
|
+
cpd_cycle: cycle,
|
378
|
+
ruleable: activity,
|
379
|
+
formula: '5 * amount',
|
380
|
+
credit_description: '1 article equals 5 CPD point',
|
381
|
+
max_credits_per_cycle: 10,
|
382
|
+
max_cycles_can_carry_forward: 2
|
383
|
+
)
|
384
|
+
|
385
|
+
activity = Effective::CpdActivity.create!(
|
386
|
+
cpd_category: category,
|
387
|
+
position: 4,
|
388
|
+
title: 'Publication of a books, a book chapter',
|
389
|
+
amount_label: 'book or book chapter',
|
390
|
+
)
|
391
|
+
Effective::CpdRule.create!(
|
392
|
+
cpd_cycle: cycle,
|
393
|
+
ruleable: activity,
|
394
|
+
formula: '10 * amount',
|
395
|
+
credit_description: '1 book or book chapter equals 10 CPD point',
|
396
|
+
max_credits_per_cycle: 10,
|
397
|
+
max_cycles_can_carry_forward: 2
|
398
|
+
)
|
399
|
+
|
400
|
+
activity = Effective::CpdActivity.create!(
|
401
|
+
cpd_category: category,
|
402
|
+
position: 5,
|
403
|
+
title: 'Peer-review of manuscripts for a scientific journal',
|
404
|
+
amount_label: 'hour',
|
405
|
+
)
|
406
|
+
Effective::CpdRule.create!(
|
407
|
+
cpd_cycle: cycle,
|
408
|
+
ruleable: activity,
|
409
|
+
formula: 'amount',
|
410
|
+
credit_description: '1 hour equals 1 CPD point',
|
411
|
+
max_credits_per_cycle: 10,
|
412
|
+
max_cycles_can_carry_forward: 2
|
413
|
+
)
|
414
|
+
|
415
|
+
# Service to the Community and the Profession
|
416
|
+
category = Effective::CpdCategory.create!(
|
417
|
+
title: 'Service to the Community and the Profession',
|
418
|
+
body: "Activities that promote peer interaction, provide exposure to new ideas and technologies; enhance the profession and serve the public interest.",
|
419
|
+
)
|
420
|
+
Effective::CpdRule.create!(
|
421
|
+
cpd_cycle: cycle,
|
422
|
+
ruleable: category,
|
423
|
+
credit_description: 'Upto a maximum of 10 points per mentee or position per CPD year. Points may be carried over upto a maximum of 2 years after the year in which they were earned.',
|
424
|
+
max_credits_per_cycle: nil
|
425
|
+
)
|
426
|
+
|
427
|
+
activity = Effective::CpdActivity.create!(
|
428
|
+
cpd_category: category,
|
429
|
+
position: 0,
|
430
|
+
title: 'Appointment as a mentor to an in-training registrant, a less experienced applied biology professional, student',
|
431
|
+
amount_label: 'mentee',
|
432
|
+
)
|
433
|
+
Effective::CpdRule.create!(
|
434
|
+
cpd_cycle: cycle,
|
435
|
+
ruleable: activity,
|
436
|
+
formula: '10 * amount',
|
437
|
+
credit_description: '1 mentee equals 10 CPD point',
|
438
|
+
max_credits_per_cycle: nil,
|
439
|
+
max_cycles_can_carry_forward: 2
|
440
|
+
)
|
441
|
+
|
442
|
+
activity = Effective::CpdActivity.create!(
|
443
|
+
cpd_category: category,
|
444
|
+
position: 1,
|
445
|
+
title: 'Service as an appointed and/or elected biology professional on a public, government, non-government and non-profit organization Board, Council, Committee, Working group etc.',
|
446
|
+
amount_label: 'appointed position',
|
447
|
+
)
|
448
|
+
Effective::CpdRule.create!(
|
449
|
+
cpd_cycle: cycle,
|
450
|
+
ruleable: activity,
|
451
|
+
formula: '10 * amount',
|
452
|
+
credit_description: '1 appointed position equals 10 CPD point',
|
453
|
+
max_credits_per_cycle: nil,
|
454
|
+
max_cycles_can_carry_forward: 2
|
455
|
+
)
|
456
|
+
|
457
|
+
activity = Effective::CpdActivity.create!(
|
458
|
+
cpd_category: category,
|
459
|
+
position: 2,
|
460
|
+
title: 'Other',
|
461
|
+
amount_label: 'point',
|
462
|
+
)
|
463
|
+
Effective::CpdRule.create!(
|
464
|
+
cpd_cycle: cycle,
|
465
|
+
ruleable: activity,
|
466
|
+
formula: 'amount',
|
467
|
+
credit_description: '1 point equals 1 CPD point',
|
468
|
+
max_credits_per_cycle: nil,
|
469
|
+
max_cycles_can_carry_forward: 2
|
470
|
+
)
|
471
|
+
|
472
|
+
puts "All Done"
|