Trivial changes that were hanging around
This commit is contained in:
@@ -28,9 +28,8 @@
|
||||
using require_login() and isadmin(), isteacher(), iscreator() or isstudent().</li>
|
||||
<li class="spaced">All access to databases should use the functions in lib/datalib.php
|
||||
whenever possible - this allows compatibility across a wide range of databases.
|
||||
You should find that almost anything is possible using these functions. Any
|
||||
other SQL statements should be: cross-platform; restricted to specific functions
|
||||
within your code (usally a lib.php file); and clearly marked.</li>
|
||||
You should find that almost anything is possible using these functions. If you must write SQL code then make sure it is: cross-platform; restricted to specific functions
|
||||
within your code (usually a lib.php file); and clearly marked.</li>
|
||||
<li class="spaced">Don't create or use global variables except for the standard
|
||||
$CFG, $SESSION, $THEME and $USER.</li>
|
||||
<li class="spaced">All variables should be initialised or at least tested for
|
||||
@@ -52,9 +51,11 @@
|
||||
Don't use tabs AT ALL. </li>
|
||||
<li class="spaced"><strong>Variable names</strong> should always be easy-to-read,
|
||||
meaningful lowercase English words. If you really need more than one word
|
||||
then run them together, but keep them short as possible.
|
||||
then run them together, but keep them short as possible. Use
|
||||
plural names for arrays of objects.
|
||||
<p class="examplecode"><font color="#006600">GOOD: $quiz<br>
|
||||
GOOD: $errorstring<br>
|
||||
GOOD: $assignments (for an array of objects)<br>
|
||||
GOOD: $i (but only in little loops)<br>
|
||||
<br />
|
||||
BAD: $Quiz <br>
|
||||
@@ -160,7 +161,6 @@
|
||||
} </font></p>
|
||||
</li>
|
||||
</ol>
|
||||
<p align="center" class="normaltext"> </p>
|
||||
<hr>
|
||||
<p align="CENTER"><font size="1"><a href="." target="_top">Moodle Documentation</a></font></p>
|
||||
<p align="CENTER"><font size="1">Version: $Id$</font></p>
|
||||
|
||||
Reference in New Issue
Block a user