Bugzilla – Attachment 38057 Details for
Bug 13817
Edit links on course items may point to the wrong course!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13817 - Edit links on course items may point to the wrong course!
Bug-13817---Edit-links-on-course-items-may-point-t.patch (text/plain), 3.01 KB, created by
Marcel de Rooy
on 2015-04-17 13:26:42 UTC
(
hide
)
Description:
Bug 13817 - Edit links on course items may point to the wrong course!
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-04-17 13:26:42 UTC
Size:
3.01 KB
patch
obsolete
>From ad8c73b1e024a17749fbb7fc4be1f541d127228a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 10 Mar 2015 10:38:50 -0700 >Subject: [PATCH] Bug 13817 - Edit links on course items may point to the > wrong course! >Content-Type: text/plain; charset=utf-8 > >If items are assigned to multiple courses, the "edit" links for a course >item may pass the wrong course id. This is really a cosmetic issue. > >It appears that in Template Toolkit, if you reuse an existing variable >name in a foreach loop, it will not create a new temporary variable but >will instead re-use the existing variable leaving assigned at the end to >the last assignment, just as it would in Perl code. > >This is not a problem when all items are assigned to one and only one >course, but can cause issues when we loop through the other courses an >item may be on. > >This is solved easily by renaming the variable used in the foreach loop >to another unused name. > >Test Plan: >1) Apply this patch >2) Try the edit and delete links for an item on reserve for a course >3) No changes in behavior should be noted > >Signed-off-by: Tom Misilo <misilot@fit.edu> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/course_reserves/course-details.tt | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index 429782a..252520c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -172,13 +172,13 @@ > [% END %] > > <td> >- [% FOREACH course IN cr.courses %] >- [% UNLESS cr.course_id == course.course_id %] >+ [% FOREACH c IN cr.courses %] >+ [% UNLESS cr.course_id == c.course_id %] > <p> >- <a href="course-details.pl?course_id=[% course.course_id %]"> >- [% course.course_name %] >- [% IF course.section %] [% course.section %] [% END %] >- [% IF course.term %] [% AuthorisedValues.GetByCode( 'TERM', course.term ) %] [% END %] >+ <a href="course-details.pl?course_id=[% c.course_id %]"> >+ [% c.course_name %] >+ [% IF c.section %] [% c.section %] [% END %] >+ [% IF c.term %] [% AuthorisedValues.GetByCode( 'TERM', c.term ) %] [% END %] > </a> > </p> > [% END %] >-- >1.7.10.4
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 13817
:
36776
|
37383
| 38057