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: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.2
    • Fix Version/s: None
    • Component/s: Mobile features
    • Labels:
      None
    • 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

      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

      The root cause is:
      In here, we set a very small timeout to slide to the selected tab. But the tabsComponent is not loaded completely so the code here, will be skipped. The if statement is used to prevent exception when the tabsComponent is not loaded completely and the _snapGrid of the swiper is not loadded.

      I have tried to fix it in many ways but all are seem not work smoothly.
      One of them, I add a code change here: https://github.com/nguyenphuctien/moodlemobile2/commit/12926aa864c5bab05b73c051bc310ae188bd8689
      to fix it, but fix the timeout in 0.5s is not a reliable solution

       

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: