id)) { // add student override in this instance $context = get_context_instance(CONTEXT_MODULE, $cm->id); // find all roles with legacy:student if ($studentroles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW)) { foreach ($studentroles as $studentrole) { assign_capability('mod/glossary:write', CAP_PREVENT, $studentrole->id, $context->id); } } } } } /// Define field studentcanpost to be dropped from glossary $table = new XMLDBTable('glossary'); $field = new XMLDBField('studentcanpost'); /// Launch drop field studentcanpost $result = $result && drop_field($table, $field); } if ($result && $oldversion < 2007072200) { require_once($CFG->dirroot.'/mod/glossary/lib.php'); // too much debug output $db->debug = false; glossary_update_grades(); $db->debug = true; } //===== 1.9.0 upgrade line ======// return $result; } ?>