Changeset - 59de04d99da6
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 13 years ago 2012-11-28 00:23:13
ohnobinki@ohnopublishing.net
Fix support for displaying the number of credit hours in a permutation for schools with course slots, reported by bot10berg.

https://www.facebook.com/zimjimmy/posts/231316953666045?comment_id=886608&offset=0&total_comments=11
The linked schedule was displaying 24 credit hours instead of 14
credit hours because there were two course slots with two sections
each (each of these course slots having 4 credit hours) causing 8
credit hours to be doubly-counted.
1 file changed with 11 insertions and 1 deletions:
0 comments (0 inline, 0 general)
inc/class.schedule.php
Show inline comments
 
@@ -778,7 +778,17 @@ class Schedule
 
                                      $section_credit_hours = $section->credit_hours_get();
 
                                      if ($section_credit_hours >= 0)
 
                                        {
 
                                          $credit_hours[$section->getSynonym()] = $section_credit_hours;
 
                                          /*
 
                                           * We can only count credit
 
                                           * hours once per course,
 
                                           * otherwise for school that
 
                                           * use course_slots we count
 
                                           * credit hours for multiple
 
                                           * sections in the same
 
                                           * course and get ridiculous
 
                                           * numbers. https://www.facebook.com/zimjimmy/posts/231316953666045?comment_id=886608&offset=0&total_comments=11
 
                                           */
 
                                          $credit_hours[$course->getName()] = $section_credit_hours;
 
                                          $have_credit_hours = TRUE;
 

	
 
                                          echo htmlentities('Credits: ' . htmlentities($section_credit_hours, ENT_QUOTES) . $carret, ENT_QUOTES);
0 comments (0 inline, 0 general)