<?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=Filter_ws</id>
	<title>Filter ws - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Filter_ws"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Filter_ws&amp;action=history"/>
	<updated>2026-05-08T07:33:47Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Filter_ws&amp;diff=8917&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Filter_ws&amp;diff=8917&amp;oldid=prev"/>
		<updated>2024-10-18T06:54:50Z</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:54, 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=Filter_ws&amp;diff=8916&amp;oldid=prev</id>
		<title>1&gt;Dpalou: /* Installation */</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Filter_ws&amp;diff=8916&amp;oldid=prev"/>
		<updated>2019-06-17T06:14:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Installation&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Introduction==&lt;br /&gt;
With the WebService filter plugin you can choose if some content should be visible only in web (browser) or only in a WebService client like the Moodle apps. The main purpose of this plugin is to be able to display/hide some content only for the Moodle app.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
You can download this plugin from [https://moodle.org/plugins/filter_ws the Moodle plugins directory] or from [https://github.com/dpalou/moodle-filter_ws the source repository]. It can be installed using any of the methods supported by Moodle. If you are unsure, please visit [https://docs.moodle.org/en/Installing_plugins#Installing_a_plugin this page].&lt;br /&gt;
&lt;br /&gt;
To install it manually, unzip the plugin in the moodle .../filter/ directory.&lt;br /&gt;
&lt;br /&gt;
==Enabling/Disabling the filter on your site==&lt;br /&gt;
The WebService filter must be enabled before it can be used on your Moodle site (it is disabled by default, after installation). To enable (or disable) the plugin site-wide, visit Site Administration &amp;gt; Plugins &amp;gt; Filters &amp;gt; Manage Filters, locate the &amp;#039;WebService&amp;#039; filter and click on the dropdown box to enable it (or disable it).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to use==&lt;br /&gt;
You need to enclose the content you want to filter between {fws} tags. Inside the opening {fws} you should specify if you want the content to be displayed in browser (web), in a WS client (ws) or in both of them (any).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    {fws web}content only for web{fws}&lt;br /&gt;
    {fws ws}content only for ws{fws}&lt;br /&gt;
    {fws any}content for any request{fws}&lt;br /&gt;
  &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: We edit a SCORM description and put the content in the following screenshot:&lt;br /&gt;
&lt;br /&gt;
[[File:filterws_editor.png]]&lt;br /&gt;
&lt;br /&gt;
You can see we have 3 pieces of content. The first one doesn&amp;#039;t have any special tag, so it will be displayed everywhere. The second block has the &amp;quot;web&amp;quot; keyword, so it will only be displayed if the user is using a browser. Finally, the last block will only be displayed in a WS client (in our case, the Moodle app). You can see the result in the following screenshots:&lt;br /&gt;
&lt;br /&gt;
[[File:filterws_web.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
[[File:filterws_app.png|320px]]&lt;br /&gt;
&lt;br /&gt;
===Filtering by User Agent===&lt;br /&gt;
The filter also lets you filter by User Agent, so the content will only be displayed if the User Agent accessing the content contains a certain text. To do so, you need to add a&amp;#039;ua=&amp;quot;MY_REGEXP&amp;quot;&amp;#039; attribute to the {fws} tag, where &amp;#039;&amp;#039;MY_REGEXP&amp;#039;&amp;#039; is the regular expression you want to check (without starting and ending slashes). Please notice that the regular expression is case sensitive. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    {fws ws ua=&amp;quot;MoodleMobile\s?$&amp;quot; }content only for the official Moodle app{fws}&lt;br /&gt;
    {fws any ua=&amp;quot;iPhone|iPad|iPod&amp;quot;}content only for iOS devices{fws}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Atto plugin==&lt;br /&gt;
There is a plugin to add this filter using an Atto button. You can see the documentation [https://docs.moodle.org/en/index.php?title=atto_filterws in here].&lt;/div&gt;</summary>
		<author><name>1&gt;Dpalou</name></author>
	</entry>
</feed>