Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Moodle for Mobiles installation.

Moodle for Mobiles installation: Difference between revisions

From MoodleDocs
(new page)
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Moodle For Mobiles}}
===Install Moodle 1.9===
===Install Moodle 1.9===


The latest version of Moodle for Mobiles works with Moodle 1.9.
The latest version of Moodle for Mobiles works with Moodle 1.9.
====Moodle for Mobiles for Moodle 1.6 is still available====
You can still get the old version of Moodle for Mobiles from this url http://download.moodle.org/patches16/mobile.zip This older version works with Moodle 1.6. Instructions for installation of the older version are included in the downloadable package in a file called README.txt


====Optionally install the Japanese language pack.====
====Optionally install the Japanese language pack.====
Line 16: Line 21:
====Moodle Settings.====
====Moodle Settings.====


Set the site theme to standardwhite or standard. Or to use theme see instructions below (4).
Set the site theme to standardwhite or standard. Or to use another theme see instructions below (4).


===Download Moodle for Mobiles Code===
===Download Moodle for Mobiles Code===
Line 26: Line 31:
===Then make some small additions to Moodle code===
===Then make some small additions to Moodle code===


1. Add the following line to yourmoodledirroot/course/lib.php line 2 :
1. Add the following line marked with a plus to yourmoodledirroot/course/lib.php at line 2, immediately after the line starting  '<?php  // $Id:'. The exact contents of this line starting  '<?php  // $Id:' will depend on when you updated your copy of Moodle 1.9. Delete the + sign it is just used to mark what you need to add :
 
<pre>
<?php  // $Id: lib.php,v 1.538.2.80 2010/02/25 10:16:15 stronk7 Exp $
+  include_once($CFG->mfm_dirroot.'/course/mfmbuttons.php');
  // Library of useful functions
</pre>


    include_once($CFG->mfm_dirroot.'/course/mfmbuttons.php');


2. Add the following line marked with a plus to the same file (yourmoodledirroot/course/lib.php) around line 1389 (immediately after the line starting  'echo make_editing_buttons'). Delete the + sign it is just used to mark what you need to add :
2. Add the following line marked with a plus to the same file (yourmoodledirroot/course/lib.php) around line 1389 (immediately after the line starting  'echo make_editing_buttons'). Delete the + sign it is just used to mark what you need to add :
Line 43: Line 53:


3. If you are using a theme other than standard or standardwhite then you need to make a copy of customscripts/theme/standard or customscripts/theme/standardwhite and rename it to the same name as the theme you want to use.
3. If you are using a theme other than standard or standardwhite then you need to make a copy of customscripts/theme/standard or customscripts/theme/standardwhite and rename it to the same name as the theme you want to use.
4. In yourmoodlewwwroot/config.php replace :
4. In yourmoodlewwwroot/config.php replace :


Line 50: Line 61:


     require_once($CFG->dirroot.'/mobile/customscripts/lib/setup.php');
     require_once($CFG->dirroot.'/mobile/customscripts/lib/setup.php');
5. Finally go to yourmoodleroot.com/admin/ on your mobile phone to set up the database (you will need to log in as an admin to access this page).
5. Finally go to yourmoodleroot.com/admin/ on your mobile phone to have the code automatically set up the extra required storage in your moodle database (you will need to log in as an admin to access this page).
[[Category:Contributed code]]
[[Category:Moodle For Mobiles]]

Latest revision as of 05:30, 19 April 2010

Install Moodle 1.9

The latest version of Moodle for Mobiles works with Moodle 1.9.

Moodle for Mobiles for Moodle 1.6 is still available

You can still get the old version of Moodle for Mobiles from this url http://download.moodle.org/patches16/mobile.zip This older version works with Moodle 1.6. Instructions for installation of the older version are included in the downloadable package in a file called README.txt

Optionally install the Japanese language pack.

You will need to check out the Japanese language pack (or download it with the new lang pack download admin facility) as well - only the english language pack is now included in the main moodle distribution.

Optionally install the feedback module.

Also if you want to use Andreas Grabs' feedback module the latest version is available from this url :

http://download.moodle.org/plugins/mod/feedback.zip

Moodle Settings.

Set the site theme to standardwhite or standard. Or to use another theme see instructions below (4).

Download Moodle for Mobiles Code

Download the Moodle for Mobiles code from here : http://download.moodle.org/patches/mobile.zip

Install the contents of the package in yourmoodledirroot/mobile/

Then make some small additions to Moodle code

1. Add the following line marked with a plus to yourmoodledirroot/course/lib.php at line 2, immediately after the line starting '<?php // $Id:'. The exact contents of this line starting '<?php // $Id:' will depend on when you updated your copy of Moodle 1.9. Delete the + sign it is just used to mark what you need to add :

<?php  // $Id: lib.php,v 1.538.2.80 2010/02/25 10:16:15 stronk7 Exp $
+  include_once($CFG->mfm_dirroot.'/course/mfmbuttons.php');
   // Library of useful functions


2. Add the following line marked with a plus to the same file (yourmoodledirroot/course/lib.php) around line 1389 (immediately after the line starting 'echo make_editing_buttons'). Delete the + sign it is just used to mark what you need to add :

                         }
                         echo '  ';
                         echo make_editing_buttons($mod, $absolute, true, $mod->indent, $section->section);
    +                    echo make_mobile_enable_button($mod, $absolute, $section->section);
                     }
                     echo "</td>";
                     echo "</tr>";

3. If you are using a theme other than standard or standardwhite then you need to make a copy of customscripts/theme/standard or customscripts/theme/standardwhite and rename it to the same name as the theme you want to use.

4. In yourmoodlewwwroot/config.php replace :

   require_once("$CFG->dirroot/lib/setup.php");

with

   require_once($CFG->dirroot.'/mobile/customscripts/lib/setup.php');

5. Finally go to yourmoodleroot.com/admin/ on your mobile phone to have the code automatically set up the extra required storage in your moodle database (you will need to log in as an admin to access this page).