Moodle

Upgrading misstake

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Duplicate
  • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.9, 1.9.1, 1.9.2
  • Fix Version/s: None
  • Component/s: Installation
  • Labels:
    None
  • Environment:
    Windows Vista MySql 5, also on our linux server with mysql database
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

If you upgrade from 1.7 to 1.8 this code seems to delete all grouping relatet tables: (lib/db/upgrade.php)
if ($result && $oldversion < 2007021504) {
if (empty($CFG->enablegroupings) and !empty($CFG->group_version)) { // delete all groupings - they do not work yet :-( // while keeping all existing groups require_once("$CFG->dirroot/group/db/upgrade.php"); undo_groupings(); }
}
But these tables do exist in a fresh 1.8 installation, don't they?

Ok now we upgrade from this 1.8 to 1.9, there is a code segment in lib/db/upgrade.php:
if (table_exists(new XMLDBTable('groups_groupings'))) { /// IF 'groups_groupings' table exists, this is for 1.8.* only. $result = $result && upgrade_18_groups(); } else { /// ELSE, 1.7.*/1.6.*/1.5.* - create 'groupings' and 'groupings_groups' + rename password to enrolmentkey $result = $result && upgrade_17_groups(); }
which causes to treat the group update as one from 1.7 because the grouping tables where deleted in the update before. In result of that, the mdl_groups field "courseid", which was dropped for some strange reason during the update from 1.7 to 1.8 is not crated. Besides, the field password has already been changed to enrolmentkey, which now causes an error. (MDL-15580)

This brakes group functionality.

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

Did you go through the 1.8beta?

Show
Petr Škoda (skodak) added a comment - Did you go through the 1.8beta?
Hide
Dominik Anonymous added a comment -

no it was 1.8.6

Show
Dominik Anonymous added a comment - no it was 1.8.6
Hide
Petr Škoda (skodak) added a comment -

undo_groupings(); does not delete the tables, just records in them

Show
Petr Škoda (skodak) added a comment - undo_groupings(); does not delete the tables, just records in them

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: