<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AModules</id>
	<title>Development:Modules - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AModules"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Modules&amp;action=history"/>
	<updated>2026-05-06T16:37:21Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:Modules&amp;diff=11380&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Modules&amp;diff=11380&amp;oldid=prev"/>
		<updated>2024-10-21T08:51:29Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 08:51, 21 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:Modules&amp;diff=11379&amp;oldid=prev</id>
		<title>1&gt;Antoinegr49 в 15:14, 18 июня 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Modules&amp;diff=11379&amp;oldid=prev"/>
		<updated>2010-06-18T15:14:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Activity modules === &lt;br /&gt;
&lt;br /&gt;
Activity modules reside in the &amp;#039;&amp;#039;&amp;#039;/mod&amp;#039;&amp;#039;&amp;#039; directory. Each module is in a separate subdirectory and consists of the following mandatory elements (plus extra scripts unique to each module):&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;mod_form.php&amp;#039;&amp;#039; - a form to set up or update an instance of this module&lt;br /&gt;
* &amp;#039;&amp;#039;version.php&amp;#039;&amp;#039; - defines some meta-info&lt;br /&gt;
* &amp;#039;&amp;#039;icon.gif&amp;#039;&amp;#039; - a 16x16 icon for the module&lt;br /&gt;
* &amp;#039;&amp;#039;db/install.xml&amp;#039;&amp;#039; - defines the structure of db tables for all database types. Is used during module installation&lt;br /&gt;
* &amp;#039;&amp;#039;db/upgrade.php&amp;#039;&amp;#039; - defines changes in the structure of db tables. Is used during module upgrade&lt;br /&gt;
* &amp;#039;&amp;#039;db/access.php&amp;#039;&amp;#039; - defines module capabilities&lt;br /&gt;
* &amp;#039;&amp;#039;index.php&amp;#039;&amp;#039; - a page to list all instances in a course&lt;br /&gt;
* &amp;#039;&amp;#039;view.php&amp;#039;&amp;#039; - a page to view a particular instance&lt;br /&gt;
* &amp;#039;&amp;#039;lib.php&amp;#039;&amp;#039; - any/all functions defined by the module should be in here. If the module name is called &amp;#039;&amp;#039;&amp;#039;widget&amp;#039;&amp;#039;&amp;#039;, then the required functions include:&lt;br /&gt;
:* widget_install() - will be called during the installation of the module&lt;br /&gt;
:* widget_add_instance() - code to add a new instance of widget&lt;br /&gt;
:* widget_update_instance() - code to update an existing instance&lt;br /&gt;
:* widget_delete_instance() - code to delete an instance&lt;br /&gt;
:* widget_user_outline() - given an instance, return a summary of a user&amp;#039;s contribution&lt;br /&gt;
:* widget_user_complete() - given an instance, print details of a user&amp;#039;s contribution&lt;br /&gt;
:* widget_get_view_actions() / widget_get_post_actions() - Used by the participation report (course/report/participation/index.php) to classify actions in the logs table.&lt;br /&gt;
:* Other functions available but not required are:&lt;br /&gt;
:** widget_delete_course() - code to clean up anything that would be leftover after all instances are deleted&lt;br /&gt;
:** widget_process_options() - code to pre-process the form data from module settings&lt;br /&gt;
:** [[Development:Implementing Reset course functionality in a module|widget_reset_course_form() and widget_delete_userdata()]] - used to implement [[Reset course]] feature.&lt;br /&gt;
:* To avoid possible conflict, any module functions should be named starting with widget_ and any constants you define should start with WIDGET_&lt;br /&gt;
* &amp;#039;&amp;#039;backuplib.php&amp;#039;&amp;#039; and &amp;#039;&amp;#039;restorelib.php&amp;#039;&amp;#039; (optional)&lt;br /&gt;
* &amp;#039;&amp;#039;settings.php&amp;#039;&amp;#039; or &amp;#039;&amp;#039;settingstree.php&amp;#039;&amp;#039; - (optional) a definition of an admin settings page for this module. mod/assignment/settings.php is a good simple example. mod/quiz/settingstree.php is a more complex example.&lt;br /&gt;
* &amp;#039;&amp;#039;defaults.php&amp;#039;&amp;#039; - lets you easily define default values for your configuration variables. It is included by upgrade_activity_modules in lib/adminlib.php. It should define an array $defaults. These values are then loaded into the config table. Alternatively, if you set $defaults[&amp;#039;_use_config_plugins&amp;#039;] to true, the values are instead loaded into the config_plugins table, which is better practice. See mod/quiz/defaults.php for an example. (This apparently only works with moodle 2.x branch.)&lt;br /&gt;
* &amp;#039;&amp;#039;lang/en_utf8/widget.php&amp;#039;&amp;#039; - (optional) Lastly, each module will have some language files that contain strings for that module.&lt;br /&gt;
&lt;br /&gt;
=== IMPORTANT: ===&lt;br /&gt;
* When creating a new module, the new name of the module must not contain numbers or other special characters!&lt;br /&gt;
&lt;br /&gt;
* You need a &amp;#039;&amp;#039;data base table&amp;#039;&amp;#039; with the same name as your module. This table must have at least three fields: &lt;br /&gt;
*# id &lt;br /&gt;
*# course &lt;br /&gt;
*# name&lt;br /&gt;
&lt;br /&gt;
* You should also make sure that your activity module provides appropriate support for groups and meta-courses. &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Development:Blocks]]&lt;br /&gt;
* [[Development:Backup]]&lt;br /&gt;
* Tracker issue [http://tracker.moodle.org/browse/CONTRIB-52 CONTRIB-52 Improvements to make NEWMODULE really useful] - including download link for new module template supporting roles, formslib etc. (unfinished) &lt;br /&gt;
* http://download.moodle.org/plugins16/mod/NEWMODULE.zip - new module template for versions of Moodle prior to 1.7. Please follow the README instructions inside the zip.&lt;br /&gt;
* [[Development:NEWMODULE_Documentation]]&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=66165 A new resource type: where do I put the language strings?]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=65986 New Module Template Code for Moodle 1.7]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=90154 LEGACY roles and capabilities]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer|Modules]]&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
&lt;br /&gt;
[[es:Módulos de actividades (desarrollador)]]&lt;br /&gt;
[[fr:Modules (développeur)]]&lt;br /&gt;
[[ja:モジュール (開発者)]]&lt;br /&gt;
[[zh:开发:模块_(开发者)]]&lt;br /&gt;
[[de:Entwickler:Module]]&lt;/div&gt;</summary>
		<author><name>1&gt;Antoinegr49</name></author>
	</entry>
</feed>