Οδηγίες για τη δομή-συγγραφή του κώδικα ------------------------------------------ Για λόγους ομοιομορφίας, κατανόησης του κώδικα και ευκολίας στον έλεγχο προτείνουμε κάθε αρχείο κώδικα που παράγετε ή διορθώνετε να συμπεριλαμβάνει υποχρεωτικά τα παρακάτω 5 στοιχεία: 1. Αρχικό κείμενο - copyright notice 2. Σύντομη περιγραφή της λειτουργίας που επιτελεί το συγκεκριμένο αρχείο καθώς και πιθανές διασυνδέσεις του με άλλα αρχεία 3. Σχόλια πριν από κάθε function που να περιγράφουν τη λειτουργία της τα ορίσματά της και τη χρησιμότητά της. 4. Σχόλια πριν από σημαντικά σημεία του κώδικα πχ πριν από οθόνες που εμφανίζονται στον χρήστη 5. Σχόλια σε μεταβλητές, αναθέσεις τιμών κλπ Γενικά όσο πιο πολλά σχόλια τόσο πιο καλά. Σημειώσεις: Α. Τα σχόλια πρέπει να γράφονται στα Αγγλικά ή σε Greeklish. Β. Επίσης τα αρχεία από την προηγούμενη έκδοση 1.6 θα πρέπει να προσαρμοστούν στη νέα αυτή προτεινόμενη δομή Αναλυτικότερα: 1. Arxiko Keimeno se ka8e arxeio /**============================================================================= GUnet e-Class 2.0 E-learning and Course Management Program ================================================================================ Copyright(c) 2003-2006 Greek Universities Network - GUnet Α full copyright notice can be read in "/info/copyright.txt". Authors: Costas Tsibanis Yannis Exidaridis Alexandros Diamantidis For a full list of contributors, see "credits.txt". This program is a free software under the terms of the GNU (General Public License) as published by the Free Software Foundation. See the GNU License for more details. The full license can be read in "license.txt". Contact address: GUnet Asynchronous Teleteaching Group, Network Operations Center, University of Athens, Panepistimiopolis Ilissia, 15784, Athens, Greece eMail: eclassadmin@gunet.gr ==============================================================================*/ 2. Keimeno poy perigrafei th leitoyrgia tou yposysthmatos /**=========================================================================== document.php @last update: 17-4-2006 by Costas Tsibanis @authors list: TO ONOMA SAS TO ONOMA SAS ============================================================================== @Description: Main script for the documents tool This script allows the user to manage files and directories on a remote http server. The user can : - navigate through files and directories. - upload a file - delete, copy a file or a directory - edit properties & content (name, comments, html content) @Comments: The script is organised in four sections. 1) Execute the command called by the user Note (March 2004) some editing functions (renaming, commenting) are moved to a separate page, edit_document.php. This is also where xml and other stuff should be added. 2) Define the directory to display 3) Read files and directories from the directory defined in part 2 4) Display all of that on an HTML page @todo: eliminate code duplication between document/document.php, scormdocument.php ============================================================================== */ 3. Sxolia pou perigrafoun th leitourgia mias function /***************************************************************************** function draw ****************************************************************************** This method processes all data to render the display. It is executed by each tool. It is in charge of generating the interface and parse it to the user's browser. draw($tool_content, x) opou $tool_content einai ta dedomena pou 8a emfanizontai sthn o8onh tou xrhsth kai x mia sta8era sxetika me to menu_type_id. Το menu_type_id dhlwnei ton typo tou menu pou to ergaleio apitei na typwnetai kai pairnei tiw times: 0 = logged out -- arxikh selida 1 = logged in -- katastaseis ektos ma8hmatos (xartofylakio xrhsth) 2 = ergaleio ma8hmatos -- otan exoume epilexei ma8hma (course home) 3 = ergaleio diaxeiristh platformas eclass (admin tool) ******************************************************************************/ 4. Shmantika sxolia mesa ston kwdika /***************************************************************************** BEGIN constructing left navigation bar ******************************************************************************/ 5. Apla sxolia mesa ston kwdika // simple comments in the code