-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
3.9.2
-
-
MOODLE_39_STABLE
-
MOBILE-3561-integration
-
Moodle App 3.9.5
An example I can replicate in core site:
1. Open a course which have quiz or activities which are included in grade report
2. Login with user, enroll and complete a quiz / activitiy
3. Add an url to course (so we can test this link on the app) point to grade's user report
(something like /grade/report/user/index.php?id=[courseid])
4. Login with this user in the app, inscrease text size to largest to make sure the course can just show 2 tabs on a page.
5. Go to the course, then click on the link to the report
6. The grade report will be loaded, the 'Grades' tab will be selected, but the slider do not slide to the 'Grades' tab
I found the root cause:
in src\components\tabs\tabs.ts, the selectTab function skip sliding to the new selected tab if the current selected tab equal to 0. I think that we have a wrong code here:
if (this.selected) { |
this.slides.slideTo(index); |
this.updateAriaHidden(); // Slide's slideTo() sets aria-hidden to true, update it. |
}
|
It will causes bug when user open a link in the first tab to jump to other tab (the links is handler by CoreLinkHandler and call to CoreCourseProvider.selectCourseTab() to jump to other tab in the same course page, such as CoreUserParticipantsLinkHandler and CoreCoursesCourseLinkHandler). if (this.selected) will also skip 0 value of this.selected.
It should be
if (this.selected != undefined) { |
this.slides.slideTo(index); |
this.updateAriaHidden(); // Slide's slideTo() sets aria-hidden to true, update it. |
}
|