Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      35958

      Description

      Sam,

      The attached theme is a version of nonzero with a settings page created by Dietmar Wagner. Could you please have a look at the underlying code and tell me if it's clean enough to include in the core?

        Activity

        Hide
        Sam Hemelryk added a comment -

        Hi Patrick,

        Just had a look now everything looks fine

        Have you been told about the boilerplate and php docs that we put at the top of all core files within Moodle?
        Have a read of http://docs.moodle.org/en/Development:Coding_style#Documentation_and_comments if you haven't.

        Basically you need to add the license notice and a phpdoc section to the top of each page. You can just copy the license notice from the files section of that doc.
        The phpdoc section should describe the change, provide the name of the copyright owner and define the license.
        The following is an example of what you might add for the above settings file.

        moodle/theme/nonzero/settings.php
        <?php
        
        // This file is part of Moodle - http://moodle.org/
        //
        // Moodle is free software: you can redistribute it and/or modify
        // it under the terms of the GNU General Public License as published by
        // the Free Software Foundation, either version 3 of the License, or
        // (at your option) any later version.
        //
        // Moodle is distributed in the hope that it will be useful,
        // but WITHOUT ANY WARRANTY; without even the implied warranty of
        // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        // GNU General Public License for more details.
        //
        // You should have received a copy of the GNU General Public License
        // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
        
        /**
         * This file contains the settings for the non-zero theme.
         *
         * Currently you can set the following settings:
         *    - Region pre width
         *    - Region post width
         *    - Some custom CSS
         *
         * @package  moodlecore
         * @copyright 2010 Dietmar Wagner
         * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
         */
        

        Something like this should be added to all of the PHP files you add to core, in the case above I used Dietmar as the copyright holder because you mention that he provided this page, however for the files you create+add yourself put your name down there. Some people also put an email address as well, that's up to you. For more examples check out the base theme's config.php or any of the other php files in moodlecore.

        If you have any questions let me know

        Cheers
        Sam

        Show
        Sam Hemelryk added a comment - Hi Patrick, Just had a look now everything looks fine Have you been told about the boilerplate and php docs that we put at the top of all core files within Moodle? Have a read of http://docs.moodle.org/en/Development:Coding_style#Documentation_and_comments if you haven't. Basically you need to add the license notice and a phpdoc section to the top of each page. You can just copy the license notice from the files section of that doc. The phpdoc section should describe the change, provide the name of the copyright owner and define the license. The following is an example of what you might add for the above settings file. moodle/theme/nonzero/settings.php <?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * This file contains the settings for the non-zero theme. * * Currently you can set the following settings: * - Region pre width * - Region post width * - Some custom CSS * * @ package moodlecore * @copyright 2010 Dietmar Wagner * @license http: //www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ Something like this should be added to all of the PHP files you add to core, in the case above I used Dietmar as the copyright holder because you mention that he provided this page, however for the files you create+add yourself put your name down there. Some people also put an email address as well, that's up to you. For more examples check out the base theme's config.php or any of the other php files in moodlecore. If you have any questions let me know Cheers Sam
        Hide
        Patrick Malley added a comment -

        Was wondering about that today. Will do.

        Also, I'll add this to Nonzero and commit it tomorrow.

        Thanks for your help.

        Show
        Patrick Malley added a comment - Was wondering about that today. Will do. Also, I'll add this to Nonzero and commit it tomorrow. Thanks for your help.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: