Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copyright policy #1088

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/apis/commonfiles/tag.php/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Here is the core libraries tag.php file for reference:
* $string['tagcollection_mycollection'] = 'My tag collection';
*
* @package core
* @copyright 2015 Marina Glancy
* @copyright Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/apis/commonfiles/version.php/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Here is a template for the plugin's version.php file to copy and paste:

/**
* @package plugintype_pluginname
* @copyright 2020, You Name <[email protected]>
* @copyright You Name <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
51 changes: 25 additions & 26 deletions docs/apis/plugintypes/format/_examples/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,36 @@
use moodle_page;

/**
* Basic renderer for pluginname format.
*
* @copyright 2022 Someone <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renderer extends section_renderer {
* Basic renderer for pluginname format.
*
* @copyright Someone <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renderer extends section_renderer {
// Override any necessary renderer method here.

/**
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param stdClass $course The course entry from DB
* @return string HTML to output.
*/
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param stdClass $course The course entry from DB
* @return string HTML to output.
*/
public function section_title($section, $course) {
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
}

/**
* Generate the section title to be displayed on the section page, without a link.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param int|stdClass $course The course entry from DB
* @return string HTML to output.
*/
* Generate the section title to be displayed on the section page, without a link.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param int|stdClass $course The course entry from DB
* @return string HTML to output.
*/
public function section_title_without_link($section, $course) {
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
}
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
}
}
2 changes: 1 addition & 1 deletion docs/apis/plugintypes/theme/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ All theme options are set within the `config.php` file for the theme.
* Boost config.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart
* @copyright Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/apis/subsystems/admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This is an example of a settings.php file provided by a <tt>local_helloworld</tt
*
* @package local_helloworld
* @category admin
* @copyright 2020 Your Name <[email protected]>
* @copyright Your Name <[email protected]>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/apis/subsystems/external/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For example, if you have written a service function in `[componentfolder]/classe
*
* @package mod_kitchen
* @category external
* @copyright 20XX Your Name
* @copyright Your Name
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/apis/subsystems/privacy/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function check_implements($component, $interface) {
/**
* Helper utility to perform a test export.
*
* @copyright 2018 Andrew Nicols <[email protected]>
* @copyright Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/javascript/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Don't forget to add the built files (the ones in amd/build) to your git commits,
// Standard license block omitted.
/**
* @module block_overview/helloworld
* @copyright 2022 Someone cool
* @copyright Someone cool
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
4 changes: 2 additions & 2 deletions general/community/plugincontribution/checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ See the section [Coding style#Files](../../development/policies/codingstyle/inde

```php
/**
* @copyright 2023 John Smith <[email protected]>
* @copyright based on work by 2020 Mary Stuart <[email protected]>
* @copyright John Smith <[email protected]>
* @copyright based on work by Mary Stuart <[email protected]>
*/
```

Expand Down
22 changes: 16 additions & 6 deletions general/development/policies/codingstyle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ $myarray = [
* Long description for class (if any)...
*
* @package mod_mymodule
* @copyright 2008 Kim Bloggs
* @copyright Kim Bloggs
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class sample_class {
Expand Down Expand Up @@ -1557,12 +1557,22 @@ Also, there are some basic rules about how to use those types:

##### `@copyright`

These include the year and copyright holder (creator) of the original file. Do not change these in existing files!
This tag should include the copyright holder (creator) of the original file. Do not change these in existing files!

The Copyright holder should be the real person who originally authored the file.

:::info Use of AI

If the file was created by an AI assistant, the copyright should be allocated to the individual who instructed the AI assistant.

:::

Please do not include a Copyright Year on new files.

<ValidExample>

```
@copyright 2008 Kim Bloggs
@copyright Kim Bloggs
```

</ValidExample>
Expand Down Expand Up @@ -1810,7 +1820,7 @@ For files containing only one artifact, the file phpdoc block is optional as lon
*
* @package mod_mymodule
* @category backup
* @copyright 2008 Kim Bloggs
* @copyright Kim Bloggs
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
```
Expand All @@ -1829,7 +1839,7 @@ All classes must have a complete docblock like this:
*
* @package mod_mymodule
* @category backup
* @copyright 2008 Kim Bloggs
* @copyright Kim Bloggs
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class policy_issue {
Expand All @@ -1839,7 +1849,7 @@ class policy_issue {

For files containing only one artifact (class, interface, trait, etc.), specifically for all the files within `classes` directories, but also any other file fulfilling the condition anywhere else, it will be enough with the class phpdoc block. The file phpdoc block will be considered optional at all effects, giving to the class one precedence.

The [@package](https://docs.moodle.org/dev/#@package), [@copyright](https://docs.moodle.org/dev/#@copyright) and [@license](https://docs.moodle.org/dev/#@license) tags (and the optional [@category](https://docs.moodle.org/dev/#@category) tag ), as shown in the example above, must be present always in the file (in whichever docblock, but all together).
The [@package](#package), [@copyright](#copyright) and [@license](#license) tags (and the optional [@category](#category) tag ), as shown in the example above, must be present always in the file (in whichever docblock, but all together).

### Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Here is the core libraries tag.php file for reference:
* $string['tagcollection_mycollection'] = 'My tag collection';
*
* @package core
* @copyright 2015 Marina Glancy
* @copyright Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Here is a template for the plugin's version.php file to copy and paste:

/**
* @package plugintype_pluginname
* @copyright 2020, You Name <[email protected]>
* @copyright You Name <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,36 @@
use moodle_page;

/**
* Basic renderer for pluginname format.
*
* @copyright 2022 Someone <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renderer extends section_renderer {
* Basic renderer for pluginname format.
*
* @copyright Someone <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renderer extends section_renderer {
// Override any necessary renderer method here.

/**
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param stdClass $course The course entry from DB
* @return string HTML to output.
*/
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param stdClass $course The course entry from DB
* @return string HTML to output.
*/
public function section_title($section, $course) {
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
}

/**
* Generate the section title to be displayed on the section page, without a link.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param int|stdClass $course The course entry from DB
* @return string HTML to output.
*/
* Generate the section title to be displayed on the section page, without a link.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param int|stdClass $course The course entry from DB
* @return string HTML to output.
*/
public function section_title_without_link($section, $course) {
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
}
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
}
}
2 changes: 1 addition & 1 deletion versioned_docs/version-4.1/apis/subsystems/admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This is an example of a settings.php file provided by a <tt>local_helloworld</tt
*
* @package local_helloworld
* @category admin
* @copyright 2020 Your Name <[email protected]>
* @copyright Your Name <[email protected]>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For example, if you have written a service function in `[componentfolder]/classe
*
* @package mod_kitchen
* @category external
* @copyright 20XX Your Name
* @copyright Your Name
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function check_implements($component, $interface) {
/**
* Helper utility to perform a test export.
*
* @copyright 2018 Andrew Nicols <[email protected]>
* @copyright Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.1/guides/javascript/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Don't forget to add the built files (the ones in amd/build) to your git commits,
// Standard license block omitted.
/**
* @module block_overview/helloworld
* @copyright 2022 Someone cool
* @copyright Someone cool
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Here is the core libraries tag.php file for reference:
* $string['tagcollection_mycollection'] = 'My tag collection';
*
* @package core
* @copyright 2015 Marina Glancy
* @copyright Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Here is a template for the plugin's version.php file to copy and paste:

/**
* @package plugintype_pluginname
* @copyright 2020, You Name <[email protected]>
* @copyright You Name <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,36 @@
use moodle_page;

/**
* Basic renderer for pluginname format.
*
* @copyright 2022 Someone <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renderer extends section_renderer {
* Basic renderer for pluginname format.
*
* @copyright Someone <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renderer extends section_renderer {
// Override any necessary renderer method here.

/**
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param stdClass $course The course entry from DB
* @return string HTML to output.
*/
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param stdClass $course The course entry from DB
* @return string HTML to output.
*/
public function section_title($section, $course) {
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
}

/**
* Generate the section title to be displayed on the section page, without a link.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param int|stdClass $course The course entry from DB
* @return string HTML to output.
*/
* Generate the section title to be displayed on the section page, without a link.
*
* This method is required to enable the inplace section title editor.
*
* @param section_info|stdClass $section The course_section entry from DB
* @param int|stdClass $course The course entry from DB
* @return string HTML to output.
*/
public function section_title_without_link($section, $course) {
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
}
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
}
}
Loading
Loading