Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Moodle/mod/print/README.txt
blob: c9d7bf1c9ff95acdf538baef59ec2b0f598d7ec7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
$Id: README.txt,v 1.2.2.2 2009/03/18 14:49:20 mudrd8mz Exp $

HOW TO STARTUP WITH A NEW ACTIVITY MODULE
=========================================

The following steps should get you up and running with
this module template code.

As you are able to read this file, you have probably managed to get this
source code from either the CVS repository or from the zip archive. Well done!

Read this README file.

Make sure you have read this file :-)

Rename the NEWMODULE folder into a lower case name of your module. Make sure
your name is not used by any standard or contributed modules (see
http://cvs.moodle.org/contrib/plugins/mod/ for the list of currently
contributed modules).  

Edit all the files in this directory and its subdirectories and change all the
instances of string "print" to your new module name (eg "widget").
   
Rename the file lang/en_utf8/print.php to widget.php or whatever your
module name is.

Place the widget folder into the /mod folder of your development moodle
directory.

Go to http://localhost/your/moodle/admin/xmldb/ directory. Try to not to visit
the main admin page (Notifications) so the module is not installed yet.  If it
gets installed accidentaly, uninstall it from the database via Manage
activities admin page. You will probably uninstall and reinstall the module
quite often during the early stages of the development.

In XMLDB editor, add all tables, fields and statements needed to implement the
module features. See http://docs.moodle.org/en/Development:Using_XMLDB for
more information. Do not forget to use the [Save] link at the XMLDB main page
so the changes are written into install.xml file. If the link is not active,
the web server process (eg. apache user) does not have permission to write
into mod/widget/db/install.xml file

Visit the admin Notifications page (admin/index.php). The module tables should
get installed.

You can go to Modules > Activities in the Site Administration block. You
should find that this print has been added to the list of recognized
modules.  

You may now proceed to run your own code in an attempt to develop for moodle.
Good luck with that. For help with developing code for moodle, visit the
"Activity modules" developers forum in the online course called "Using Moodle"
at http://moodle.org.


What to do next
---------------

Go through the lib.php, index.php and view.php files.

You will probably want to add some capabilities regarding your module. Look at
db/access.php. Note that you have to increase the version number defined in
version.php to let Moodle update the capabilities information.

If you do any change to the database structure (adding a field, changing the
field definition etc.) use XMLDB editor again. Use the PHP code generated by
XMLDB and push it into db/upgrade.php. Save the change into install.xml (for
fresh installations), increase the version number and go to admin/index.php
again. During upgrade, Moodle calls a function in db/upgrade.php to perform
the DB changes.

Credits for work on this NEWMODULE template
-------------------------------------------
Martin Dougiamas for the original work
Chris B Stones (http://www.welcometochrisworld.com) for revision of the code