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

Sometimes the slide bar do not slide to current tab

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.9.2
    • Mobile features
    • 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
    • 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.         
      }
      

       
       
       
       
       

        1. ionic5.mp4
          3.96 MB
        2. android.mp4
          851 kB
        3. ios.mp4
          786 kB

            tiennguyenphuc Tien Nguyen
            tiennguyenphuc Tien Nguyen
            Sam Marshall Sam Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.