https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35972

--- Comment #12 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 192859
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192859&action=edit
Bug 35972: Refactor C4::CourseReserves to use course_type

This patch refactors the CourseReserves module to use the new
course_type column instead of hardcoded department='TT' checks.

Changes to C4::CourseReserves:

1. SearchCourses():
   - Now accepts course_type parameter instead of thesis_table
   - Added backward compatibility for thesis_table parameter
   - Removed hardcoded department='TT' filtering
   - Updated SELECT to include course_type column
   - Updated GROUP BY and ORDER BY to include course_type

2. GetCourses():
   - Updated SELECT to include course_type column
   - Updated GROUP BY to include course_type

3. New function HasCoursesOfType():
   - Returns true if any courses of specified type exist
   - Useful for conditional navigation display
   - Respects enabled parameter

Backward compatibility:
- thesis_table='yes' → course_type='RESEARCH_TABLE'
- thesis_table='no' → course_type='COURSE'
- Existing code using thesis_table parameter continues to work

The refactoring removes all hardcoded assumptions about "thesis tables"
and makes the system flexible to support any course type defined via
authorized values.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to