Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3561

Sometimes the slide bar do not slide to current tab

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for integration review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.2
    • Fix Version/s: None
    • Component/s: Mobile features
    • Labels:
    • Testing Instructions:
      Hide
      1. Open a course which have quiz or activities which are included in grade report
        Login with user, enroll and complete a quiz / activitiy
      2. 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])
      3. 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.
      4. Go to the course, then click on the link to the report's url
      5. The grade report will be loaded, the 'Grades' tab should be selected, the slider should slide to the 'Grades' tab
      Show
      Open a course which have quiz or activities which are included in grade report Login with user, enroll and complete a quiz / activitiy 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] ) 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. Go to the course, then click on the link to the report's url The grade report will be loaded, the 'Grades' tab should be selected, the slider should slide to the 'Grades' tab
    • Affected Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MOBILE-3561-integration
    • Sprint:
      Moodle App 3.9.5

      Description

      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.         
      }
      

       
       
       
       
       

        Attachments

          Activity

            People

            Assignee:
            tiennguyenphuc Tien Nguyen
            Reporter:
            tiennguyenphuc Tien Nguyen
            Peer reviewer:
            Sam Marshall
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: