Moodle
  1. Moodle
  2. MDL-32092

Remove dead code from profile_field_textarea

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.4
    • Component/s: Other
    • Labels:
    • Rank:
      38793

      Description

      edit_field_add method in profile_field_textarea declares $cols & $rows:

      $cols = $this->field->param1;
      $rows = $this->field->param2;
      

      but those are never used. They are also not set anywhere - there is no option in UI for custom profile textarea field to set number of columns and rows.
      I think that this is not really necessary to have cols & rows settable - so let's remove that dead code.

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for spotting that.

        Show
        Michael de Raadt added a comment - Thanks for spotting that.
        Hide
        Rossiani Wijaya added a comment -

        Hi Tomasz,

        Thank you for reporting and providing the solution.

        I added patch for 2.2 and 2.3 branches.

        Sending for peer review.

        Show
        Rossiani Wijaya added a comment - Hi Tomasz, Thank you for reporting and providing the solution. I added patch for 2.2 and 2.3 branches. Sending for peer review.
        Hide
        Rossiani Wijaya added a comment -

        Rebasing Tomasz patch.

        Show
        Rossiani Wijaya added a comment - Rebasing Tomasz patch.
        Hide
        Ankit Agarwal added a comment -

        Hi guys,
        Patch looks good to me.
        +1 for integration
        Thanks

        Show
        Ankit Agarwal added a comment - Hi guys, Patch looks good to me. +1 for integration Thanks
        Hide
        Rossiani Wijaya added a comment -

        Thanks Ankit for reviewing.

        Submitting for integration review.

        Show
        Rossiani Wijaya added a comment - Thanks Ankit for reviewing. Submitting for integration review.
        Hide
        Dan Poltawski added a comment -

        Thanks guys.

        As this is an improvement and shouldn't have any visible effect I integrated to master only. Its not worth making changes on stable branches for this.

        Show
        Dan Poltawski added a comment - Thanks guys. As this is an improvement and shouldn't have any visible effect I integrated to master only. Its not worth making changes on stable branches for this.
        Hide
        Mark Nelson added a comment -

        Was able to create a text area with no issues. Passed.

        Show
        Mark Nelson added a comment - Was able to create a text area with no issues. Passed.
        Hide
        Aparup Banerjee added a comment -

        Your issue has dug up some gold.
        It works great i've been told.
        Go forth, be brave, be bold.

        yay! "All your thoughts are belong to everyone."

        Thanks and ciao!

        Show
        Aparup Banerjee added a comment - Your issue has dug up some gold. It works great i've been told. Go forth, be brave, be bold. yay! "All your thoughts are belong to everyone." Thanks and ciao!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: