<?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=AuthMoodle</id>
	<title>AuthMoodle - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=AuthMoodle"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=AuthMoodle&amp;action=history"/>
	<updated>2026-05-06T23:02:12Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=AuthMoodle&amp;diff=1995&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=AuthMoodle&amp;diff=1995&amp;oldid=prev"/>
		<updated>2024-10-18T06:30:59Z</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:30, 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=AuthMoodle&amp;diff=1994&amp;oldid=prev</id>
		<title>1&gt;Tim@horizoneducationnetwork.org: clean up, typos fixed: wikimedia → Wikimedia, , $ → $, , april → April</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=AuthMoodle&amp;diff=1994&amp;oldid=prev"/>
		<updated>2022-08-11T14:55:32Z</updated>

		<summary type="html">&lt;p&gt;clean up, typos fixed: wikimedia → Wikimedia, , $ → $, , april → April&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=AuthMoodle.php=&lt;br /&gt;
&lt;br /&gt;
(See also [[MediawikiSSO]])&lt;br /&gt;
&lt;br /&gt;
* an extension of mediawiki&amp;#039;s AuthPlugin class so that moodle users can sign in to a mediawiki with the same login/pw&lt;br /&gt;
* used in this https://docs.moodle.org mediawiki production site&lt;br /&gt;
* download from http://moodle.org/file.php/5/moddata/forum/366/196104/AuthMoodle.php&lt;br /&gt;
* first posted by Martin Dougiamas in April 2006 in http://moodle.org/mod/forum/post.php?reply=196104 as an attachment&lt;br /&gt;
&lt;br /&gt;
quoting Martin&amp;#039;s instructions based on the root folder of the Wikimedia installation:&lt;br /&gt;
&lt;br /&gt;
 Save it in extensions/AuthMoodle.php.&lt;br /&gt;
 Then you just put this in LocalSettings.php:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 require_once( &amp;#039;extensions/AuthMoodle.php&amp;#039; );&lt;br /&gt;
 $wgAuth = new AuthMoodle();&lt;br /&gt;
 $wgAuth-&amp;gt;setAuthMoodleTablePrefix(&amp;#039;&amp;#039;);&lt;br /&gt;
 $wgAuth-&amp;gt;setAuthMoodleDBServer(&amp;#039;yoursite.org&amp;#039;);&lt;br /&gt;
 $wgAuth-&amp;gt;setAuthMoodleDBName(&amp;#039;yourdb&amp;#039;);&lt;br /&gt;
 $wgAuth-&amp;gt;setAuthMoodleUser(&amp;#039;yourdbuser&amp;#039;);&lt;br /&gt;
 $wgAuth-&amp;gt;setAuthMoodlePassword(&amp;#039;yourdbpass&amp;#039;);&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bugs with AuthMoodle in mediawiki 1.7==&lt;br /&gt;
* preferences are no longer sticky (they pretend to save but don&amp;#039;t really save)&amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;fix:&amp;#039;&amp;#039;&amp;#039; disable this &amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039; in includes/SpecialPreferences.php around line 290:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;/*&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 if (!$wgAuth-&amp;gt;updateExternalDB($wgUser)) {&lt;br /&gt;
     $this-&amp;gt;mainPrefsForm( wfMsg( &amp;#039;externaldberror&amp;#039; ) );&lt;br /&gt;
     return;&lt;br /&gt;
 }&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;*/&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
* if the moodle database prefix is different from the mediawiki database prefix must match (or be blank)&amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;fix:&amp;#039;&amp;#039;&amp;#039; edit the function tableName in includes/Database.php around line 1310 and 1313:&lt;br /&gt;
&lt;br /&gt;
 function tableName( $name ) {&lt;br /&gt;
    global $wgSharedDB&amp;#039;&amp;#039;&amp;#039;, $wgAuth&amp;#039;&amp;#039;&amp;#039;;&lt;br /&gt;
    # Skip quoted literals&lt;br /&gt;
    if ( $name{0} != &amp;#039;`&amp;#039; ) {&lt;br /&gt;
        if ( $this-&amp;gt;mTablePrefix !== &amp;#039;&amp;#039; &amp;amp;&amp;amp;  strpos( &amp;#039;.&amp;#039;, $name ) === false &lt;br /&gt;
             &amp;#039;&amp;#039;&amp;#039;&amp;amp;&amp;amp; strpos ($name, $wgAuth-&amp;gt;mAuthMoodleTablePrefix) === false&amp;#039;&amp;#039;&amp;#039; ) {&lt;br /&gt;
&lt;br /&gt;
* for mediawiki 1.7, I had to change line 33 to &amp;#039;&amp;#039;&amp;#039;includes/&amp;#039;&amp;#039;&amp;#039;AuthPlugin.php and comment out line 223-226 (refers to a non-existent function)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* bugtracker conversation leading to creation of AuthMoodle http://moodle.org/bugs/bug.php?op=show&amp;amp;bugid=4666&lt;br /&gt;
* usage info: [[MoodleDocs:Authentication]]&lt;br /&gt;
* based probably on http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/auth/&lt;br /&gt;
&lt;br /&gt;
[[Category:Contributed code]]&lt;br /&gt;
[[Category:MoodleDocs]]&lt;br /&gt;
[[Category:Developer]]&lt;/div&gt;</summary>
		<author><name>1&gt;Tim@horizoneducationnetwork.org</name></author>
	</entry>
</feed>