Moodle
  1. Moodle
  2. MDL-26052

Since upgrade to version 1.9.10+ Database activity directs several functions to first entry.

    Details

    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      16022

      Description

      In the Database activity selecting to view a single entry from the list view ("More" icon) directs you always to the first entry. Clicking "Add comment" under any entry will direct you to the first entry. Comments can thus end up under the wrong entry. The ##comments## function if added to the template will also direct to the first entry even when clicked for another entry. This bug may affect more functions in the Database activity module that I have not tested yet.
      I could find no reference to this in another bug report. I apologise if the issue is known already, or if it turns out to be local.

        Activity

        Hide
        Andrea Bicciolo added a comment -

        It appears this issue is not local, as any Moodle 1.9.10+ setup we tested against this bug suffers the reported problem.

        A probable side effect is the "insert and view" pushbutton, which always yields user to the first record rather than the just inserted record page.

        Show
        Andrea Bicciolo added a comment - It appears this issue is not local, as any Moodle 1.9.10+ setup we tested against this bug suffers the reported problem. A probable side effect is the "insert and view" pushbutton, which always yields user to the first record rather than the just inserted record page.
        Hide
        Paul Nijbakker added a comment -

        We have noticed another issue in the Database module in 1.9.10+. If the viewability is set to a date, the Add entry tab disappears. If the viewability is not limited, the Add entry tab remains visible. I am not sure this issue is related. However, when adding an entry and clicking "Continue" you are directed to the first entry even if that entry has been added by another user.

        Show
        Paul Nijbakker added a comment - We have noticed another issue in the Database module in 1.9.10+. If the viewability is set to a date, the Add entry tab disappears. If the viewability is not limited, the Add entry tab remains visible. I am not sure this issue is related. However, when adding an entry and clicking "Continue" you are directed to the first entry even if that entry has been added by another user.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Hi,

        I think I've found the reason for all the "transition" problems commented above. It was one line left (by mistake) in one recent change there. Once that line is deleted, everything seems to work ok (list=>single, edit=>single, add comment=>single).

        You can test it by deleting this line (566) from mod/data/view.php

        $allrecordids = array_keys($allrecordids);
        

        I'm going to create one pull request to get this fixed by next Wednesday. Thanks for the report. Any feedback will be welcome. Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Hi, I think I've found the reason for all the "transition" problems commented above. It was one line left (by mistake) in one recent change there. Once that line is deleted, everything seems to work ok (list=>single, edit=>single, add comment=>single). You can test it by deleting this line (566) from mod/data/view.php $allrecordids = array_keys($allrecordids); I'm going to create one pull request to get this fixed by next Wednesday. Thanks for the report. Any feedback will be welcome. Ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Resolving this as fixed. PULL-228 has been created and hopefully will be integrated next Wednesday.

        Thanks for the report, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Resolving this as fixed. PULL-228 has been created and hopefully will be integrated next Wednesday. Thanks for the report, ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        (fixing fixfor version)

        Show
        Eloy Lafuente (stronk7) added a comment - (fixing fixfor version)
        Hide
        Paul Nijbakker added a comment -

        Kudos Eloy! Removing that line does solve the issue with the functons referring to the first entry. It did not affect the issue with the viewability setting (Setting any date for Viewability either in the past or future will remove the Add entry tab from view), so this issue is indeed unrelated. However, it is not a very serious issue (limiting viewability is hardly ever needed).

        Show
        Paul Nijbakker added a comment - Kudos Eloy! Removing that line does solve the issue with the functons referring to the first entry. It did not affect the issue with the viewability setting (Setting any date for Viewability either in the past or future will remove the Add entry tab from view), so this issue is indeed unrelated. However, it is not a very serious issue (limiting viewability is hardly ever needed).
        Hide
        Helen Foster added a comment -

        Fix included in this week's 1.9.10+. Thanks everyone.

        Show
        Helen Foster added a comment - Fix included in this week's 1.9.10+. Thanks everyone.

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: