Bug #1413
Left and right arrows in a LP student view does not work if there are 2 or more sections
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
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).
Updated by Yannick Warnier over 9 years ago
- % Done changed from 0 to 10
- id:9 (section)
- id:11 (image)
- id:10 (section)
- id:12 (image)
- 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)
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
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
Updated by Yannick Warnier over 9 years ago
- Status changed from Needs testing to Bug resolved