moodle/lang/el/docs/coding.html

172 lines
4.5 KiB
HTML
Executable File

<html>
<head>
<title>Moodle Docs: Coding Guidelines</title>
<link rel="stylesheet" href="../theme/standard/styles.php" type="TEXT/CSS">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
<style type="text/css">
<!--
li {
padding-top: 10px;
}
.question {
font-size: medium;
font-weight: bold;
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
border: 1px dotted;
padding: 10px;
background-color: #EEEEEE;
}
.answer {
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
font-size: medium;
border: none;
padding-left: 40px;
}
-->
</style>
<style type="text/css">
<!--
.normaltext {
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
font-size: medium;
border: none;
padding-left: 10px;
}
.answercode {
font-family: "Courier New", Courier, mono;
font-size: small;
border: none;
padding-left: 60px;
}
.questionlink {
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
font-size: medium;
border: none;
padding-left: 40px;
}
-->
</style>
<style type="text/css">
<!--
.examplecode {
font-family: "Courier New", Courier, mono;
font-size: small;
border: thin dashed #999999;
background-color: #FBFBFB;
margin: auto;
padding: 30px;
height: auto;
width: auto;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<h2>Ïäçãßåò Êùäéêïðïßçóçò Moodle</h2>
<h2 class="normaltext">Ãåíéêïß Êáíüíåò</h2>
<ol class="normaltext">
<li>¼ëá ôá áñ÷åßá ðñÝðåé íá ÷ñçóéìïðïéïýí ôçí êáôÜëçîç .php.</li>
<li>¼ëåò ïé ãíùóôïðïéÞóåéò copyright ðñÝðåé íá äéáôçñçèïýí. Áí ÷ñåéáóôåß ìðïñåßò
íá ðñïóèÝóåéò êáé ôç äéêÞ óïõ.</li>
<li>ÊÜèå áñ÷åßï ðñÝðåé íá ðåñéëáìâÜíåé ôï êõñßùò áñ÷åßï config.php.</li>
<li>ÊÜèå áñ÷åßï ðñÝðåé íá åëÝã÷åé áí ï ÷ñÞóôçò ôáõôïðïéåßôáé óùóôÜ, ÷ñçóéìïðïéþíôáò
require_login() êáé isadmin(), isteacher(), iscreator() Þ isstudent().
<ol>
<li>¼ëåò ïé ðñïóâÜóåéò óôéò âÜóåéò äåäïìÝíùí ðñÝðåé íá ÷ñçóéìïðïéïýí ôéò
óõíáñôÞóåéò óôï lib/datalib.php üðïõ åßíáé äõíáôü - áõôü åðéôñÝðåé óõìâáôüôçôá
áíÜìåóá óå ðïëëÝò âÜóåéò äåäïìÝíùí. Èá äéáðéóôþóåéò üôé ó÷åäüí üëá åßíáé
ðéèáíÜ ÷ñçóéìïðïéþíôáò áõôÝò ôéò óõíáñôÞóåéò. ÏðïéåóäÞðïôå Üëëåò äçëþóåéò
SQL èá ðñÝðåé íá åßíáé : cross-platform; ðåñéïñéóìÝíåò óå óõãêåêñéìÝíåò
óõíáñôÞóåéò ìÝóá óôïí êþäéêÜ óïõ (óõíÞèùò Ýíá áñ÷åßï a lib.php ) êáé êáèáñÜ
ìáñêáñéóìÝíåò. </li>
</ol>
</li>
<li>¼ëåò ïé óõìâïëïóåéñÝò ðñÝðåé íá åßíáé ìåôáöñÜóéìåò - äçìéïýñãçóå íÝá êåßìåíá
óôá áñ÷åßá &quot;lang/en&quot; êáé ïíüìáóÝ ôá ÷ñçóéìïðïéþíôáò get_string()
Þ print_string().</li>
<li>¼ëá ôá áñ÷åßá âïÞèåéáò ðñÝðåé íá åßíáé ìåôáöñÜóéìá - äçìéïýñãçóå íÝá êåßìåíá
óôïí êáôÜëïãï &quot;en/help&quot; êáé ïíüìáóÝ ôá ÷ñçóéìïðïéþíôáò helpbutton().</li>
</ol>
<p>&nbsp;</p>
<h2 class="normaltext">Óôõë Êùäéêïðïßçóçò</h2>
<ol class="normaltext">
<li>Ìç ÷ñçóéìïðïéåßò êáèüëïõ tab. ×ñçóéìïðïßçóå 4 êåíÜ ãéá ìéá óõíå÷üìåíç åóï÷Þ.</li>
<li>Ôá Üãêéóôñá ðñÝðåé ðÜíôá íá ÷ñçóéìïðïéïýíôáé óå Ýíáí êþäéêá (áêüìá êé áí
åßíáé ôçò ìéáò ãñáììÞò). Ôï Moodle ÷ñçóéìïðïéåß áõôü ôï óôõë:
<p class="examplecode"> <font color="#006600">if (</font><font color="#0000CC">$quiz</font><font color="#006600">-&gt;</font><font color="#0000CC">attempts</font><font color="#006600">)
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (</font><font color="#0000CC">$numattempts </font><font color="#006600">&gt;
</font><font color="#0000CC">$quiz</font><font color="#006600">-&gt;</font><font color="#0000CC">attempts</font><font color="#006600">)
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">error</font><font color="#006600">(</font><font color="#CC0000">$strtoomanyattempts</font><font color="#006600">,
</font><font color="#CC0000">"view.php?id=$cm</font><font color="#006600">-&gt;</font><font color="#CC0000">id"</font><font color="#006600">);<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</font></p>
</li>
<li> Áõôü ôï Ýããñáöï äåí Ý÷åé ôåëåéþóåé áêüìá!</li>
</ol>
<p align="center" class="normaltext">&nbsp;</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: faq.html,v 1.6 2003/03/30 13:54:28
moodler Exp $</font></p>
</body>
</html>