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

Documentation for column_class() is incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 3.6, 3.7
    • Fix Version/s: None
    • Component/s: Libraries
    • Labels:
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE

      Description

      The documentation for column_class() in tablelib.php is incorrect:

      /**

      • Sets the given $column index to the given $classname in $this->column_class.
      • @param int $column
      • @param string $classname
      • @return void
        */

      However if you pass an integer value to it, nothing happens.

      Further review of the code and by dumping out the $this->column_class variable shows that $this->column_class is actually an associative array of column names.

      The documentation in the class should be:

      /**

      • Sets the column named $columnname  to the given $classname in $this->column_class.
      • @param string $columnname
      • @param string $classname
      • @return void
        */

      This may apply to other column_* functions in table lib.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mhughes2k Michael Hughes
              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:
              2 Start watching this issue

              Dates

              • Created:
                Updated: