Moodle
  1. Moodle
  2. MDL-13909

new user profile fields cannot be positionned properly on the signup screen, after upgrading from 1.8.2 to 1.9

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.8.5, 1.9.1
    • Component/s: Other
    • Labels:
      None
    • Environment:
      CentOs 5, mysql 5.0.22, php 5.1.6, moodle 1.9 (build 20080306), Apache 2 (not sure exactly which version)
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      30426

      Description

      I've added a number of user profile fields (34 of them!)(using Admin > Users > Accounts > User profile fields), have found that I put them in in the wrong order, and and am now trying to re-order them by clicking the up and down arrows next to them.

      Unfortunately, this isn't working as expected, and it's making it very hard to get them in the right order. Here is some of the unexpected behaviour:

      -one click of the up arrow will skip a field past several other fields
      -a field will be able to move only so far up in the order of fields, but no further.

      All of the fields are "Menu of choices" types, and have the "Description of the field" filled, and a default value.

      Many / most of the fields have the following settings:

      Is this field required? YES

      Is this field locked? NO

      Should the data be unique? NO

      Display on signup page? YES

      Who is this field visible to? VISIBLE TO USER

      Category: "Other information"

      Our sysadmin has kindly supplied a listing of mdl_user_info_field, part of which I've copied below.

      It looks like some of the new fields are tied for sort-order.

      Also, the field that could not be moved up beyond a certain point (sortorder=23, id=34), seems to have arrived at a discontinuation in the sort-order numbers - it's at number 23, and the next one up in the table is 20.

      This occured when attempted in both Firefox 2 and IE 6.

      The list below contains the complete set of all the new profile fields in the system - the id numbers are not contiguous because some fields were deleted.

      id shortname datatype sortorder
      2 discipline menu 2
      3 nonSocSci menu 3
      4 DisciplinesOther text 4
      30 qualification menu 10
      32 IntendedUse menu 11
      14 descStats menu 12
      15 tTest menu 13
      16 anova menu 14
      17 linear menu 15
      18 multipleRegression menu 16
      19 logisitcRegression menu 17
      20 multinomialLogit menu 18
      23 orderedLogit menu 19
      22 factorAnalysis menu 20
      34 statsExperience menu 23
      35 survivalAnalysis menu 24
      12 department text 25
      13 howHear menu 25
      36 structuralEqnModelling menu 25
      31 tSeries menu 26
      37 integration menu 26
      38 differentiation menu 26
      39 matrixAlegebra menu 26
      40 probDistributions menu 26
      9 attendedWorkshop menu 27
      10 position menu 27
      11 university text 27
      8 ownMLwiN menu 28
      7 researchInterests text 29
      41 expVariance menu 30
      42 maxLikelihood menu 31
      43 numericalProc menu 32
      44 bayesianInf menu 33
      45 mcmc menu 34

      Our sysadmin manually updated the sortorder numbers so that they ran in sequence and with no tied positions, starting at 1. This seemed to cure the problem - it became possible to click an up arrow on a field at the bottom of the list of fields, and move it one position up, and repeate until it got to the top of the list of fields.

        Activity

        Hide
        Shane Elliott added a comment -

        I've done some initial testing. The sort orders seem to be ok when working with one category. However, when a field is moved into a second category, the sortorder seems to go "out of whack" on the initial category.

        So I suspect this is a problem in profile_reorder_fields() in user/profile/definelib.php

        Show
        Shane Elliott added a comment - I've done some initial testing. The sort orders seem to be ok when working with one category. However, when a field is moved into a second category, the sortorder seems to go "out of whack" on the initial category. So I suspect this is a problem in profile_reorder_fields() in user/profile/definelib.php
        Hide
        Shane Elliott added a comment -

        Found a couple of typos in the profile_reorder_fields() function in user/profile/definelib.php

        Fixed in CVS.

        Show
        Shane Elliott added a comment - Found a couple of typos in the profile_reorder_fields() function in user/profile/definelib.php Fixed in CVS.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Verified. Closing. Thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Verified. Closing. Thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: