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

Can't change value of Availability (moodle/course:visibility) in course settings page

    XMLWordPrintable

    Details

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

      Description

      In cvshead, the edit settings page for a course (/course/edit.php), you can't change the value of "Availability." If you change it and save, it doesn't stick. You can change with the eye icon in the Add/Edit Category/Courses page.

      The culprit seems to be in courses/lib.php on line 3561:

       
      // init visible flags
      if (isset($data->visible)) {
              $data->visible = $oldcourse->visible;
      }

      If you set something, it just reverts it. Changing it to !isset($data->visible).... seems to work, but I'm not sure what was intended here.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              jk3us Jay Knight
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10