Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25564

Comments do not display on database when javascript disabled (fix included)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      Switch off javascript
      View a database entry
      Click on 'Show comments'

      Expected result: comments shown for that entry
      Actual result: switches back to list view for that database activity

      Reason: $PAGE->url set incorrectly

      Fix:
      Find the $PAGE->set_url line in mod/data/view.php and change it to:

      $urlparams = array('d' => $data->id);
      if ($record)

      { $urlparams['rid'] = $record->id; }

      if ($page)

      { $urlparams['page'] = $page; }

      if ($mode)

      { $urlparams['mode'] = $mode; }

      if ($filter)

      { $urlparams['filter'] = $filter; }

      $PAGE->set_url('/mod/data/view.php', $urlparams);

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dongsheng Dongsheng Cai added a comment -

            Hi,Davo

            Thanks for the fix, tested and committed.

            Show
            dongsheng Dongsheng Cai added a comment - Hi,Davo Thanks for the fix, tested and committed.
            Hide
            dongsheng Dongsheng Cai added a comment -

            Fixed, thanks to Davo's fix.

            Show
            dongsheng Dongsheng Cai added a comment - Fixed, thanks to Davo's fix.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: