effective_cpd 1.3.2 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/effective/cpd_statements_controller.rb +2 -0
- data/app/models/concerns/effective_cpd_bulk_audit.rb +2 -2
- data/app/models/concerns/effective_cpd_user.rb +1 -0
- data/app/views/admin/cpd_bulk_audits/create.html.haml +12 -0
- data/lib/effective_cpd/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2be9f6813dafd2931948881251226b7ed3b620a0b878b873f7e8c268c4f908bb
|
4
|
+
data.tar.gz: 9508a3ed45b0057b2a448ed67de9720a26a86ae22f964c1640ed411f6c903fb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81fd014d7d29224b1dfd22ac694e98e3be2b45537b80094259cc42cfb7b5f8cb2446a70f42aed2d68cac5557dae9b253c144ec398993570759b7c9578d2cbe7d
|
7
|
+
data.tar.gz: f81cf81ceec74d6508b80bbc1d6fd983526e8173e7306cb1c7c0e8dd3544ed3a504bb5e920632eeccce49cfc24302d504fbe5db7b44d4b6f7500e750082546c2
|
@@ -105,8 +105,8 @@ module EffectiveCpdBulkAudit
|
|
105
105
|
def create_audits!
|
106
106
|
save!
|
107
107
|
|
108
|
-
@auditees = cpd_auditees.
|
109
|
-
@reviewers = cpd_audit_reviewers.
|
108
|
+
@auditees = cpd_auditees.reorder('RANDOM()').limit(audits)
|
109
|
+
@reviewers = cpd_audit_reviewers.reorder('RANDOM()').limit(audits).to_a
|
110
110
|
|
111
111
|
@auditees.each do |auditee|
|
112
112
|
reviewers = audit_reviewers_per_audit.times.map { next_audit_reviewer() }
|
@@ -24,6 +24,7 @@ module EffectiveCpdUser
|
|
24
24
|
has_many :cpd_audits, -> { order(:id) }, inverse_of: :user
|
25
25
|
has_many :cpd_audit_reviews, -> { order(:id) }, inverse_of: :user
|
26
26
|
|
27
|
+
# These two should not be sorted
|
27
28
|
scope :cpd_audit_auditees, -> { without_role(:cpd_audit_reviewer).without_role(:admin) }
|
28
29
|
scope :cpd_audit_reviewers, -> { with_role(:cpd_audit_reviewer) }
|
29
30
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-4
|
3
|
+
.col-md-4
|
4
|
+
= card('All Done') do
|
5
|
+
.alert.alert-success.mb-4 Congratulations! All done!
|
6
|
+
|
7
|
+
%p All selected #{cpd_audits_label} are now being opened.
|
8
|
+
|
9
|
+
%p.text-center
|
10
|
+
= link_to(cpd_audits_label, effective_cpd.admin_cpd_audits_path, class: 'btn btn-primary')
|
11
|
+
|
12
|
+
.col-md-4
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_cpd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -316,6 +316,7 @@ files:
|
|
316
316
|
- app/views/admin/cpd_audits/_status.html.haml
|
317
317
|
- app/views/admin/cpd_bulk_audits/_form.html.haml
|
318
318
|
- app/views/admin/cpd_bulk_audits/_form_cpd_bulk_audit.html.haml
|
319
|
+
- app/views/admin/cpd_bulk_audits/create.html.haml
|
319
320
|
- app/views/admin/cpd_categories/_form.html.haml
|
320
321
|
- app/views/admin/cpd_categories/_form_cpd_category.html.haml
|
321
322
|
- app/views/admin/cpd_cycles/_form.html.haml
|