Bugzilla – Attachment 151604 Details for
Bug 25079
Show club enrollment question answers in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25079: Show club enrollment question answers in staff client
Bug-25079-Show-club-enrollment-question-answers-in.patch (text/plain), 6.02 KB, created by
Sam Lau
on 2023-05-23 19:50:03 UTC
(
hide
)
Description:
Bug 25079: Show club enrollment question answers in staff client
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2023-05-23 19:50:03 UTC
Size:
6.02 KB
patch
obsolete
>From c4ec18aa42c47a8849711085de59a51fe139dd7b Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 12 Apr 2023 12:48:31 +0000 >Subject: [PATCH] Bug 25079: Show club enrollment question answers in staff > client >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When a patron is enrolled in a patron club, koha collects answers to library-defined enrollment questions. >Those answers go into the database but are not viewable outside of reports. > >This patch make those answers viewable on club-enrollments.pl. > >Test plan >1. Apply the patch > >2. Create a club template > 2.1. Go to Tools > Patron clubs > 2.2. Click on 'New Club Template' > 2.3. Fill the form > 2.4. on the 'Club fields' section, Click on Add new field > 2.5. Fill in the form > 2.6. on the 'Enrollment fields' section, Click on Add new field > 2.7. Fill in the form > 2.8. Click on Save button > >3. Creation of the club > 3.1. Go to Tools > Patron clubs > 'Clubs' section (bottom) > 3.2. Click on the 'New Club' button and select the club template create on step 1 > 3.3. Fill in the form > 3.4. Click on Save button > >4. Club enrollement > On the intranet (or the OPAC if permitted) > 4.1. Search for a pratron and open the patron folder > 4.2. Click on the 'Clubs' tab > 4.3. Find the name of the club and click on 'Enroll' > 4.4. Fill the questionnaire > 4.5. Confirm registration > >5. Check registrations on the intranet > 5.1. Go to Tools > Patron clubs > 5.2. In the bottom 'Clubs' section, find the name of the club > 5.3. check the 'Enrolled patrons' column > ---> should not be equal to zero. > 5.4 Click on 'Action' and choose the option âEnrollmentsâ > ---> The Enrollment fields created on step 2.6. are viewable in the table with their values > >Signed-off-by: Sam Lau <samalau@gmail.com> >--- > clubs/club-enrollments.pl | 4 ++++ > .../prog/en/modules/clubs/club-enrollments.tt | 23 +++++++++++++++++++ > 2 files changed, 27 insertions(+) > >diff --git a/clubs/club-enrollments.pl b/clubs/club-enrollments.pl >index 3eac228bb7..c2937f86af 100755 >--- a/clubs/club-enrollments.pl >+++ b/clubs/club-enrollments.pl >@@ -24,6 +24,7 @@ use CGI; > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); > use Koha::Clubs; >+use Koha::Club::Enrollment::Fields; > > my $cgi = CGI->new; > >@@ -38,9 +39,12 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > my $id = $cgi->param('id'); > my $club = Koha::Clubs->find( $id ); >+my @club_template_enrollment_fields = $club->club_template()->club_template_enrollment_fields()->as_list; >+my @club_enrollment_fields = Koha::Club::Enrollment::Fields->search({'club_template_enrollment_field_id'=> { -in => [map { $_->id } @club_template_enrollment_fields] }})->as_list; > > $template->param( > club => $club, >+ club_enrollment_fields => \@club_enrollment_fields, > ); > > output_html_with_http_headers( $cgi, $cookie, $template->output ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt >index eb8e503f75..cfee5d7669 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt >@@ -3,6 +3,8 @@ > [% USE KohaDates %] > [% USE Branches %] > [% USE Koha %] >+[% USE AuthorisedValues %] >+[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Club enrollments › Patron clubs › Tools › Koha</title> >@@ -43,6 +45,9 @@ > <tr> > <th>Name</th> > <th>Card number</th> >+ [% FOREACH club_template_enrollment_field IN club.club_template.club_template_enrollment_fields %] >+ <th>[% club_template_enrollment_field.name %] </th> >+ [% END %] > </tr> > </thead> > >@@ -56,6 +61,24 @@ > <td> > [% p.cardnumber | html %] > </td> >+ [% IF club_enrollment_fields %] >+ [% FOREACH club_enrollment_field IN club_enrollment_fields %] >+ [% IF e.id == club_enrollment_field.club_enrollment_id %] >+ [% FOREACH club_template_enrollment_field IN club.club_template.club_template_enrollment_fields %] >+ [% IF club_enrollment_field.club_template_enrollment_field_id == club_template_enrollment_field.id %] >+ [% IF club_template_enrollment_field.authorised_value_category %] >+ [% FOREACH a IN AuthorisedValues.Get( club_template_enrollment_field.authorised_value_category ) %] >+ [% IF a.authorised_value == club_enrollment_field.value %] >+ [% SET club_enrollment_field.value = a.lib %] >+ [% END %] >+ [% END %] >+ [% END %] >+ <td>[% club_enrollment_field.value | html %]</td> >+ [% END %] >+ [% END %] >+ [% END %] >+ [% END %] >+ [% END %] > </tr> > [% END %] > </tbody> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25079
:
149544
|
149545
|
151603
|
151604
|
151818
|
151819
|
151820
|
152496
|
152497
|
152498