<?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=Block_layout</id>
	<title>Block layout - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Block_layout"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Block_layout&amp;action=history"/>
	<updated>2026-05-06T16:43:57Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Block_layout&amp;diff=2107&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Block_layout&amp;diff=2107&amp;oldid=prev"/>
		<updated>2024-10-18T06:31:05Z</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;Версия от 06:31, 18 октября 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=Block_layout&amp;diff=2106&amp;oldid=prev</id>
		<title>1&gt;Tsala: /* Default block layout for new courses */</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Block_layout&amp;diff=2106&amp;oldid=prev"/>
		<updated>2023-06-14T13:26:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Default block layout for new courses&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Blocks}}&lt;br /&gt;
==Default block layout for new courses==&lt;br /&gt;
&lt;br /&gt;
To amend the default block layout for new courses, one or more of the following lines (omitting the forward slashes) from &amp;#039;&amp;#039;config-dist.php&amp;#039;&amp;#039; may be added to &amp;#039;&amp;#039;[[Configuration_file|config.php]]&amp;#039;&amp;#039;, amending the block names as required.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 // These variables define DEFAULT block variables for new courses&lt;br /&gt;
 // If this one is set it overrides all others and is the only one used.&lt;br /&gt;
 //      $CFG-&amp;gt;defaultblocks_override =    &amp;#039;participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity&amp;#039;;&lt;br /&gt;
 //&lt;br /&gt;
 // These variables define the specific settings for defined course formats.&lt;br /&gt;
 // They override any settings defined in the formats own config file.&lt;br /&gt;
 //      $CFG-&amp;gt;defaultblocks_site = &amp;#039;site_main_menu,course_list:course_summary,calendar_month&amp;#039;;&lt;br /&gt;
 //      $CFG-&amp;gt;defaultblocks_social =  &amp;#039;participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,course_list&amp;#039;;&lt;br /&gt;
 //      $CFG-&amp;gt;defaultblocks_topics =  &amp;#039;participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity&amp;#039;;&lt;br /&gt;
 //      $CFG-&amp;gt;defaultblocks_weeks =  &amp;#039;participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity&amp;#039;;&lt;br /&gt;
 // These blocks are used when no other default setting is found.&lt;br /&gt;
 //      $CFG-&amp;gt;defaultblocks = &amp;#039;participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity&amp;#039;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, to set the default block layout for topics format courses to People, and Tags on the left, and Messages, Online users and Recent activity on the right, simply add the following line to your &amp;#039;&amp;#039;config.php&amp;#039;&amp;#039; file:&lt;br /&gt;
&lt;br /&gt;
 $CFG-&amp;gt;defaultblocks_topics =  &amp;#039;participants,tags:messages,online_users,recent_activity&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
Note how the colon is used to separate those blocks appearing on the left, from those appearing on the right.&lt;br /&gt;
Additional Note: The Navigation and Administration blocks are not customisable using these settings.&lt;br /&gt;
&lt;br /&gt;
==Resetting the block layout for existing courses==&lt;br /&gt;
&lt;br /&gt;
The block layout for existing courses may be reset by copying the following script into a text file, saving it as &amp;#039;&amp;#039;resetblocks.php&amp;#039;&amp;#039;, copying it into the Moodle root directory, then visiting &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://yourmoodlesite.org/resetblocks.php&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Warning&amp;#039;&amp;#039;&amp;#039;: This script may change the layout of your course pages and also remove blocks from those pages if they have not been specified in the config.php line. Check which of your courses has blocks which are not in the config.php line and be prepared to spend time adding blocks to your course pages again. &amp;#039;&amp;#039;Please note that a database backup is recommended before using the script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 //moodle 3.x&lt;br /&gt;
 require_once(&amp;#039;config.php&amp;#039;);&lt;br /&gt;
 require_once($CFG-&amp;gt;libdir.&amp;#039;/blocklib.php&amp;#039;);&lt;br /&gt;
 $courses = get_courses();//can be feed categoryid to just effect one category&lt;br /&gt;
 foreach($courses as $course) {&lt;br /&gt;
    $context = context_course::instance($course-&amp;gt;id);&lt;br /&gt;
    blocks_delete_all_for_context($context-&amp;gt;id);&lt;br /&gt;
    blocks_add_default_course_blocks($course);&lt;br /&gt;
 } &lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[es:Diseño de bloque]]&lt;br /&gt;
[[ja:ブロックレイアウト]]&lt;/div&gt;</summary>
		<author><name>1&gt;Tsala</name></author>
	</entry>
</feed>