[Opensis-svn] SF.net SVN: opensis:[415] trunk
Brought to you by:
aecioneto,
fxrsliberty
From: <aec...@us...> - 2010-02-08 20:10:04
|
Revision: 415 http://opensis.svn.sourceforge.net/opensis/?rev=415&view=rev Author: aecioneto Date: 2010-02-08 20:09:48 +0000 (Mon, 08 Feb 2010) Log Message: ----------- 0. Finished english terms for Users module. 1. Fix for the install routine, keeping 2009 as default year. Keeping 2010 as default - as of now - breaks the login. Modified Paths: -------------- trunk/docs/install.txt trunk/install/opensis-4.5-upgrade.php trunk/install/sql.php trunk/install/step4.php trunk/lang/en_utf8/Common.php trunk/lang/en_utf8/Core.php trunk/lang/en_utf8/Eligibility.php trunk/lang/en_utf8/Students/StudentFields.php trunk/lang/en_utf8/Users/includes/General_Info.inc.php trunk/lang/en_utf8/Users/includes/Schedule.inc.php trunk/modules/Eligibility/AddActivity.php trunk/modules/Students/StudentFields.php trunk/modules/Users/AddStudents.php trunk/modules/Users/Exceptions.php trunk/modules/Users/Menu.php trunk/modules/Users/Preferences.php trunk/modules/Users/Profiles.php trunk/modules/Users/Search.inc.php trunk/modules/Users/Search.php trunk/modules/Users/Search_Miss_Attn.inc.php trunk/modules/Users/TeacherPrograms.php trunk/modules/Users/User.php trunk/modules/Users/UserFields.php trunk/modules/Users/includes/General_Info.inc.php trunk/modules/Users/includes/Other_Info.inc.php trunk/modules/Users/includes/Schedule.inc.php trunk/modules/Users/includes/functions.php Added Paths: ----------- trunk/lang/en_utf8/users.php Removed Paths: ------------- trunk/lang/en_utf8/Discipline/ trunk/lang/en_utf8/Users/AddStudents.php trunk/lang/en_utf8/Users/Exceptions.php trunk/lang/en_utf8/Users/Menu.php trunk/lang/en_utf8/Users/Preferences.php trunk/lang/en_utf8/Users/Profiles.php trunk/lang/en_utf8/Users/Search.inc.php trunk/lang/en_utf8/Users/Search.php trunk/lang/en_utf8/Users/Search_Miss_Attn.inc.php trunk/lang/en_utf8/Users/TeacherPrograms.php trunk/lang/en_utf8/Users/User.php trunk/lang/en_utf8/Users/UserFields.php Modified: trunk/docs/install.txt =================================================================== --- trunk/docs/install.txt 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/docs/install.txt 2010-02-08 20:09:48 UTC (rev 415) @@ -1,9 +1,9 @@ openSIS Student Information System - INSTALLATION DIRECTIONS -------------------------------- -Version 4.5.0.1 +Version 4.6.alpha -------------------------------- -July 27, 2009 +February 08, 2010 NOTE: Before installing openSIS SIS, you must read and agree to the included License located in the openSIS root directory and titled "LICENSE". @@ -15,7 +15,7 @@ Setting these up varies a lot with platform, operating system, and distribution so it is well beyond the scope of this brief install document. -openSIS 4.5.0.1 requires following software: +openSIS 4.6x requires following software: --Apache 2.0.54, --MySQL 5.X or higher @@ -65,8 +65,8 @@ ...................... Using phpMyAdmin or other MySQL Tools: create the Database "opensis" -import the schema /install/osis-4.5-schema-mysql.sql -import the procedures /install/osis-4.5-procs-mysql.sql +import the schema /install/osis-4.6-schema-mysql.sql +import the procedures /install/osis-4.6-procs-mysql.sql import the food service /modules/food_service/mfoodService.sql copy all sql statements from install/sql.php file and import to "opensis" database configure the /data.php manually @@ -76,7 +76,7 @@ $DatabasePassword = 'mysql password'; $DatabaseName = 'opensis'; $DatabasePort = '3306'; -$DefaultSyear = '2009'; +$DefaultSyear = '2010'; login and visit the "Your Install root"/install/reset_auto_increment.php Modified: trunk/install/opensis-4.5-upgrade.php =================================================================== --- trunk/install/opensis-4.5-upgrade.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/install/opensis-4.5-upgrade.php 2010-02-08 20:09:48 UTC (rev 415) @@ -48,10 +48,10 @@ "; $text .= " -UPDATE `APP` SET value = '4.5.0.1-CE' WHERE name = 'version'; -UPDATE `APP` SET value = '2009-10-19' WHERE name = 'date'; -UPDATE `APP` SET value = '19102009000' WHERE name = 'build'; -UPDATE `APP` SET value = 'Oct 19, 2009' WHERE name = 'last_updated'; +UPDATE `APP` SET value = '4.6.alpha1-CE' WHERE name = 'version'; +UPDATE `APP` SET value = '2010-02-08' WHERE name = 'date'; +UPDATE `APP` SET value = '08022010000' WHERE name = 'build'; +UPDATE `APP` SET value = 'Feb 08, 2010' WHERE name = 'last_updated'; "; $sqllines = split("\n",$text); Modified: trunk/install/sql.php =================================================================== --- trunk/install/sql.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/install/sql.php 2010-02-08 20:09:48 UTC (rev 415) @@ -30,10 +30,10 @@ -- INSERT INTO `APP` (`name`, `value`) VALUES -('version', '4.5.0.1-CE'), -('date', '2009-10-19'), -('build', '10192009000'), -('last_updated', 'Oct 19, 2009'); +('version', '4.6.alpha1-CE'), +('date', '2010-02-08'), +('build', '02082010000'), +('last_updated', 'Feb 08, 2010'); -- -- Dumping data for table `ATTENDANCE_CALENDAR` Modified: trunk/install/step4.php =================================================================== --- trunk/install/step4.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/install/step4.php 2010-02-08 20:09:48 UTC (rev 415) @@ -45,60 +45,61 @@ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> -<title>Untitled Document</title> -<link rel="stylesheet" href="../styles/installer.css" type="text/css" /> -<script type="text/javascript" src="js/validator.js"></script> -</head> -<body> -<div class="heading"><?php echo get_string('step4header', 'install'); ?> -<div style="background-image:url(images/step4.gif); background-repeat:no-repeat; background-position:50% 20px; height:270px;"> - <form name='step4' id='step4' method="post" action="ins4.php"> - <table border="0" cellspacing="6" cellpadding="3" align="center"> - <tr> - <td align="center" style="padding-top:36px; padding-bottom:16px"><?php echo get_string('installstep4', 'install'); ?></td> - </tr> - <tr> - <td align="center"><strong><?php echo get_string('systemready', 'install'); ?><br /> - <?php echo get_string('schoolyear', 'install'); ?>. <br /><?php echo get_string('example', 'install'); ?>:<?php echo date("Y"); ?></strong></td> - </tr> - <tr> - <td align="center" valign="top"><table width="245" border="0" cellpadding="4" cellspacing="0" id="table1"> - <tr> - <td align="center"><input type="text" name="syear" size="20" value="<?php echo date("Y"); ?>" /></td> - </tr> - <tr> - <td align="center"><input type="submit" value="<?php echo get_string('savebutton', 'install');?>" class=btn_wide name="btnsyear" /></td> - </tr> - </table> - <script language="JavaScript" type="text/javascript"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <title>Untitled Document</title> + <link rel="stylesheet" href="../styles/installer.css" type="text/css" /> + <script type="text/javascript" src="js/validator.js"></script> + </head> + <body> + <div class="heading"><?php echo get_string('step4header', 'install'); ?> + <div style="background-image:url(images/step4.gif); background-repeat:no-repeat; background-position:50% 20px; height:270px;"> + <form name='step4' id='step4' method="post" action="ins4.php"> + <table border="0" cellspacing="6" cellpadding="3" align="center"> + <tr> + <td align="center" style="padding-top:36px; padding-bottom:16px"><?php echo get_string('installstep4', 'install'); ?></td> + </tr> + <tr> + <td align="center"><strong><?php echo get_string('systemready', 'install'); ?><br /> + <?php echo get_string('schoolyear', 'install'); ?>. <br /><?php echo get_string('example', 'install'); ?>:<?php echo date("Y"); ?></strong></td> + </tr> + <tr> + <td align="center" valign="top"><table width="245" border="0" cellpadding="4" cellspacing="0" id="table1"> + <tr> + <td align="center"><input type="text" name="syear" size="20" value="<?php echo '2009'; //date("Y"); ?>" /></td> + </tr> + <tr> + <td align="center"><input type="submit" value="<?php echo get_string('savebutton', 'install');?>" class=btn_wide name="btnsyear" /></td> + </tr> + </table> + <script language="JavaScript" type="text/javascript"> - function CheckYear() - { - var frm = document.forms["step4"]; - if(frm.syear.value <2000) - { - alert('<?php echo get_string('yearerror', 'install'); ?>'); - frm.syear.focus(); - return false; - } - else - { - return true; - } - } + function CheckYear() + { + var frm = document.forms["step4"]; + if(frm.syear.value <2000) + { + alert('<?php echo get_string('yearerror', 'install'); ?>'); + frm.syear.focus(); + return false; + } + else + { + return true; + } + } - var frmvalidator = new Validator("step4"); - frmvalidator.addValidation("syear","req","<?php echo get_string('validateyearreq', 'install'); ?>"); - frmvalidator.addValidation("syear","maxlen=4", "<?php echo get_string('validateyearlen', 'install'); ?>"); - frmvalidator.addValidation("syear","<?php echo get_string('validateyearnum', 'install'); ?>"); - frmvalidator.setAddnlValidationFunction("CheckYear"); - </script> </td> - </tr> - </table> - </form> -</div> -</div> -</body> + var frmvalidator = new Validator("step4"); + frmvalidator.addValidation("syear","req","<?php echo get_string('validateyearreq', 'install'); ?>"); + frmvalidator.addValidation("syear","maxlen=4", "<?php echo get_string('validateyearlen', 'install'); ?>"); + frmvalidator.addValidation("syear","<?php echo get_string('validateyearnum', 'install'); ?>"); + frmvalidator.setAddnlValidationFunction("CheckYear"); + </script> + </td> + </tr> + </table> + </form> + </div> + </div> + </body> </html> Modified: trunk/lang/en_utf8/Common.php =================================================================== --- trunk/lang/en_utf8/Common.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Common.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,4 +1,29 @@ <?php +#************************************************************************** +# openSIS Community Edition is a free student information system for +# public and non-public schools. It is web-based, open source, and comes +# packed with features that include student demographic info, scheduling, +# grade book, attendance, report cards, eligibility, transcripts, +# parent portal, student portal and more. +# +# openSIS Communnity Edition is a derivitive work. +# Portions Copyright (C) 2007-2008, Open Solutions for Education, Inc. +# Portions Copyright (C) 2004-2007 The Miller Group +# Portions Copyright (C) 2004-2007 Andrew Schmadeke +# Visit the openSIS web site http://opensis.sourceforge.net/ to learn more. +# ************************************************************************* +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 2 of the License. See license.txt. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#************************************************************************** /*This are frequently used strings, in English*/ $string['student'] = 'Student tr'; Modified: trunk/lang/en_utf8/Core.php =================================================================== --- trunk/lang/en_utf8/Core.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Core.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,4 +1,29 @@ <?php +#************************************************************************** +# openSIS Community Edition is a free student information system for +# public and non-public schools. It is web-based, open source, and comes +# packed with features that include student demographic info, scheduling, +# grade book, attendance, report cards, eligibility, transcripts, +# parent portal, student portal and more. +# +# openSIS Communnity Edition is a derivitive work. +# Portions Copyright (C) 2007-2008, Open Solutions for Education, Inc. +# Portions Copyright (C) 2004-2007 The Miller Group +# Portions Copyright (C) 2004-2007 Andrew Schmadeke +# Visit the openSIS web site http://opensis.sourceforge.net/ to learn more. +# ************************************************************************* +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 2 of the License. See license.txt. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#************************************************************************** $string['opensisTitle'] = 'Opensis school software tr'; $string['accountNotActivated'] = 'Your account has not yet been activated. When your account has been verified by school administration, you will be notified by email.'; $string['incorrectUserOrPassword'] = 'Incorrect username or password. Please try again.'; Modified: trunk/lang/en_utf8/Eligibility.php =================================================================== --- trunk/lang/en_utf8/Eligibility.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Eligibility.php 2010-02-08 20:09:48 UTC (rev 415) @@ -49,5 +49,5 @@ $string['Activity'] = 'Activity tr'; $string['Grade'] = 'Grade tr'; $string['Course'] = 'Course tr'; - +$string['addactivity']="Add Activity to Selected Students tr"; ?> Modified: trunk/lang/en_utf8/Students/StudentFields.php =================================================================== --- trunk/lang/en_utf8/Students/StudentFields.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Students/StudentFields.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,5 +1,29 @@ <? - +#************************************************************************** +# openSIS Community Edition is a free student information system for +# public and non-public schools. It is web-based, open source, and comes +# packed with features that include student demographic info, scheduling, +# grade book, attendance, report cards, eligibility, transcripts, +# parent portal, student portal and more. +# +# openSIS Communnity Edition is a derivitive work. +# Portions Copyright (C) 2007-2008, Open Solutions for Education, Inc. +# Portions Copyright (C) 2004-2007 The Miller Group +# Portions Copyright (C) 2004-2007 Andrew Schmadeke +# Visit the openSIS web site http://opensis.sourceforge.net/ to learn more. +# ************************************************************************* +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 2 of the License. See license.txt. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#************************************************************************** $string['deleteprompt'] = 'student field category and all fields in the category'; $string['newstudentfield'] = 'New Student Field' ; $string['newstudentfieldcategory'] = 'New Student Field Category' ; @@ -10,5 +34,11 @@ $string['datatype'] = "Data Type"; $string['category'] = "Category"; $string['order'] = "Order"; - +$string['Include']='Include (should be left blank for most categories) tr'; +$string['Title']="Title tr"; +$string['SortOrder']="Sort Order tr"; +$string['NewStudentFieldCategory']="New Student Field Category tr"; +$string['NewStudentField']="New Student Field tr"; +$string['StudentField']="Student Field tr" ; +$string['DataType']="Data Type tr"; ?> \ No newline at end of file Deleted: trunk/lang/en_utf8/Users/AddStudents.php =================================================================== --- trunk/lang/en_utf8/Users/AddStudents.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/AddStudents.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,8 +0,0 @@ -<?php - /*This are messages on AddStudents file of Users Module, in English*/ - - $string['associate'] = 'Associate tr'; - $string['students'] = 'Students tr'; - $string['addSelectedStudents'] = 'Add Selected Students tr'; - $string['theSelectedUser...'] = "The selected user's profile now includes access to the selected students. tr"; -?> \ No newline at end of file Deleted: trunk/lang/en_utf8/Users/Exceptions.php =================================================================== --- trunk/lang/en_utf8/Users/Exceptions.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/Exceptions.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,5 +0,0 @@ -<?php - /*This are messages on Exeptions file of Users Module, in English*/ - - $string['selectThePrograms...'] = 'Select the programs with which this user can use and save information. tr'; -?> \ No newline at end of file Deleted: trunk/lang/en_utf8/Users/Menu.php =================================================================== --- trunk/lang/en_utf8/Users/Menu.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/Menu.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,14 +0,0 @@ -<?php - /*This are messages on Menu file of Users Module, in English*/ - - $string['userInfo'] = 'User Info tr'; - $string['addUser'] = 'Add a User tr'; - $string['associateStudentsWithParents'] = 'Associate Students with Parents tr'; - $string['preferences'] = 'Preferences tr'; - $string['setup'] = 'Setup tr'; - $string['profiles'] = 'Profiles tr'; - $string['userPermissions'] = 'User Permissions tr'; - $string['userFields'] = 'User Fields tr'; - $string['teacherPrograms'] = 'Teacher Programs tr'; - $string['generalInfo'] = 'General Info tr'; -?> Deleted: trunk/lang/en_utf8/Users/Preferences.php =================================================================== --- trunk/lang/en_utf8/Users/Preferences.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/Preferences.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,62 +0,0 @@ -<?php - /*This are messages on Preferences file of Users Module, in English*/ - - $string['yourNewPasswordsDidNotMatch'] = 'Your new passwords did not match. tr'; - $string['yourCurrentPasswordWasIncorrect'] = 'Your current password was incorrect. tr'; - $string['yourNewPasswordWasSaved'] = 'Your new password was saved. tr'; - $string['displayOptions'] = 'Display Options tr'; - $string['studentListing'] = 'Student Listing tr'; - $string['password'] = 'Password tr'; - $string['studentFields'] = 'Student Fields tr'; - $string['studentName'] = 'Student Name tr'; - $string['studentSorting'] = 'Student Sorting tr'; - $string['fileExportType'] = 'File Export Type tr'; - $string['commonName'] = 'Common Name tr'; - $string['name'] = 'Name tr'; - $string['tabDelimitedExcel'] = 'Tab-Delimited (Excel) tr'; - $string['givenName'] = 'Given Name tr'; - $string['gradeName'] = 'Grade, Name tr'; - $string['cvsOpenOffice'] = 'CSV (OpenOffice) tr'; - $string['displayStudentSearchScreen'] = 'Display student search screen tr'; - $string['groupByFamilyByDefault'] = 'Group by family by default tr'; - $string['searchAllSchoolsByDefault'] = 'Search all schools by default tr'; - $string['theme'] = 'Theme tr'; - $string['Black'] = 'Black tr'; - $string['Gray'] = 'Gray tr'; - $string['Blue'] = 'Blue tr'; - $string['Green'] = 'Green tr'; - $string['highlightColor'] = 'Highlight Color tr'; - $string['language'] = 'Language tr'; - $string['en'] = 'English tr'; - $string['es_cl'] = 'Spanish-Chile tr'; - $string['es_ar'] = 'Spanish-Argentina tr'; - $string['currency'] = 'Currency tr'; - $string['dateFormat'] = 'Date Format tr'; - $string['usDollar'] = 'US Dollar tr'; - $string['britishPound'] = 'British Pound tr'; - $string['euro'] = 'Euro tr'; - $string['canadianDollar'] = 'Canadian Dollar tr'; - $string['australianDollar'] = 'Australian Dollar tr'; - $string['japaneseYen'] = 'Japanese Yen tr'; - $string['brazillianReal'] = 'Brazillian Real tr'; - $string['disableLoginAlerts'] = 'Disable login alerts tr'; - $string['displayDataUsingHiddenFields'] = 'Display data using hidden fields tr'; - $string['currentPassword'] = 'Current Password tr'; - $string['newPassword'] = 'New Password tr'; - $string['verifyNewPassword'] = 'Verify New Password tr'; - $string['save'] = 'Save tr'; - $string['contactInformation'] = 'Contact Information tr'; - $string['contactInfoRollover'] = 'Contact Info Rollover tr'; - $string['homePhoneNumber'] = 'Home Phone Number tr'; - $string['guardians'] = 'Guardians tr'; - $string['allContacts'] = 'All Contacts tr'; - $string['addresses'] = 'Addresses tr'; - $string['none'] = 'None tr'; - $string['residence'] = 'Residence tr'; - $string['mailing'] = 'Mailing tr'; - $string['busPickup'] = 'Bus Pickup tr'; - $string['busDropoff'] = 'Bus Dropoff tr'; - $string['field'] = 'Field tr'; - $string['search'] = 'Search tr'; - $string['expandedView'] = 'Expanded View tr'; -?> \ No newline at end of file Deleted: trunk/lang/en_utf8/Users/Profiles.php =================================================================== --- trunk/lang/en_utf8/Users/Profiles.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/Profiles.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,24 +0,0 @@ -<?php - /*This are messages on Users Module, in English*/ - $string['permissions'] = 'Permissions tr'; - $string['selectTheProgramsThatUsers...'] = 'Select the programs that users of this profile can use and which programs those users can use to save information. tr'; - $string['profiles'] = 'Profiles tr'; - $string['Administrator'] = 'Administrator tr'; - $string['Teacher'] = 'Teacher tr'; - $string['Parent'] = 'Parent tr'; - $string['Student'] = 'Student tr'; - $string['profiles'] = 'Profiles tr'; - $string['addUserProfile'] = 'Add a User Profile tr'; - $string['permissions'] = 'Permissions tr'; - $string['canUse'] = 'Can Use tr'; - $string['canEdit'] = 'Can Edit tr'; - $string['save'] = 'Save tr'; - $string['General Info'] = 'General Info tr'; - $string['Addresses & Contacts'] = 'Addresses & Contacts tr'; - $string['Medical'] = 'Medical tr'; - $string['Comments'] = 'Comments tr'; - $string['Food Service'] = 'Food Service tr'; - $string['Schedule'] = 'Schedule tr'; - $string['title'] = 'Title tr'; - $string['type'] = 'Type tr'; -?> Deleted: trunk/lang/en_utf8/Users/Search.inc.php =================================================================== --- trunk/lang/en_utf8/Users/Search.inc.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/Search.inc.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,20 +0,0 @@ -<?php - /*This are messages on Search.inc of Users Module, in English*/ - - $string['findUser'] = 'Find User tr'; - $string['lastName'] = 'Last Name tr'; - $string['firstName'] = 'First Name tr'; - $string['userName'] = 'User Name tr'; - $string['profile'] = 'Profile tr'; - $string['searchAllSchools'] = 'Search All Schools tr'; - $string['N/A'] = 'N/A tr'; - $string['Administrator'] = 'Administrator tr'; - $string['Teacher'] = 'Teacher tr'; - $string['Parent'] = 'Parent tr'; - $string['No Access'] = 'No Access tr'; - $string['submit'] = 'Submit tr'; - $string['reset'] = 'Reset tr'; - $string['pleaseSelectUser'] = 'Please select a user tr'; - $string['staffMember'] = 'Staff Member tr'; - $string['staffId'] = 'Staff ID tr'; -?> Deleted: trunk/lang/en_utf8/Users/Search.php =================================================================== --- trunk/lang/en_utf8/Users/Search.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/Search.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,8 +0,0 @@ -<? -$FindUser = "Find User" ; -$LastName = "Last Name"; -$FirstName = "First Name"; -$UserName = "Username" ; -$Profile = "Profile" ; -$SearchAllSchools = "Search All Schools" ; -?> Deleted: trunk/lang/en_utf8/Users/Search_Miss_Attn.inc.php =================================================================== --- trunk/lang/en_utf8/Users/Search_Miss_Attn.inc.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/Search_Miss_Attn.inc.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,8 +0,0 @@ -<?php - /*This are messages on Search_Miss_Attn.inc file of Users Module, in English*/ - - $string['staffMember'] = 'Staff Member tr'; - $string['profile'] = 'Profile tr'; - $string['staffId'] = 'Staff ID tr'; - $string['followingTeachersHaveMissingAttendance'] = 'Following teachers have missing attendance! tr'; -?> Deleted: trunk/lang/en_utf8/Users/TeacherPrograms.php =================================================================== --- trunk/lang/en_utf8/Users/TeacherPrograms.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/TeacherPrograms.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,9 +0,0 @@ -<?php - /*This are messages on TeacherPrograms file of Users Module, in English*/ - - $string[''] = ' tr'; - $string[''] = ' tr'; - $string[''] = ' tr'; - $string[''] = ' tr'; - $string[''] = ' tr'; -?> \ No newline at end of file Deleted: trunk/lang/en_utf8/Users/User.php =================================================================== --- trunk/lang/en_utf8/Users/User.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/User.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,13 +0,0 @@ -<?php - /*This are messages on User file of Users Module, in English*/ - - $string['hackingAttempt'] = 'HACKING ATTEMPT tr'; - $string['triedToAccessUser'] = 'tried to access user tr'; - $string['usernameAlreadyExists'] = 'A user with that username already exists for the $a school year. Choose a different username and try again. tr'; - $string['delete'] = 'Delete tr'; - $string['lastLogin'] = 'Last Login tr'; - $string['users'] = 'Users tr'; - $string['addUser'] = 'Add a User tr'; - $string['createAccount'] = 'Create Account tr'; - $string['save'] = 'Save tr'; -?> \ No newline at end of file Deleted: trunk/lang/en_utf8/Users/UserFields.php =================================================================== --- trunk/lang/en_utf8/Users/UserFields.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/UserFields.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,39 +0,0 @@ -<?php - /*This are messages on UserFields file of Users Module, in English*/ - - $string['delete'] = 'Delete tr'; - $string['newUserField'] = 'New User Field tr'; - $string['newUserFieldCategory'] = 'New User FieldCategory tr'; - $string['save'] = 'Save tr'; - $string['pullDown'] = 'Pull-Down tr'; - $string['autoPullDown'] = 'Auto Pull-down tr'; - $string['editPullDown'] = 'Edit Pull-Down tr'; - $string['text'] = 'Text tr'; - $string['checkbox'] = 'Checkbox tr'; - $string['codedPullDown'] = 'Coded Pull-Down tr'; - $string['number'] = 'Number tr'; - $string['selectMultipleFromOptions'] = 'Select Multiple from Options tr'; - $string['selectMultiple'] = 'Select Multiple tr'; - $string['date'] = 'Date tr'; - $string['longText'] = 'Long Text tr'; - $string['onePerLine'] = 'one per line tr'; - $string['forDates'] = 'for dates tr'; - $string['forCheckboxes'] = 'for checkboxes tr'; - $string['title'] = 'Title tr'; - $string['fieldName'] = 'Field Name tr'; - $string['dataType'] = 'Data Type tr'; - $string['sortOrder'] = 'Sort Order tr'; - $string['default'] = 'Default tr'; - $string['required'] = 'Required tr'; - $string['includeShouldBeLeftBlankForMostCategories'] = 'Include (should be left blank for most categories) tr'; - $string['category'] = 'Category tr'; - $string['order'] = 'Order tr'; - $string['userFieldCategory'] = 'User Field Category tr'; - $string['userFieldCategories'] = 'User Field Categories tr'; - $string['userField'] = 'User Field tr'; - $string['userFields'] = 'User Fields tr'; - $string['userFieldCategoryAndAll...'] = 'user field category and all fields in the category tr'; - $string['General Info'] = 'General Info tr'; - $string['Schedule'] = 'Schedule tr'; - $string['Food Service'] = 'Food Service tr'; -?> Modified: trunk/lang/en_utf8/Users/includes/General_Info.inc.php =================================================================== --- trunk/lang/en_utf8/Users/includes/General_Info.inc.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/includes/General_Info.inc.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,4 +1,29 @@ <?php +#************************************************************************** +# openSIS Community Edition is a free student information system for +# public and non-public schools. It is web-based, open source, and comes +# packed with features that include student demographic info, scheduling, +# grade book, attendance, report cards, eligibility, transcripts, +# parent portal, student portal and more. +# +# openSIS Communnity Edition is a derivitive work. +# Portions Copyright (C) 2007-2008, Open Solutions for Education, Inc. +# Portions Copyright (C) 2004-2007 The Miller Group +# Portions Copyright (C) 2004-2007 Andrew Schmadeke +# Visit the openSIS web site http://opensis.sourceforge.net/ to learn more. +# ************************************************************************* +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 2 of the License. See license.txt. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#************************************************************************** /*This are messages on includes/General_Info.inc of Users Module, in English*/ $string['title'] = 'Title tr'; Modified: trunk/lang/en_utf8/Users/includes/Schedule.inc.php =================================================================== --- trunk/lang/en_utf8/Users/includes/Schedule.inc.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/lang/en_utf8/Users/includes/Schedule.inc.php 2010-02-08 20:09:48 UTC (rev 415) @@ -1,4 +1,29 @@ <?php +#************************************************************************** +# openSIS Community Edition is a free student information system for +# public and non-public schools. It is web-based, open source, and comes +# packed with features that include student demographic info, scheduling, +# grade book, attendance, report cards, eligibility, transcripts, +# parent portal, student portal and more. +# +# openSIS Communnity Edition is a derivitive work. +# Portions Copyright (C) 2007-2008, Open Solutions for Education, Inc. +# Portions Copyright (C) 2004-2007 The Miller Group +# Portions Copyright (C) 2004-2007 Andrew Schmadeke +# Visit the openSIS web site http://opensis.sourceforge.net/ to learn more. +# ************************************************************************* +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 2 of the License. See license.txt. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#************************************************************************** /*This are messages on includes/Schedule.inc of Users Module, in English*/ $string['course'] = 'Course tr'; Added: trunk/lang/en_utf8/users.php =================================================================== --- trunk/lang/en_utf8/users.php (rev 0) +++ trunk/lang/en_utf8/users.php 2010-02-08 20:09:48 UTC (rev 415) @@ -0,0 +1,144 @@ +<?php +#************************************************************************** +# openSIS Community Edition is a free student information system for +# public and non-public schools. It is web-based, open source, and comes +# packed with features that include student demographic info, scheduling, +# grade book, attendance, report cards, eligibility, transcripts, +# parent portal, student portal and more. +# +# openSIS Communnity Edition is a derivitive work. +# Portions Copyright (C) 2007-2008, Open Solutions for Education, Inc. +# Portions Copyright (C) 2004-2007 The Miller Group +# Portions Copyright (C) 2004-2007 Andrew Schmadeke +# Visit the openSIS web site http://opensis.sourceforge.net/ to learn more. +# ************************************************************************* +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 2 of the License. See license.txt. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#************************************************************************** +$string['users'] = "Users tr"; +$string['studentFromThatUser'] = 'student from that user tr'; +$string['removeAccessTo'] = 'remove access to tr'; +$string['associate'] = 'Associate tr'; +$string['students'] = 'Students tr'; +$string['addSelectedStudents'] = 'Add Selected Students tr'; +$string['theSelectedUser...'] = "The selected user's profile now includes access to the selected students. tr"; +# +# +$string['permissions'] = 'Permissions tr'; +$string['selectThePrograms...'] = 'Select the programs with which this user can use and save information. tr'; +$string['selectTheProgramsThatUsers...'] = 'Select the programs that users of this profile can use and which programs those users can use to save information. tr'; +$string['profiles'] = 'Profiles tr'; +$string['administrator'] = 'Administrator tr'; +$string['teacher'] = 'Teacher tr'; +$string['parent'] = 'Parent tr'; +$string['student'] = 'Student tr'; +$string['addUserProfile'] = 'Add a User Profile tr'; +$string['canUse'] = 'Can Use tr'; +$string['canEdit'] = 'Can Edit tr'; +$string['save'] = 'Save tr'; +$string['generalInfo'] = 'General Info tr'; +$string['addressesContacts'] = 'Addresses & Contacts tr'; +$string['medical'] = 'Medical tr'; +$string['comments'] = 'Comments tr'; +$string['foodService'] = 'Food Service tr'; +$string['schedule'] = 'Schedule tr'; +$string['title'] = 'Title tr'; +$string['type'] = 'Type tr'; +# +# +$string['yourNewPasswordsDidNotMatch'] = 'Your new passwords did not match. tr'; +$string['yourCurrentPasswordWasIncorrect'] = 'Your current password was incorrect. tr'; +$string['yourNewPasswordWasSaved'] = 'Your new password was saved. tr'; +$string['displayOptions'] = 'Display Options tr'; +$string['studentListing'] = 'Student Listing tr'; +$string['password'] = 'Password tr'; +$string['studentFields'] = 'Student Fields tr'; +$string['studentName'] = 'Student Name tr'; +$string['studentSorting'] = 'Student Sorting tr'; +$string['fileExportType'] = 'File Export Type tr'; +$string['commonName'] = 'Common Name tr'; +$string['name'] = 'Name tr'; +$string['tabDelimitedExcel'] = 'Tab-Delimited (Excel) tr'; +$string['givenName'] = 'Given Name tr'; +$string['gradeName'] = 'Grade, Name tr'; +$string['cvsOpenOffice'] = 'CSV (OpenOffice) tr'; +$string['displayStudentSearchScreen'] = 'Display student search screen tr'; +$string['groupByFamilyByDefault'] = 'Group by family by default tr'; +$string['searchAllSchoolsByDefault'] = 'Search all schools by default tr'; +$string['theme'] = 'Theme tr'; +$string['Black'] = 'Black tr'; +$string['Gray'] = 'Gray tr'; +$string['Blue'] = 'Blue tr'; +$string['Green'] = 'Green tr'; +$string['highlightColor'] = 'Highlight Color tr'; +$string['language'] = 'Language tr'; +$string['en'] = 'English tr'; +$string['es_cl'] = 'Spanish-Chile tr'; +$string['es_ar'] = 'Spanish-Argentina tr'; +$string['currency'] = 'Currency tr'; +$string['dateFormat'] = 'Date Format tr'; +$string['usDollar'] = 'US Dollar tr'; +$string['britishPound'] = 'British Pound tr'; +$string['euro'] = 'Euro tr'; +$string['canadianDollar'] = 'Canadian Dollar tr'; +$string['australianDollar'] = 'Australian Dollar tr'; +$string['japaneseYen'] = 'Japanese Yen tr'; +$string['brazillianReal'] = 'Brazillian Real tr'; +$string['disableLoginAlerts'] = 'Disable login alerts tr'; +$string['displayDataUsingHiddenFields'] = 'Display data using hidden fields tr'; +$string['currentPassword'] = 'Current Password tr'; +$string['newPassword'] = 'New Password tr'; +$string['verifyNewPassword'] = 'Verify New Password tr'; +$string['contactInformation'] = 'Contact Information tr'; +$string['contactInfoRollover'] = 'Contact Info Rollover tr'; +$string['homePhoneNumber'] = 'Home Phone Number tr'; +$string['guardians'] = 'Guardians tr'; +$string['allContacts'] = 'All Contacts tr'; +$string['addresses'] = 'Addresses tr'; +$string['none'] = 'None tr'; +$string['residence'] = 'Residence tr'; +$string['mailing'] = 'Mailing tr'; +$string['busPickup'] = 'Bus Pickup tr'; +$string['busDropoff'] = 'Bus Dropoff tr'; +$string['field'] = 'Field tr'; +$string['search'] = 'Search tr'; +$string['expandedView'] = 'Expanded View tr'; +# +# +$string['selectTheProgramsThatUsers...'] = 'Select the programs that users of this profile can use and which programs those users can use to save information. tr'; +# +$string['findUser'] = 'Find User tr'; +$string['lastName'] = 'Last Name tr'; +$string['firstName'] = 'First Name tr'; +$string['userName'] = 'User Name tr'; +$string['profile'] = 'Profile tr'; +$string['searchAllSchools'] = 'Search All Schools tr'; +$string['N/A'] = 'N/A tr'; +$string['noAccess'] = 'No Access tr'; +$string['submit'] = 'Submit tr'; +$string['reset'] = 'Reset tr'; +$string['pleaseSelectUser'] = 'Please select a user tr'; +$string['staffMember'] = 'Staff Member tr'; +$string['staffId'] = 'Staff ID tr'; +# +# +$string['followingTeachersHaveMissingAttendance'] = 'Following teachers have missing attendance! tr'; +# +# +$string['hackingAttempt'] = 'HACKING ATTEMPT tr'; +$string['triedToAccessUser'] = 'tried to access user tr'; +$string['usernameAlreadyExists'] = 'A user with that username already exists for the $a school year. Choose a different username and try again. tr'; +$string['delete'] = 'Delete tr'; +$string['lastLogin'] = 'Last Login tr'; +$string['addUser'] = 'Add a User tr'; +$string['createAccount'] = 'Create Account tr'; +?> Modified: trunk/modules/Eligibility/AddActivity.php =================================================================== --- trunk/modules/Eligibility/AddActivity.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/modules/Eligibility/AddActivity.php 2010-02-08 20:09:48 UTC (rev 415) @@ -69,7 +69,7 @@ #DrawHeader('',SubmitButton('Add Activity to Selected Students')); #echo '<BR>'; - echo '<CENTER><TABLE cellpadding=6><TR><TD align=right><b>Activity</b></TD>'; + echo '<CENTER><TABLE cellpadding=6><TR><TD align=right><b>'.get_string('Activity', 'Eligibility').'</b></TD>'; echo '<TD>'; $activities_RET = DBGet(DBQuery("SELECT ID,TITLE FROM ELIGIBILITY_ACTIVITIES WHERE SYEAR='".UserSyear()."' AND SCHOOL_ID='".UserSchool()."'")); echo '<SELECT name=activity_id><OPTION value="">N/A</OPTION>'; @@ -94,7 +94,7 @@ Search('student_id',$extra); if($_REQUEST['search_modfunc']=='list') // echo '<BR><CENTER>'.SubmitButton('Add Activity to Selected Students','','class=btn_xlarge onclick=\'formload_ajax("addact");\'')."</CENTER></FORM>"; - echo '<BR><CENTER>'.SubmitButton('Add Activity to Selected Students','','class=btn_xlarge')."</CENTER></FORM>"; + echo '<BR><CENTER>'.SubmitButton(get_string('addactivity', 'Eligibility'),'','class=btn_xlarge')."</CENTER></FORM>"; function _makeChooseCheckbox($value,$title) { global $THIS_RET; Modified: trunk/modules/Students/StudentFields.php =================================================================== --- trunk/modules/Students/StudentFields.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/modules/Students/StudentFields.php 2010-02-08 20:09:48 UTC (rev 415) @@ -191,9 +191,9 @@ $title = $RET['TITLE']; } elseif($_REQUEST['id']=='new') - $title = 'New Student Field'; + $title = get_string('NewStudentField','Students/StudentFields'); elseif($_REQUEST['category_id']=='new') - $title = 'New Student Field Category'; + $title = get_string('NewStudentFieldCategory','Students/StudentFields'); if($_REQUEST['id']) { @@ -264,12 +264,12 @@ $header .= '<TABLE cellpadding=3 width=100%>'; $header .= '<TR>'; - $header .= '<TD>' . TextInput($RET['TITLE'],'tables['.$_REQUEST['category_id'].'][TITLE]','Title') . '</TD>'; - $header .= '<TD>' . TextInput($RET['SORT_ORDER'],'tables['.$_REQUEST['category_id'].'][SORT_ORDER]','Sort Order') . '</TD>'; + $header .= '<TD>' . TextInput($RET['TITLE'],'tables['.$_REQUEST['category_id'].'][TITLE]',get_string('Title','Students/StudentFields')) . '</TD>'; + $header .= '<TD>' . TextInput($RET['SORT_ORDER'],'tables['.$_REQUEST['category_id'].'][SORT_ORDER]',get_string('SortOrder','Students/StudentFields')) . '</TD>'; $new = ($_REQUEST['category_id']=='new'); if($_REQUEST['category_id']>4 || $new) - $header .= '<TD>' . TextInput($RET['INCLUDE'],'tables['.$_REQUEST['category_id'].'][INCLUDE]','Include (should be left blank for most categories)') . '</TD>'; + $header .= '<TD>' . TextInput($RET['INCLUDE'],'tables['.$_REQUEST['category_id'].'][INCLUDE]',get_string('Include','Students/StudentFields')) . '</TD>'; $header .= '</TR>'; $header .= '</TABLE>'; @@ -301,7 +301,7 @@ } echo '<TD valign=top>'; - $columns = array('TITLE'=>'Category','SORT_ORDER'=>'Order'); + $columns = array('TITLE'=>get_string('category','Students/StudentFields'),'SORT_ORDER'=>get_string('order','Students/StudentFields')); $link = array(); $link['TITLE']['link'] = "Modules.php?modname=$_REQUEST[modname]&modfunc=$_REQUEST[modfunc]"; // $link['TITLE']['link'] = "#"." onclick='check_content(\"ajax.php?modname=$_REQUEST[modname]&modfunc=$_REQUEST[modfunc]\");'"; @@ -331,7 +331,7 @@ } echo '<TD valign=top>'; - $columns = array('TITLE'=>'Student Field','SORT_ORDER'=>'Order','TYPE'=>'Data Type'); + $columns = array('TITLE'=>get_string('StudentField','Students/StudentFields'),'SORT_ORDER'=>get_string('order','Students/StudentFields'),'TYPE'=>get_string('DataType','Students/StudentFields')); $link = array(); $link['TITLE']['link'] = "Modules.php?modname=$_REQUEST[modname]&category_id=$_REQUEST[category_id]"; // $link['TITLE']['link'] = "#"." onclick='check_content(\"ajax.php?modname=$_REQUEST[modname]&category_id=$_REQUEST[category_id]\");'"; Modified: trunk/modules/Users/AddStudents.php =================================================================== --- trunk/modules/Users/AddStudents.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/modules/Users/AddStudents.php 2010-02-08 20:09:48 UTC (rev 415) @@ -24,91 +24,74 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. #************************************************************************** +if($_REQUEST['modfunc']=='save' && AllowEdit()) { + $current_RET = DBGet(DBQuery("SELECT STUDENT_ID FROM STUDENTS_JOIN_USERS WHERE STAFF_ID='".UserStaffID()."'"),array(),array('STUDENT_ID')); + foreach($_REQUEST['student'] as $student_id=>$yes) { + if(!$current_RET[$student_id]&& UserStaffID()!='') { + $sql = "INSERT INTO STUDENTS_JOIN_USERS (STUDENT_ID,STAFF_ID) values('".$student_id."','".UserStaffID()."')"; + DBQuery($sql); + } + } + unset($_REQUEST['modfunc']); + $note = get_string('theSelectedUser...', 'Users/AddStudents'); +} +DrawBC(get_string('users', 'users') . ' > '.ProgramTitle()); +if($_REQUEST['modfunc']=='delete' && AllowEdit()) { + if(DeletePrompt(get_string('studentFromThatUser', 'users'),get_string('removeAccessTo', 'users'))) { + DBQuery("DELETE FROM STUDENTS_JOIN_USERS WHERE STUDENT_ID='$_REQUEST[student_id]' AND STAFF_ID='".UserStaffID()."'"); + unset($_REQUEST['modfunc']); + } +} +if($_REQUEST['modfunc']!='delete') { + if(!UserStaffID()) + Search('staff_id','parent'); + else { + $profile = DBGet(DBQuery("SELECT PROFILE FROM STAFF WHERE STAFF_ID='".UserStaffID()."'")); + if($profile[1]['PROFILE']!='parent') { + unset($_SESSION['staff_id']); + echo '<script language=JavaScript>parent.side.location="'.$_SESSION['Side_PHP_SELF'].'?modcat="+parent.side.document.forms[0].modcat.value;</script>'; + Search('staff_id','parent'); + } + } -if($_REQUEST['modfunc']=='save' && AllowEdit()) -{ - $current_RET = DBGet(DBQuery("SELECT STUDENT_ID FROM STUDENTS_JOIN_USERS WHERE STAFF_ID='".UserStaffID()."'"),array(),array('STUDENT_ID')); - foreach($_REQUEST['student'] as $student_id=>$yes) - { - if(!$current_RET[$student_id]&& UserStaffID()!='') - { - $sql = "INSERT INTO STUDENTS_JOIN_USERS (STUDENT_ID,STAFF_ID) values('".$student_id."','".UserStaffID()."')"; - DBQuery($sql); - } - } - unset($_REQUEST['modfunc']); - $note = get_string('theSelectedUser...', 'Users/AddStudents'); -} -DrawBC("Users > ".ProgramTitle()); + if(UserStaffID()) { + if($_REQUEST['search_modfunc']=='list') { + echo "<FORM action=Modules.php?modname=$_REQUEST[modname]&modfunc=save method=POST>"; + } + } -if($_REQUEST['modfunc']=='delete' && AllowEdit()) -{ - if(DeletePrompt('student from that user','remove access to')) - { - DBQuery("DELETE FROM STUDENTS_JOIN_USERS WHERE STUDENT_ID='$_REQUEST[student_id]' AND STAFF_ID='".UserStaffID()."'"); - unset($_REQUEST['modfunc']); - } -} + if($note) + DrawHeader('<IMG SRC=assets/check.gif>'.$note); + if(UserStaffID()) { + echo '<CENTER><TABLE><TR><TD valign=top>'; + DrawHeader("<div><A class=big_font><img src=\"themes/Blue/expanded_view.png\" />".get_string('associate', 'Users/AddStudents')."</A></div><div class=break ></div>",$extra['header_right']); + $current_RET = DBGet(DBQuery("SELECT u.STUDENT_ID,CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME FROM STUDENTS_JOIN_USERS u,STUDENTS s WHERE s.STUDENT_ID=u.STUDENT_ID AND u.STAFF_ID='".UserStaffID()."'")); + $link['remove'] = array('link'=>"Modules.php?modname=$_REQUEST[modname]&modfunc=delete",'variables'=>array('student_id'=>'STUDENT_ID')); + ListOutput($current_RET,array('FULL_NAME'=>get_string('students', 'Users/AddStudents')),'','',$link,array(),array('search'=>false)); + echo '</TD><TD valign=top>'; -if($_REQUEST['modfunc']!='delete') -{ - if(!UserStaffID()) - Search('staff_id','parent'); - else - { - $profile = DBGet(DBQuery("SELECT PROFILE FROM STAFF WHERE STAFF_ID='".UserStaffID()."'")); - if($profile[1]['PROFILE']!='parent') - { - unset($_SESSION['staff_id']); - echo '<script language=JavaScript>parent.side.location="'.$_SESSION['Side_PHP_SELF'].'?modcat="+parent.side.document.forms[0].modcat.value;</script>'; - Search('staff_id','parent'); - } - } - - if(UserStaffID()) - { - if($_REQUEST['search_modfunc']=='list') - { - echo "<FORM action=Modules.php?modname=$_REQUEST[modname]&modfunc=save method=POST>"; - } - } - - if($note) - DrawHeader('<IMG SRC=assets/check.gif>'.$note); - if(UserStaffID()) - { - echo '<CENTER><TABLE><TR><TD valign=top>'; - DrawHeader("<div><A class=big_font><img src=\"themes/Blue/expanded_view.png\" />".get_string('associate', 'Users/AddStudents')."</A></div><div class=break ></div>",$extra['header_right']); - $current_RET = DBGet(DBQuery("SELECT u.STUDENT_ID,CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME FROM STUDENTS_JOIN_USERS u,STUDENTS s WHERE s.STUDENT_ID=u.STUDENT_ID AND u.STAFF_ID='".UserStaffID()."'")); - $link['remove'] = array('link'=>"Modules.php?modname=$_REQUEST[modname]&modfunc=delete",'variables'=>array('student_id'=>'STUDENT_ID')); - #$link['remove'] = array('link'=>"#"." onclick='check_content(\"ajax.php?modname=$_REQUEST[modname]&modfunc=delete\");'",'variables'=>array('student_id'=>'STUDENT_ID')); - // $link['TITLE']['link'] = "#"." onclick='check_content(\"ajax.php?modname=$_REQUEST[modname]&modfunc=$_REQUEST[modfunc]&mp_term=FY\");'"; - ListOutput($current_RET,array('FULL_NAME'=>get_string('students', 'Users/AddStudents')),'','',$link,array(),array('search'=>false)); - echo '</TD><TD valign=top>'; - - $extra['link'] = array('FULL_NAME'=>false); - $extra['SELECT'] = ",NULL AS CHECKBOX"; - $extra['functions'] = array('CHECKBOX'=>'_makeChooseCheckbox'); - $extra['columns_before'] = array('CHECKBOX'=>'</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'student\');"><A>'); - $extra['new'] = true; - $extra['options']['search'] = false; - - if(AllowEdit()) - Search('student_id',$extra); - - echo '</TD></TR></TABLE></CENTER>'; - - if($_REQUEST['search_modfunc']=='list') - echo "<BR><CENTER>".SubmitButton(get_string('addSelectedStudents', 'Users/AddStudents'),'','class=btn_large')."</CENTER></FORM>"; - } -} + $extra['link'] = array('FULL_NAME'=>false); + $extra['SELECT'] = ",NULL AS CHECKBOX"; + $extra['functions'] = array('CHECKBOX'=>'_makeChooseCheckbox'); + $extra['columns_before'] = array('CHECKBOX'=>'</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'student\');"><A>'); + $extra['new'] = true; + $extra['options']['search'] = false; -function _makeChooseCheckbox($value,$title) -{ global $THIS_RET; + if(AllowEdit()) + Search('student_id',$extra); - return "<INPUT type=checkbox name=student[".$THIS_RET['STUDENT_ID']."] value=Y>"; + echo '</TD></TR></TABLE></CENTER>'; + + if($_REQUEST['search_modfunc']=='list') + echo "<BR><CENTER>".SubmitButton(get_string('addSelectedStudents', 'Users/AddStudents'),'','class=btn_large')."</CENTER></FORM>"; + } } +function _makeChooseCheckbox($value,$title) { + global $THIS_RET; + + return "<INPUT type=checkbox name=student[".$THIS_RET['STUDENT_ID']."] value=Y>"; +} ?> Modified: trunk/modules/Users/Exceptions.php =================================================================== --- trunk/modules/Users/Exceptions.php 2010-02-08 15:57:54 UTC (rev 414) +++ trunk/modules/Users/Exceptions.php 2010-02-08 20:09:48 UTC (rev 415) @@ -24,161 +24,138 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. #************************************************************************** -DrawBC("Users > ".ProgramTitle()); +DrawBC(get_string('users', 'users') . ' > '.ProgramTitle()); include 'Menu.php'; -if(!UserStaffID()) - Search('staff_id'); -//else -//{ -// $profile = DBGet(DBQuery("SELECT PROFILE FROM STAFF WHERE STAFF_ID='".UserStaffID()."'")); -// if(!$profile[1]['PROFILE'] || $profile[1]['PROFILE']=='none') -// { -// unset($_SESSION['staff_id']); -// echo '<script language=JavaScript>parent.side.location="'.$_SESSION['Side_PHP_SELF'].'?modcat="+parent.side.document.forms[0].modcat.value; -// Search('staff_id'); -// } -//} +if(!UserStaffID()) { + Search('staff_id'); +} $user_id = UserStaffID(); $profile = DBGet(DBQuery("SELECT PROFILE FROM STAFF WHERE STAFF_ID='$user_id'")); $xprofile = $profile[1]['PROFILE']; $exceptions_RET = DBGet(DBQuery("SELECT MODNAME,CAN_USE,CAN_EDIT FROM STAFF_EXCEPTIONS WHERE USER_ID='$user_id'"),array(),array('MODNAME')); -if($_REQUEST['modfunc']=='update' && AllowEdit()) -{ - $tmp_menu = $menuprof; - $categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STUDENT_FIELD_CATEGORIES")); - foreach($categories_RET as $category) - { - $file = 'Students/Student.php&category_id='.$category['ID']; - $tmp_menu['Students'][$xprofile][$file] = ' › '.$category['TITLE']; - } - $categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STAFF_FIELD_CATEGORIES")); - foreach($categories_RET as $category) - { - $file = 'Users/User.php&category_id='.$category['ID']; - $tmp_menu['Users'][$xprofile][$file] = ' › '.$category['TITLE']; - } +if($_REQUEST['modfunc']=='update' && AllowEdit()) { + $tmp_menu = $menuprof; + $categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STUDENT_FIELD_CATEGORIES")); + foreach($categories_RET as $category) { + $file = 'Students/Student.php&category_id='.$category['ID']; + $tmp_menu['Students'][$xprofile][$file] = ' › '.$category['TITLE']; + } + $categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STAFF_FIELD_CATEGORIES")); + foreach($categories_RET as $category) { + $file = 'Users/User.php&category_id='.$category['ID']; + $tmp_menu['Users'][$xprofile][$file] = ' › '.$category['TITLE']; + } - foreach($tmp_menu as $modcat=>$profiles) - { - $values = $profiles[$xprofile]; - foreach($values as $modname=>$title) - { - if(!is_numeric($modname)) - { - if(!count($exceptions_RET[$modname]) && ($_REQUEST['can_edit'][str_replace('.','_',$modname)] || $_REQUEST['can_use'][str_replace('.','_',$modname)])) - DBQuery("INSERT INTO STAFF_EXCEPTIONS (USER_ID,MODNAME) values('$user_id','$modname')"); - elseif(count($exceptions_RET[$modname]) && !$_REQUEST['can_edit'][str_replace('.','_',$modname)] && !$_REQUEST['can_use'][str_replace('.','_',$modname)]) - DBQuery("DELETE FROM STAFF_EXCEPTIONS WHERE USER_ID='$user_id' AND MODNAME='$modname'"); + foreach($tmp_menu as $modcat=>$profiles) { + $values = $profiles[$xprofile]; + foreach($values as $modname=>$title) { + if(!is_numeric($modname)) { + if(!count($exceptions_RET[$modname]) && ($_REQUEST['can_edit'][str_replace('.','_',$modname)] || $_REQUEST['can_use'][str_replace('.','_',$modname)])) + DBQuery("INSERT INTO STAFF_EXCEPTIONS (USER_ID,MODNAME) values('$user_id','$modname')"); + elseif(count($exceptions_RET[$modname]) && !$_REQUEST['can_edit'][str_replace('.','_',$modname)] && !$_REQUEST['can_use'][str_replace('.','_',$modname)]) + DBQuery("DELETE FROM STAFF_EXCEPTIONS WHERE USER_ID='$user_id' AND MODNAME='$modname'"); - if($_REQUEST['can_edit'][str_replace('.','_',$modname)] || $_REQUEST['can_use'][str_replace('.','_',$modname)]) - { - $update = "UPDATE STAFF_EXCEPTIONS SET "; - if($_REQUEST['can_edit'][str_replace('.','_',$modname)]) - $update .= "CAN_EDIT='Y',"; - else - $update .= "CAN_EDIT=NULL,"; - if($_REQUEST['can_use'][str_replace('.','_',$modname)]) - $update .= "CAN_USE='Y'"; - else - $update .= "CAN_USE=NULL"; - $update .= " WHERE USER_ID='$user_id' AND MODNAME='$modname'"; - DBQuery($update); - } - } - } - } - $exceptions_RET = DBGet(DBQuery("SELECT MODNAME,CAN_USE,CAN_EDIT FROM STAFF_EXCEPTIONS WHERE USER_ID='$user_id'"),array(),array('MODNAME')); - unset($tmp_menu); - unset($_REQUEST['modfunc']); - unset($_REQUEST['can_edit']); - unset($_REQUEST['can_use']); + if($_REQUEST['can_edit'][str_replace('.','_',$modname)] || $_REQUEST['can_use'][str_replace('.','_',$modname)]) { + $update = "UPDATE STAFF_EXCEPTIONS SET "; + if($_REQUEST['can_edit'][str_replace('.','_',$modname)]) + $update .= "CAN_EDIT='Y',"; + else + $update .= "CAN_EDIT=NULL,"; + if($_REQUEST['can_use'][str_replace('.','_',$modname)]) + $update .= "CAN_USE='Y'"; + else + $update .= "CAN_USE=NULL"; + $update .= " WHERE USER_ID='$user_id' AND MODNAME='$modname'"; + DBQuery($update); + } + } + } + } + + $exceptions_RET = DBGet(DBQuery("SELECT MODNAME,CAN_USE,CAN_EDIT FROM STAFF_EXCEPTIONS WHERE USER_ID='$user_id'"),array(),array('MODNAME')); + unset($tmp_menu); + unset($_REQUEST['modfunc']); + unset($_REQUEST['can_edit']); + unset($_REQUEST['can_use']); } if(UserStaffID()) - $staff_RET = DBGet(DBQuery("SELECT FIRST_NAME,LAST_NAME,PROFILE,PROFILE_ID FROM STAFF WHERE STAFF_ID='".UserStaffID()."'")); + $staff_RET = DBGet(DBQuery("SELECT FIRST_NAME,LAST_NAME,PROFILE,PROFILE_ID FROM STAFF WHERE STAFF_ID='".UserStaffID()."'")); -if(UserStaffID() && !$staff_RET[1]['PROFILE_ID']) -{ - echo "<FORM name=exform id=exform action=Modules.php?modname=$_REQUEST[modname]&modfunc=update method=POST>"; - PopTable('header',get_string('permissions', 'Users/Profiles... [truncated message content] |