Project

General

Profile

Bug #1413

Left and right arrows in a LP student view does not work if there are 2 or more sections

Added by Julio Montoya over 9 years ago. Updated over 9 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
-
Target version:
Start date:
31/05/2010
Due date:
% Done:

100%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

1. Create a LP.
2. Create 2 sections
3. Add a different image for each section.
4. Go to the LP as an student and click in the right arrow. Nothing happens!

History

#1

Updated by Yannick Warnier over 9 years ago

  • Target version set to 1.8.7.1
#2

Updated by Yannick Warnier over 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Yannick Warnier

For some reason, the construction of the table of contents makes it so that the first element has the wrong javascript embedded (switch_item(4,2) instead of switch_item(2,4)).

The code for this is located in learnpath.class.php around lines 2670 (get_html_toc() method).

#3

Updated by Yannick Warnier over 9 years ago

  • % Done changed from 0 to 10
For elements:
  • id:9 (section)
  • id:11 (image)
  • id:10 (section)
  • id:12 (image)
On first load:
  • left button says switch_item(11,'previous');
  • right button says switch_item(11,'next');
  • first image (current) says switch_item(11,11);
  • second image (next) says switch_item(11,12);

However, when moving to next with right button, the script goes to the switch_item() function and, when checking for olms.lms_next_item (line 1351 of scorm_api.php generated in firebug), it finds it is worth "11", which is obviously not the case (should be 12).

Apparently this would be related to function get_next_item_id() (~line 1686)

#4

Updated by Curt Ricardo Rodriguez Salazar over 9 years ago

  • Status changed from Assigned to Needs testing
  • Assignee changed from Yannick Warnier to Curt Ricardo Rodriguez Salazar
  • % Done changed from 10 to 100

http://code.google.com/p/chamilo/source/detail?r=678cd67e21d9d1db64646670d2d718a94549eb95&repo=classic

Fixed the bug, was added 2 new conditions in case $index == $this->max_ordered_items and this condition have a condition of ordered_items by type

#5

Updated by Yannick Warnier over 9 years ago

  • Status changed from Needs testing to Bug resolved

Also available in: Atom PDF