From: moodler Date: Tue, 10 Dec 2002 06:17:31 +0000 (+0000) Subject: Documentation improvements for CVS and developing in general X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8736d429d49fd0b3430bbfa1c9ddd85955e66dd8;p=moodle.git Documentation improvements for CVS and developing in general --- diff --git a/doc/contents.html b/doc/contents.html index 4bb1002b0a..5e6248a748 100755 --- a/doc/contents.html +++ b/doc/contents.html @@ -16,6 +16,7 @@
  • Upgrading
  • Teacher Manual
  • Developer Manual +
  • Using CVS
  • Future
  • Credits
  • License diff --git a/doc/contents.php b/doc/contents.php index 56f499e1d5..4fa8615394 100755 --- a/doc/contents.php +++ b/doc/contents.php @@ -15,6 +15,7 @@
  • Upgrading
  • Teacher Manual
  • Developer Manual +
  • Using CVS
  • Future
  • Credits
  • License diff --git a/doc/cvs.html b/doc/cvs.html index 8ddf8a89f2..37b6181b2e 100755 --- a/doc/cvs.html +++ b/doc/cvs.html @@ -1,87 +1,149 @@ - - - - Moodle Docs: How to use CVS - - - - -

    How to use CVS

    -
    -

    CVS is the Concurrent Versioning System. It's a commonly used way -of storing source code because it keeps versions of all files so -that nothing is ever lost, and usage by different people is tracked.

    - -

    To use Moodle's CVS archive (as a developer) from a Unix machine, you first - need to have an account on Sourceforge. For - the example, let's assume your username is myusername and your - password is mypassword. Secondly, you need to contact me (Martin Dougiamas) to get write access - to particular directories.

    -

    With that done, you should have all the permissions you need, so you just need - to set up your machine and download the current sources so you can start working - on them.

    -

    Sourceforge CVS uses ssh as a transport layer for security, so you will have - to set this CVS_RSH environment variable in your Unix shell:

    -
    -
    setenv CVS_RSH ssh (for csh, tcsh etc)
    - -
    export CVS_RSH=ssh (for sh, bash etc)
    - -
    -

    It's best to put this in your .bashrc or .cshrc so you don't have to type it - all the time. Then, check out Moodle using this (all one line):

    -
    -
    cvs -z3 -d:ext:myusername@cvs.moodle.sourceforge.net:/cvsroot/moodle co moodle
    - -
    -

    Don't try to do run this first CVS command into an existing moodle directory - - start fresh with a new directory.

    -

    Note that you will be prompted for mypassword with each CVS - command. To avoid this, follow the Sourceforge - directions about using authorized keys.

    -

    Now, you should have a new 'moodle' directory. You can rename it and move it - around if you like. Go into it:

    -
    -
    cd moodle 
    - -
    -

    All the latest Moodle files should be in there. You can now change files in - your copy. To compare your files against the main CVS copy on the server use - cvs diff, eg:

    -
    -
    cvs diff -c config-dist.php
    +
    +
    +Moodle Docs: How to use CVS
    +
    +
    +
    +

    Using CVS to access and update Moodle source code

    +
    +

    CVS is the Concurrent Versioning System. It's a commonly used way of storing + source code because it keeps versions of all files so that nothing is ever + lost, and usage by different people is tracked. It also provides ways to merge + code if two or more people are working on the same file. All code and all + versions are stored on a central server (in this case, at Sourceforge). +

    +

    To use Moodle's CVS archive (as a developer) from a Unix machine, you first + need to have an account on Sourceforge. For + the examples on this page, let's assume your username is myusername + and your password is mypassword. + Once you have an account, you need to contact me (Martin Dougiamas) to get write access to particular + directories.

    +

    To avoid being prompted for mypassword + every time you run a CVS command, follow the Sourceforge + directions for using authorized keys. This step is optional, but it can + make your CVS experience a lot nicer.

    +

    With that done, you should have all the permissions you need, so you just + need to set up your machine and download the current sources so you can start + working on them. Below are instructions for Unix and Windows systems.

    +

    1. Using CVS on Unix

    +
    +

    Sourceforge CVS uses ssh as a transport layer for security, so you will + have to set this CVS_RSH environment variable in your Unix shell:

    +
    +
    setenv CVS_RSH ssh (for csh, tcsh etc)
    +
    export CVS_RSH=ssh (for sh, bash etc)
    +
    +

    It's best to put this in your .bashrc or .cshrc so you don't have to type + it all the time. Then, check out Moodle using this (all one line):

    +
    +
    cvs -z3 -d:ext:myusername@cvs.moodle.sourceforge.net:/cvsroot/moodle co moodle
    +
    +

    Don't try to do run this first CVS command into an existing moodle directory + - start fresh with a new directory.

    +

    Note that you will be prompted for mypassword + for each command unless you set up authorized + keys

    +

    Now, you should have a new 'moodle' directory. You can rename it and move + it around if you like. Go into it:

    +
    +
    cd moodle 
    +
    +

    All the latest Moodle files should be in there. You can now change files + in your copy. To compare your files against the main CVS copy on the server + use cvs diff, eg:

    +
    +
    cvs diff -c config-dist.php
     cvs diff -c lang
    - -
    -

    To fetch the latest updates from the server use:

    -
    -
    cvs update -dP 
    - -
    -

    To copy your new files back to the server you would do:

    -
    -
    cd lang/ca 
    +    
    +

    To fetch the latest updates from the server use:

    +
    +
    cvs update -dP 
    +
    +

    To copy your new files back to the server you would do something like: +

    +
    +
    cd lang/ca 
     cvs commit 
    - -
    -

    You will be prompted to add some comments (depends on your default text editor) - ... add a comment and close the editor ... the files will be sent to Sourceforge - and stored. Done!

    -

    To save more time you can put default arguments into a file called .cvsrc in - your home directory. For example, mine contains:

    -
    -
    diff -c 
    +    
    +

    You will be prompted to add some comments (depends on your default text + editor) ... add a meangingful comment and close the editor ... the files + will be sent to Sourceforge and stored. Done!

    +

    To save more time you can put default arguments into a file called .cvsrc + in your home directory. For example, mine contains:

    +
    +
    diff -c 
     update -dP 
    - +
    +

    Try 'cvs help' for more details ...

    +

     

    +
    +

    2. Using CVS on Windows

    +
    +

    These instructions are based on notes provided by Mitsuhiro Yoshida <mits@mitstek.com>.

    +

    Firstly, download and install WinCVS.

    +
    +

    https://sourceforge.net/project/showfiles.php?group_id=10072

    +
    +

    Secondly, download sfsetup for SourceForge ssh access, install it and reboot + Windows.

    +
    +

    http://sourceforge.net/projects/sfsetup/

    +
    +

    Next, configure WinCVS. Launch it, and select Admin -> Preferences. + Then change them as follows:

    +
    +

    [General]
    + CVSROOT data:
    + Authentication: ssh
    + Path: /cvsroot/moodle
    + Host address: cvs.moodle.sourceforge.net
    + User name: myusername
    + CVSROOT: myusername@cvs.moodle.sourceforge.net:/cvsroot/moodle

    +

    [Globals]
    + Checkout rad-only: uncheck
    + Supply control when adding files: check
    + Quiet mode: uncheck
    + TCP/IP compression: check and select 9
    + Dirty files support: check
    + Prune(remove) empty directories: check
    + Disable splash screen: uncheck

    +
    +

    Congratulations, WinCVS is set up. Now, you should check out a complete + working copy of the Moodle course code:

    +
      +
    1. Select 'Create -> checkout'
    2. +
    3. For the setting 'Module name and path on the server", type "moodle", + then click OK.
    4. +
    5. Type in mypassword and + press Enter in the DOS window.
    6. +
    +

    After this first checkout, you can fetch updated files from the CVS server + like this:

    +
      +
    1. Select folders or files you want to update
    2. +
    3. Press right mouse button and select 'Update selection'
    4. +
    5. Press OK button
    6. +
    7. Type in mypassword and + press Enter in the DOS window.
    8. +
    +

    After modifying files, you can commit them back to the CVS server like + this:

    +
      +
    1. Select folders or files you want to commit
    2. +
    3. Press right button and select 'Commit selection'
    4. +
    5. Press OK button
    6. +
    7. Type in a meaningful comment and press OK button.
    8. +
    9. Type in mypassword and + press Enter in the DOS window.
    10. +
    +
    +

     

    +

    Good luck!

    +

     

    -

    Try 'cvs help' for more details ...

    -

     

    - -
    -

    Moodle Documentation

    -

    Version: $Id: features.html,v 1.2 2001/12/09 - 10:34:19 martin Exp $

    - - - +

    Moodle Documentation

    +

    Version: $Id: features.html,v 1.2 2001/12/09 + 10:34:19 martin Exp $

    + + diff --git a/doc/developer.html b/doc/developer.html index 6e193376a4..c5640a8ec3 100755 --- a/doc/developer.html +++ b/doc/developer.html @@ -1,30 +1,30 @@ - - Moodle Docs: Developers Manual - - + + Moodle Docs: Developers Manual + + - -

    Developers Manual

    -

    This document describes some of Moodle's design and how you can contribute.

    -

    Sections in this document:

    -
      -
    1. Moodle architecture
    2. -
    3. How you can contribute + +

      Developers Manual

      +

      This document describes some of Moodle's design and how you can contribute.

      +

      Sections in this document:

      +
        +
      1. Moodle architecture
      2. +
      3. How you can contribute -
      4. -
      -

       

      -

      1. Moodle architecture

      -

      From a system administrator's perspective, Moodle has been designed according - to the following criteria:

      +
    4. +
    +

     

    +

    1. Moodle architecture

    +

    From a system administrator's perspective, Moodle has been designed according + to the following criteria:

    1. Moodle should run on the widest variety of platforms

      @@ -79,15 +79,15 @@ interface formatting (so that it can be integrated visually into other web sites).

     

    -

    2. How you can contribute

    -

    As mentioned above, Moodle has a number of features that are modular. Even - if you are not a programmer there are things you can change or help with.

    -

    Learning Activities

    +

    2. How you can contribute

    +

    As mentioned above, Moodle has a number of features that are modular. Even + if you are not a programmer there are things you can change or help with.

    +

    Learning Activities

    These are by far the most important modules, and reside in the 'mod' directory. - There are seven default modules: assignment, choice, forum, journal, quiz, resource, - and survey. Each module is in a separate subdirectory and consists of the - following mandatory elements (plus extra scripts unique to each module):

    + There are seven default modules: assignment, choice, forum, journal, quiz, + resource, and survey. Each module is in a separate subdirectory and consists + of the following mandatory elements (plus extra scripts unique to each module):

    • mod.html: a form to set up or update an instance of this module
    • version.php: defines some meta-info and provides upgrading code
    • @@ -113,18 +113,42 @@
  • Lastly, each module will have some language files that contain strings - for that module. See below.
    -
  • + for that module. See below. +

    The easiest way to start a new learning activity module is to use the template + in mod/newmodule_template.zip. + Unzip it and follow the README inside.

    +

    You might also like to post first in the Activities + modules forum on Using Moodle.

    +

     

    Themes

    Themes (or skins) define the look of a site. A number of simple themes are provided in the main distribution, but you may want to copy one of these and customise it to suit your own needs (eg local logo, colours, styles, graphics - etc)

    -

    Each theme is in a subdirectory of the "theme" directory. You can - copy the "standard" theme as a template.
    + etc). Each theme is in a subdirectory of the "theme" directory. + You can copy the "standard" theme or any other theme as a template + for your own.

    +

    Here is what each of the files does:

    +
      +
    • config.php: defines your theme colours used throughout + the site
    • +
    • styles.php: the style sheet, containing CSS definitions + for standard HTML elements as well as many Moodle elements.
    • +
    • header.html: Included at the top of each page. This is + what you need to edit to add a logo at the top of pages, for example.
    • +
    • footer.html: Included at the bottom of each page.
    • +
    +

    Note that Moodle upgrades may break themes slightly, so check the + release notes carefully if you are using a custom theme.

    +

    In particular, Moodle 2.0 will have a completely new display system, based + on a XSL transformations of XML output from Moodle. It is likely that the + themes for this will be a completely different format, but the advantage will + be a much higher possible degree of customisation (including moving elements + around the page).

    +

    More discussion about this in the Themes + forum on Using Moodle.

    Languages

    @@ -167,6 +191,15 @@

    and for modules:

    helpbutton("forumtypes", "Forum types", "forum");

    +

    Note that you can edit languages online, using the administration web tools + under "Check this language". This makes it easy to not to only create + new languages but to refine existing ones. If you are starting a new language, + please contact me, Martin Dougiamas.

    +

    You might also like to post in the Languages + forum on Using Moodle.

    +

    If you are maintaining a language an ongoing basis, I can give you CVS + write access to the Moodle source code so that you can directly maintain + the files.


    Database Schemas

    @@ -182,12 +215,13 @@ and inside the db subdirectory of each module.

    Currently, only MySQL is supported because that's what I know. If you are familiar with another database (especially open source databases) and are - willing to help port the MySQL schema, please get in contact with me (martin@moodle.com).

    + willing to help port the MySQL schema, please get in contact with me (Martin + Dougiamas).

     

    Course Formats

    -

    Moodle 1.0 supports three different course formats: weekly, topics and social. +

    Moodle 1.x supports three different course formats: weekly, topics and social.

    These are a little more connected to the rest of the code (and hence, less "pluggable") but it is still quite easy to add new ones.

    @@ -199,8 +233,8 @@

    Documentation and articles

    If you feel like writing a tutorial, an article, an academic paper or anything - else about Moodle, please do! Put it on the web and make sure you include - links to http://moodle.com/

    + else about Moodle, please do!

    +

    Put it on the web and make sure you include links to http://moodle.com/

     

    Participating in the bug tracker

    @@ -230,8 +264,8 @@

     

    -

    Moodle Documentation

    -

    Version: $Id: developer.html,v 1.2 2001/12/09 - 10:34:19 martin Exp $

    +

    Moodle Documentation

    +

    Version: $Id: developer.html,v 1.2 2001/12/09 + 10:34:19 martin Exp $

    - +