Thread: [Hw4mdl-svn] SF.net SVN: hw4mdl: [17] trunk/moodle
Brought to you by:
jhlinder,
trollinger
From: <mg...@us...> - 2006-05-25 21:50:45
|
Revision: 17 Author: mgimpel Date: 2006-05-25 14:50:08 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/hw4mdl/?rev=17&view=rev Log Message: ----------- Added copyright and GPL notice to all source code files. Modified Paths: -------------- trunk/moodle/lang/en/liveclassroom.php trunk/moodle/lang/en/voicetool.php trunk/moodle/lang/fr/liveclassroom.php trunk/moodle/lang/fr/voiceboard.php trunk/moodle/lang/fr/voicedirect.php trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/backuplib.php trunk/moodle/mod/liveclassroom/create.php trunk/moodle/mod/liveclassroom/db/mysql.php trunk/moodle/mod/liveclassroom/db/mysql.sql trunk/moodle/mod/liveclassroom/db/postgres7.php trunk/moodle/mod/liveclassroom/db/postgres7.sql trunk/moodle/mod/liveclassroom/index.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/version.php trunk/moodle/mod/liveclassroom/view.php trunk/moodle/mod/voicetool/db/mysql.php trunk/moodle/mod/voicetool/db/mysql.sql trunk/moodle/mod/voicetool/index.php trunk/moodle/mod/voicetool/lib.php trunk/moodle/mod/voicetool/version.php trunk/moodle/mod/voicetool/view.php trunk/moodle/mod/voicetool/voicetoolapi.php Added Paths: ----------- trunk/moodle/LICENSE.txt trunk/moodle/README.txt Added: trunk/moodle/LICENSE.txt =================================================================== --- trunk/moodle/LICENSE.txt (rev 0) +++ trunk/moodle/LICENSE.txt 2006-05-25 21:50:08 UTC (rev 17) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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; either version 2 of the License, or + (at your option) any later version. + + 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, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Property changes on: trunk/moodle/LICENSE.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/moodle/README.txt =================================================================== --- trunk/moodle/README.txt (rev 0) +++ trunk/moodle/README.txt 2006-05-25 21:50:08 UTC (rev 17) @@ -0,0 +1 @@ +Horizon Wimba Moodle Integration aims at providing to the Moodle community integrations of the products developed by Horizon Wimba into Moodle. At this time, we plan to have quickly support for Live Classroom and Voice Tools Activity Modules. \ No newline at end of file Property changes on: trunk/moodle/README.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/moodle/lang/en/liveclassroom.php =================================================================== --- trunk/moodle/lang/en/liveclassroom.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/lang/en/liveclassroom.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,5 +1,33 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + $string['modulename'] = 'Live Classroom'; $string['modulenameplural'] = 'Live Classrooms'; $string['serverconfiguration'] = 'Live Classroom Server Configuration'; @@ -22,7 +50,6 @@ $string['buttoncreateroom'] = 'Create Room'; $string['roomcreated'] = 'Room was successfully created'; - $string['wizard.text.1'] = 'Note: The first time that you enter the Live Classroom you will need to run the'; $string['wizard.text.2'] = 'setup wizard'; $string['wizard.text.3'] = 'in order to make sure your computer is ready.'; Modified: trunk/moodle/lang/en/voicetool.php =================================================================== --- trunk/moodle/lang/en/voicetool.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/lang/en/voicetool.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,9 +1,36 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + $string['modulename'] = 'Wimba Voice Tool'; $string['modulenameplural'] = 'Wimba Voice Tools'; - // configuration stuff $string['serverconfiguration'] = 'Voice Tools Server Configuration'; $string['explainserverconfiguration'] = 'This is the Voice Tools Server Configuration.'; @@ -17,7 +44,6 @@ $string['is_allowed.false'] = 'The configuration is not correct. The url of this server is not allowed in your Voice Tools Server. Please, click on Continue to go back to the configuration page.'; $string['Invalid account/secret'] = 'The account/password you entered is not acknowledged by the server. Please, click Continue and verify the values you entered match with the values in the Voice Tools Server.'; - // common VT items $string['title'] = 'Title'; $string['description'] = 'Description'; @@ -26,12 +52,10 @@ $string['goodquality'] = 'Good Quality (FM Radio quality) - 20.8 kbit/s - Broadband usage'; $string['audioquality'] = 'Audio Quality'; - // Voice Direct tags $string['voicedirect'] = 'Voice Direct'; $string['voicedirects'] = 'Voice Directs'; $string['archivesession'] = 'Archive Sessions'; - ?> Modified: trunk/moodle/lang/fr/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr/liveclassroom.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/lang/fr/liveclassroom.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,5 +1,33 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + $string['modulename'] = 'Live Classroom'; $string['modulenameplural'] = 'Live Classrooms'; $string['serverconfiguration'] = 'Configuration du Serveur Live Classroom'; Modified: trunk/moodle/lang/fr/voiceboard.php =================================================================== --- trunk/moodle/lang/fr/voiceboard.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/lang/fr/voiceboard.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,5 +1,33 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + $string['modulename'] = 'Forum vocal'; $string['modulenameplural'] = 'Forums vocaux'; Modified: trunk/moodle/lang/fr/voicedirect.php =================================================================== --- trunk/moodle/lang/fr/voicedirect.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/lang/fr/voicedirect.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,5 +1,33 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + $string['modulename'] = 'Voice Direct'; $string['modulenameplural'] = 'Voice Directs'; Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/api.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,4 +1,33 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ + +/* $Id$ */ + /** * api.php - Sets up sessions, connects to LC server and so on * @@ -7,7 +36,7 @@ * * Normally this is only called by liveclassroom *lib.php files * @author Hugues Pisapia - * @version $Revision:$ + * @version $Revision$ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package liveclassroom */ Modified: trunk/moodle/mod/liveclassroom/backuplib.php =================================================================== --- trunk/moodle/mod/liveclassroom/backuplib.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/backuplib.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,4 +1,33 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ + +/* $Id$ */ + /// Library of functions and constants for module liveclassroom require_once($CFG->libdir.'/datalib.php'); Modified: trunk/moodle/mod/liveclassroom/create.php =================================================================== --- trunk/moodle/mod/liveclassroom/create.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/create.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,5 +1,33 @@ <?php +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + require_once('../../config.php'); require_once('lib.php'); Modified: trunk/moodle/mod/liveclassroom/db/mysql.php =================================================================== --- trunk/moodle/mod/liveclassroom/db/mysql.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/db/mysql.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,12 +1,40 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + function liveclassroom_upgrade($oldversion) { /// This function does anything necessary to upgrade /// older versions to match current functionality global $CFG; - if ($oldversion < 2003092800) { + if ($oldversion < 2006041500) { # Do something ... Modified: trunk/moodle/mod/liveclassroom/db/mysql.sql =================================================================== --- trunk/moodle/mod/liveclassroom/db/mysql.sql 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/db/mysql.sql 2006-05-25 21:50:08 UTC (rev 17) @@ -1,3 +1,32 @@ +#****************************************************************************** +#* * +#* Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * +#* * +#* COPYRIGHT: * +#* This software is the property of Horizon Wimba. * +#* You can redistribute it and/or modify it under the terms of * +#* the GNU General Public License as published by the * +#* Free Software Foundation. * +#* * +#* WARRANTIES: * +#* This software 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 the Horizon Wimba Moodle Integration; * +#* if not, write to the Free Software Foundation, Inc., * +#* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * +#* * +#* Author: Hugues Pisapia * +#* * +#* Date: 15th April 2006 * +#* * +#****************************************************************************** + +# $Id$ + # This file contains a complete database schema for all the # tables used by this module, written in SQL Modified: trunk/moodle/mod/liveclassroom/db/postgres7.php =================================================================== --- trunk/moodle/mod/liveclassroom/db/postgres7.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/db/postgres7.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,12 +1,40 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ +/* $Id$ */ + function liveclassroom_upgrade($oldversion) { /// This function does anything necessary to upgrade /// older versions to match current functionality global $CFG; - if ($oldversion < 2003092800) { + if ($oldversion < 2006041500) { # Do something ... Modified: trunk/moodle/mod/liveclassroom/db/postgres7.sql =================================================================== --- trunk/moodle/mod/liveclassroom/db/postgres7.sql 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/db/postgres7.sql 2006-05-25 21:50:08 UTC (rev 17) @@ -1,3 +1,32 @@ +#****************************************************************************** +#* * +#* Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * +#* * +#* COPYRIGHT: * +#* This software is the property of Horizon Wimba. * +#* You can redistribute it and/or modify it under the terms of * +#* the GNU General Public License as published by the * +#* Free Software Foundation. * +#* * +#* WARRANTIES: * +#* This software 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 the Horizon Wimba Moodle Integration; * +#* if not, write to the Free Software Foundation, Inc., * +#* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * +#* * +#* Author: Hugues Pisapia * +#* * +#* Date: 15th April 2006 * +#* * +#****************************************************************************** + +# $Id$ + # This file contains a complete database schema for all the # tables used by this module, written in SQL Modified: trunk/moodle/mod/liveclassroom/index.php =================================================================== --- trunk/moodle/mod/liveclassroom/index.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/index.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,8 +1,35 @@ -<?PHP // $Id$ +<?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ -/// This page lists all the instances of NEWMODULE in a particular course -/// Replace NEWMODULE with the name of your module +/* $Id$ */ +/// This page lists all the instances of liveclassroom in a particular course + require_once("../../config.php"); require_once("lib.php"); Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,4 +1,33 @@ <?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * * + ******************************************************************************/ + +/* $Id$ */ + /// Library of functions and constants for module liveclassroom require_once($CFG->libdir.'/datalib.php'); Modified: trunk/moodle/mod/liveclassroom/version.php =================================================================== --- trunk/moodle/mod/liveclassroom/version.php 2006-05-25 21:27:11 UTC (rev 16) +++ trunk/moodle/mod/liveclassroom/version.php 2006-05-25 21:50:08 UTC (rev 17) @@ -1,11 +1,39 @@ -<?PHP // $Id$ +<?PHP +/****************************************************************************** + * * + * Copyright (c) 1999-2006 Horizon Wimba, All Rights Reserved. * + * * + * COPYRIGHT: * + * This software is the property of Horizon Wimba. * + * You can redistribute it and/or modify it under the terms of * + * the GNU General Public License as published by the * + * Free Software Foundation. * + * * + * WARRANTIES: * + * This software 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 the Horizon Wimba Moodle Integration; * + * if not, write to the Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * + * * + * Author: Hugues Pisapia * + * * + * Date: 15th April 2006 * + * ... [truncated message content] |
From: <hu...@us...> - 2006-07-05 13:38:28
|
Revision: 41 Author: hugues Date: 2006-07-05 06:38:19 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/hw4mdl/?rev=41&view=rev Log Message: ----------- reverting to version 18 Modified Paths: -------------- trunk/moodle/README.txt trunk/moodle/mod/liveclassroom/README.txt trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/index.php trunk/moodle/mod/liveclassroom/lib.php Removed Paths: ------------- trunk/moodle/mod/liveclassroom/PEAR.php trunk/moodle/mod/liveclassroom/System.php Modified: trunk/moodle/README.txt =================================================================== --- trunk/moodle/README.txt 2006-06-30 10:00:33 UTC (rev 40) +++ trunk/moodle/README.txt 2006-07-05 13:38:19 UTC (rev 41) @@ -1 +1 @@ - Horizon Wimba Moodle Integration aims at providing to the Moodle community integrations of the products developed by Horizon Wimba into Moodle. At this time, we plan to have quickly support for Live Classroom and Voice Tools Activity Modules. \ No newline at end of file +Horizon Wimba Moodle Integration aims at providing to the Moodle community integrations of the products developed by Horizon Wimba into Moodle. At this time, we plan to have quickly support for Live Classroom and Voice Tools Activity Modules. \ No newline at end of file Deleted: trunk/moodle/mod/liveclassroom/PEAR.php =================================================================== --- trunk/moodle/mod/liveclassroom/PEAR.php 2006-06-30 10:00:33 UTC (rev 40) +++ trunk/moodle/mod/liveclassroom/PEAR.php 2006-07-05 13:38:19 UTC (rev 41) @@ -1,1101 +0,0 @@ -<?php -/** - * PEAR, the PHP Extension and Application Repository - * - * PEAR class and PEAR_Error class - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to li...@ph... so we can mail you a copy immediately. - * - * @category pear - * @package PEAR - * @author Sterling Hughes <ste...@ph...> - * @author Stig Bakken <ss...@ph...> - * @author Tomas V.V.Cox <co...@id...> - * @author Greg Beaver <ce...@ph...> - * @copyright 1997-2006 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id$ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/**#@+ - * ERROR constants - */ -define('PEAR_ERROR_RETURN', 1); -define('PEAR_ERROR_PRINT', 2); -define('PEAR_ERROR_TRIGGER', 4); -define('PEAR_ERROR_DIE', 8); -define('PEAR_ERROR_CALLBACK', 16); -/** - * WARNING: obsolete - * @deprecated - */ -define('PEAR_ERROR_EXCEPTION', 32); -/**#@-*/ -define('PEAR_ZE2', (function_exists('version_compare') && - version_compare(zend_version(), "2-dev", "ge"))); - -if (substr(PHP_OS, 0, 3) == 'WIN') { - define('OS_WINDOWS', true); - define('OS_UNIX', false); - define('PEAR_OS', 'Windows'); -} else { - define('OS_WINDOWS', false); - define('OS_UNIX', true); - define('PEAR_OS', 'Unix'); // blatant assumption -} - -// instant backwards compatibility -if (!defined('PATH_SEPARATOR')) { - if (OS_WINDOWS) { - define('PATH_SEPARATOR', ';'); - } else { - define('PATH_SEPARATOR', ':'); - } -} - -$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN; -$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE; -$GLOBALS['_PEAR_destructor_object_list'] = array(); -$GLOBALS['_PEAR_shutdown_funcs'] = array(); -$GLOBALS['_PEAR_error_handler_stack'] = array(); - -@ini_set('track_errors', true); - -/** - * Base class for other PEAR classes. Provides rudimentary - * emulation of destructors. - * - * If you want a destructor in your class, inherit PEAR and make a - * destructor method called _yourclassname (same name as the - * constructor, but with a "_" prefix). Also, in your constructor you - * have to call the PEAR constructor: $this->PEAR();. - * The destructor method will be called without parameters. Note that - * at in some SAPI implementations (such as Apache), any output during - * the request shutdown (in which destructors are called) seems to be - * discarded. If you need to get any debug information from your - * destructor, use error_log(), syslog() or something similar. - * - * IMPORTANT! To use the emulated destructors you need to create the - * objects by reference: $obj =& new PEAR_child; - * - * @category pear - * @package PEAR - * @author Stig Bakken <ss...@ph...> - * @author Tomas V.V. Cox <co...@id...> - * @author Greg Beaver <ce...@ph...> - * @copyright 1997-2006 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.9 - * @link http://pear.php.net/package/PEAR - * @see PEAR_Error - * @since Class available since PHP 4.0.2 - * @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear - */ -class PEAR -{ - // {{{ properties - - /** - * Whether to enable internal debug messages. - * - * @var bool - * @access private - */ - var $_debug = false; - - /** - * Default error mode for this object. - * - * @var int - * @access private - */ - var $_default_error_mode = null; - - /** - * Default error options used for this object when error mode - * is PEAR_ERROR_TRIGGER. - * - * @var int - * @access private - */ - var $_default_error_options = null; - - /** - * Default error handler (callback) for this object, if error mode is - * PEAR_ERROR_CALLBACK. - * - * @var string - * @access private - */ - var $_default_error_handler = ''; - - /** - * Which class to use for error objects. - * - * @var string - * @access private - */ - var $_error_class = 'PEAR_Error'; - - /** - * An array of expected errors. - * - * @var array - * @access private - */ - var $_expected_errors = array(); - - // }}} - - // {{{ constructor - - /** - * Constructor. Registers this object in - * $_PEAR_destructor_object_list for destructor emulation if a - * destructor object exists. - * - * @param string $error_class (optional) which class to use for - * error objects, defaults to PEAR_Error. - * @access public - * @return void - */ - function PEAR($error_class = null) - { - $classname = strtolower(get_class($this)); - if ($this->_debug) { - print "PEAR constructor called, class=$classname\n"; - } - if ($error_class !== null) { - $this->_error_class = $error_class; - } - while ($classname && strcasecmp($classname, "pear")) { - $destructor = "_$classname"; - if (method_exists($this, $destructor)) { - global $_PEAR_destructor_object_list; - $_PEAR_destructor_object_list[] = &$this; - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { - register_shutdown_function("_PEAR_call_destructors"); - $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; - } - break; - } else { - $classname = get_parent_class($classname); - } - } - } - - // }}} - // {{{ destructor - - /** - * Destructor (the emulated type of...). Does nothing right now, - * but is included for forward compatibility, so subclass - * destructors should always call it. - * - * See the note in the class desciption about output from - * destructors. - * - * @access public - * @return void - */ - function _PEAR() { - if ($this->_debug) { - printf("PEAR destructor called, class=%s\n", strtolower(get_class($this))); - } - } - - // }}} - // {{{ getStaticProperty() - - /** - * If you have a class that's mostly/entirely static, and you need static - * properties, you can use this method to simulate them. Eg. in your method(s) - * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); - * You MUST use a reference, or they will not persist! - * - * @access public - * @param string $class The calling classname, to prevent clashes - * @param string $var The variable to retrieve. - * @return mixed A reference to the variable. If not set it will be - * auto initialised to NULL. - */ - function &getStaticProperty($class, $var) - { - static $properties; - return $properties[$class][$var]; - } - - // }}} - // {{{ registerShutdownFunc() - - /** - * Use this function to register a shutdown method for static - * classes. - * - * @access public - * @param mixed $func The function name (or array of class/method) to call - * @param mixed $args The arguments to pass to the function - * @return void - */ - function registerShutdownFunc($func, $args = array()) - { - // if we are called statically, there is a potential - // that no shutdown func is registered. Bug #6445 - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { - register_shutdown_function("_PEAR_call_destructors"); - $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; - } - $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args); - } - - // }}} - // {{{ isError() - - /** - * Tell whether a value is a PEAR error. - * - * @param mixed $data the value to test - * @param int $code if $data is an error object, return true - * only if $code is a string and - * $obj->getMessage() == $code or - * $code is an integer and $obj->getCode() == $code - * @access public - * @return bool true if parameter is an error - */ - function isError($data, $code = null) - { - if (is_a($data, 'PEAR_Error')) { - if (is_null($code)) { - return true; - } elseif (is_string($code)) { - return $data->getMessage() == $code; - } else { - return $data->getCode() == $code; - } - } - return false; - } - - // }}} - // {{{ setErrorHandling() - - /** - * Sets how errors generated by this object should be handled. - * Can be invoked both in objects and statically. If called - * statically, setErrorHandling sets the default behaviour for all - * PEAR objects. If called in an object, setErrorHandling sets - * the default behaviour for that object. - * - * @param int $mode - * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, - * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, - * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION. - * - * @param mixed $options - * When $mode is PEAR_ERROR_TRIGGER, this is the error level (one - * of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). - * - * When $mode is PEAR_ERROR_CALLBACK, this parameter is expected - * to be the callback function or method. A callback - * function is a string with the name of the function, a - * callback method is an array of two elements: the element - * at index 0 is the object, and the element at index 1 is - * the name of the method to call in the object. - * - * When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is - * a printf format string used when printing the error - * message. - * - * @access public - * @return void - * @see PEAR_ERROR_RETURN - * @see PEAR_ERROR_PRINT - * @see PEAR_ERROR_TRIGGER - * @see PEAR_ERROR_DIE - * @see PEAR_ERROR_CALLBACK - * @see PEAR_ERROR_EXCEPTION - * - * @since PHP 4.0.5 - */ - - function setErrorHandling($mode = null, $options = null) - { - if (isset($this) && is_a($this, 'PEAR')) { - $setmode = &$this->_default_error_mode; - $setoptions = &$this->_default_error_options; - } else { - $setmode = &$GLOBALS['_PEAR_default_error_mode']; - $setoptions = &$GLOBALS['_PEAR_default_error_options']; - } - - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $setmode = $mode; - $setoptions = $options; - break; - - case PEAR_ERROR_CALLBACK: - $setmode = $mode; - // class/object method callback - if (is_callable($options)) { - $setoptions = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - } - - // }}} - // {{{ expectError() - - /** - * This method is used to tell which errors you expect to get. - * Expected errors are always returned with error mode - * PEAR_ERROR_RETURN. Expected error codes are stored in a stack, - * and this method pushes a new element onto it. The list of - * expected errors are in effect until they are popped off the - * stack with the popExpect() method. - * - * Note that this method can not be called statically - * - * @param mixed $code a single error code or an array of error codes to expect - * - * @return int the new depth of the "expected errors" stack - * @access public - */ - function expectError($code = '*') - { - if (is_array($code)) { - array_push($this->_expected_errors, $code); - } else { - array_push($this->_expected_errors, array($code)); - } - return sizeof($this->_expected_errors); - } - - // }}} - // {{{ popExpect() - - /** - * This method pops one element off the expected error codes - * stack. - * - * @return array the list of error codes that were popped - */ - function popExpect() - { - return array_pop($this->_expected_errors); - } - - // }}} - // {{{ _checkDelExpect() - - /** - * This method checks unsets an error code if available - * - * @param mixed error code - * @return bool true if the error code was unset, false otherwise - * @access private - * @since PHP 4.3.0 - */ - function _checkDelExpect($error_code) - { - $deleted = false; - - foreach ($this->_expected_errors AS $key => $error_array) { - if (in_array($error_code, $error_array)) { - unset($this->_expected_errors[$key][array_search($error_code, $error_array)]); - $deleted = true; - } - - // clean up empty arrays - if (0 == count($this->_expected_errors[$key])) { - unset($this->_expected_errors[$key]); - } - } - return $deleted; - } - - // }}} - // {{{ delExpect() - - /** - * This method deletes all occurences of the specified element from - * the expected error codes stack. - * - * @param mixed $error_code error code that should be deleted - * @return mixed list of error codes that were deleted or error - * @access public - * @since PHP 4.3.0 - */ - function delExpect($error_code) - { - $deleted = false; - - if ((is_array($error_code) && (0 != count($error_code)))) { - // $error_code is a non-empty array here; - // we walk through it trying to unset all - // values - foreach($error_code as $key => $error) { - if ($this->_checkDelExpect($error)) { - $deleted = true; - } else { - $deleted = false; - } - } - return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } elseif (!empty($error_code)) { - // $error_code comes alone, trying to unset it - if ($this->_checkDelExpect($error_code)) { - return true; - } else { - return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } - } else { - // $error_code is empty - return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME - } - } - - // }}} - // {{{ raiseError() - - /** - * This method is a wrapper that returns an instance of the - * configured error class with this object's default error - * handling applied. If the $mode and $options parameters are not - * specified, the object's defaults are used. - * - * @param mixed $message a text error message or a PEAR error object - * - * @param int $code a numeric error code (it is up to your class - * to define these if you want to use codes) - * - * @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, - * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, - * PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION. - * - * @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter - * specifies the PHP-internal error level (one of - * E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR). - * If $mode is PEAR_ERROR_CALLBACK, this - * parameter specifies the callback function or - * method. In other error modes this parameter - * is ignored. - * - * @param string $userinfo If you need to pass along for example debug - * information, this parameter is meant for that. - * - * @param string $error_class The returned error object will be - * instantiated from this class, if specified. - * - * @param bool $skipmsg If true, raiseError will only pass error codes, - * the error message parameter will be dropped. - * - * @access public - * @return object a PEAR error object - * @see PEAR::setErrorHandling - * @since PHP 4.0.5 - */ - function &raiseError($message = null, - $code = null, - $mode = null, - $options = null, - $userinfo = null, - $error_class = null, - $skipmsg = false) - { - // The error is yet a PEAR error object - if (is_object($message)) { - $code = $message->getCode(); - $userinfo = $message->getUserInfo(); - $error_class = $message->getType(); - $message->error_message_prefix = ''; - $message = $message->getMessage(); - } - - if (isset($this) && isset($this->_expected_errors) && sizeof($this->_expected_errors) > 0 && sizeof($exp = end($this->_expected_errors))) { - if ($exp[0] == "*" || - (is_int(reset($exp)) && in_array($code, $exp)) || - (is_string(reset($exp)) && in_array($message, $exp))) { - $mode = PEAR_ERROR_RETURN; - } - } - // No mode given, try global ones - if ($mode === null) { - // Class error handler - if (isset($this) && isset($this->_default_error_mode)) { - $mode = $this->_default_error_mode; - $options = $this->_default_error_options; - // Global error handler - } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) { - $mode = $GLOBALS['_PEAR_default_error_mode']; - $options = $GLOBALS['_PEAR_default_error_options']; - } - } - - if ($error_class !== null) { - $ec = $error_class; - } elseif (isset($this) && isset($this->_error_class)) { - $ec = $this->_error_class; - } else { - $ec = 'PEAR_Error'; - } - if ($skipmsg) { - $a = &new $ec($code, $mode, $options, $userinfo); - return $a; - } else { - $a = &new $ec($message, $code, $mode, $options, $userinfo); - return $a; - } - } - - // }}} - // {{{ throwError() - - /** - * Simpler form of raiseError with fewer options. In most cases - * message, code and userinfo are enough. - * - * @param string $message - * - */ - function &throwError($message = null, - $code = null, - $userinfo = null) - { - if (isset($this) && is_a($this, 'PEAR')) { - $a = &$this->raiseError($message, $code, null, null, $userinfo); - return $a; - } else { - $a = &PEAR::raiseError($message, $code, null, null, $userinfo); - return $a; - } - } - - // }}} - function staticPushErrorHandling($mode, $options = null) - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - $def_mode = &$GLOBALS['_PEAR_default_error_mode']; - $def_options = &$GLOBALS['_PEAR_default_error_options']; - $stack[] = array($def_mode, $def_options); - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $def_mode = $mode; - $def_options = $options; - break; - - case PEAR_ERROR_CALLBACK: - $def_mode = $mode; - // class/object method callback - if (is_callable($options)) { - $def_options = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - $stack[] = array($mode, $options); - return true; - } - - function staticPopErrorHandling() - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - $setmode = &$GLOBALS['_PEAR_default_error_mode']; - $setoptions = &$GLOBALS['_PEAR_default_error_options']; - array_pop($stack); - list($mode, $options) = $stack[sizeof($stack) - 1]; - array_pop($stack); - switch ($mode) { - case PEAR_ERROR_EXCEPTION: - case PEAR_ERROR_RETURN: - case PEAR_ERROR_PRINT: - case PEAR_ERROR_TRIGGER: - case PEAR_ERROR_DIE: - case null: - $setmode = $mode; - $setoptions = $options; - break; - - case PEAR_ERROR_CALLBACK: - $setmode = $mode; - // class/object method callback - if (is_callable($options)) { - $setoptions = $options; - } else { - trigger_error("invalid error callback", E_USER_WARNING); - } - break; - - default: - trigger_error("invalid error mode", E_USER_WARNING); - break; - } - return true; - } - - // {{{ pushErrorHandling() - - /** - * Push a new error handler on top of the error handler options stack. With this - * you can easily override the actual error handler for some code and restore - * it later with popErrorHandling. - * - * @param mixed $mode (same as setErrorHandling) - * @param mixed $options (same as setErrorHandling) - * - * @return bool Always true - * - * @see PEAR::setErrorHandling - */ - function pushErrorHandling($mode, $options = null) - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - if (isset($this) && is_a($this, 'PEAR')) { - $def_mode = &$this->_default_error_mode; - $def_options = &$this->_default_error_options; - } else { - $def_mode = &$GLOBALS['_PEAR_default_error_mode']; - $def_options = &$GLOBALS['_PEAR_default_error_options']; - } - $stack[] = array($def_mode, $def_options); - - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); - } else { - PEAR::setErrorHandling($mode, $options); - } - $stack[] = array($mode, $options); - return true; - } - - // }}} - // {{{ popErrorHandling() - - /** - * Pop the last error handler used - * - * @return bool Always true - * - * @see PEAR::pushErrorHandling - */ - function popErrorHandling() - { - $stack = &$GLOBALS['_PEAR_error_handler_stack']; - array_pop($stack); - list($mode, $options) = $stack[sizeof($stack) - 1]; - array_pop($stack); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); - } else { - PEAR::setErrorHandling($mode, $options); - } - return true; - } - - // }}} - // {{{ loadExtension() - - /** - * OS independant PHP extension load. Remember to take care - * on the correct extension name for case sensitive OSes. - * - * @param string $ext The extension name - * @return bool Success or not on the dl() call - */ - function loadExtension($ext) - { - if (!extension_loaded($ext)) { - // if either returns true dl() will produce a FATAL error, stop that - if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) { - return false; - } - if (OS_WINDOWS) { - $suffix = '.dll'; - } elseif (PHP_OS == 'HP-UX') { - $suffix = '.sl'; - } elseif (PHP_OS == 'AIX') { - $suffix = '.a'; - } elseif (PHP_OS == 'OSX') { - $suffix = '.bundle'; - } else { - $suffix = '.so'; - } - return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix); - } - return true; - } - - // }}} -} - -// {{{ _PEAR_call_destructors() - -function _PEAR_call_destructors() -{ - global $_PEAR_destructor_object_list; - if (is_array($_PEAR_destructor_object_list) && - sizeof($_PEAR_destructor_object_list)) - { - reset($_PEAR_destructor_object_list); - if (@PEAR::getStaticProperty('PEAR', 'destructlifo')) { - $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); - } - while (list($k, $objref) = each($_PEAR_destructor_object_list)) { - $classname = get_class($objref); - while ($classname) { - $destructor = "_$classname"; - if (method_exists($objref, $destructor)) { - $objref->$destructor(); - break; - } else { - $classname = get_parent_class($classname); - } - } - } - // Empty the object list to ensure that destructors are - // not called more than once. - $_PEAR_destructor_object_list = array(); - } - - // Now call the shutdown functions - if (is_array($GLOBALS['_PEAR_shutdown_funcs']) AND !empty($GLOBALS['_PEAR_shutdown_funcs'])) { - foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) { - call_user_func_array($value[0], $value[1]); - } - } -} - -// }}} -/** - * Standard PEAR error class for PHP 4 - * - * This class is supserseded by {@link PEAR_Exception} in PHP 5 - * - * @category pear - * @package PEAR - * @author Stig Bakken <ss...@ph...> - * @author Tomas V.V. Cox <co...@id...> - * @author Gregory Beaver <ce...@ph...> - * @copyright 1997-2006 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.4.9 - * @link http://pear.php.net/manual/en/core.pear.pear-error.php - * @see PEAR::raiseError(), PEAR::throwError() - * @since Class available since PHP 4.0.2 - */ -class PEAR_Error -{ - // {{{ properties - - var $error_message_prefix = ''; - var $mode = PEAR_ERROR_RETURN; - var $level = E_USER_NOTICE; - var $code = -1; - var $message = ''; - var $userinfo = ''; - var $backtrace = null; - - // }}} - // {{{ constructor - - /** - * PEAR_Error constructor - * - * @param string $message message - * - * @param int $code (optional) error code - * - * @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN, - * PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER, - * PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION - * - * @param mixed $options (optional) error level, _OR_ in the case of - * PEAR_ERROR_CALLBACK, the callback function or object/method - * tuple. - * - * @param string $userinfo (optional) additional user/debug info - * - * @access public - * - */ - function PEAR_Error($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null) - { - if ($mode === null) { - $mode = PEAR_ERROR_RETURN; - } - $this->message = $message; - $this->code = $code; - $this->mode = $mode; - $this->userinfo = $userinfo; - if (function_exists("debug_backtrace")) { - if (@!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { - $this->backtrace = debug_backtrace(); - } - } - if ($mode & PEAR_ERROR_CALLBACK) { - $this->level = E_USER_NOTICE; - $this->callback = $options; - } else { - if ($options === null) { - $options = E_USER_NOTICE; - } - $this->level = $options; - $this->callback = null; - } - if ($this->mode & PEAR_ERROR_PRINT) { - if (is_null($options) || is_int($options)) { - $format = "%s"; - } else { - $format = $options; - } - printf($format, $this->getMessage()); - } - if ($this->mode & PEAR_ERROR_TRIGGER) { - trigger_error($this->getMessage(), $this->level); - } - if ($this->mode & PEAR_ERROR_DIE) { - $msg = $this->getMessage(); - if (is_null($options) || is_int($options)) { - $format = "%s"; - if (substr($msg, -1) != "\n") { - $msg .= "\n"; - } - } else { - $format = $options; - } - die(sprintf($format, $msg)); - } - if ($this->mode & PEAR_ERROR_CALLBACK) { - if (is_callable($this->callback)) { - call_user_func($this->callback, $this); - } - } - if ($this->mode & PEAR_ERROR_EXCEPTION) { - trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING); - eval('$e = new Exception($this->message, $this->code);throw($e);'); - } - } - - // }}} - // {{{ getMode() - - /** - * Get the error mode from an error object. - * - * @return int error mode - * @access public - */ - function getMode() { - return $this->mode; - } - - // }}} - // {{{ getCallback() - - /** - * Get the callback function/method from an error object. - * - * @return mixed callback function or object/method array - * @access public - */ - function getCallback() { - return $this->callback; - } - - // }}} - // {{{ getMessage() - - - /** - * Get the error message from an error object. - * - * @return string full error message - * @access public - */ - function getMessage() - { - return ($this->error_message_prefix . $this->message); - } - - - // }}} - // {{{ getCode() - - /** - * Get error code from an error object - * - * @return int error code - * @access public - */ - function getCode() - { - return $this->code; - } - - // }}} - // {{{ getType() - - /** - * Get the name of this error/exception. - * - * @return string error/exception name (type) - * @access public - */ - function getType() - { - return get_class($this); - } - - // }}} - // {{{ getUserInfo() - - /** - * Get additional user-supplied information. - * - * @return string user-supplied information - * @access public - */ - function getUserInfo() - { - return $this->userinfo; - } - - // }}} - // {{{ getDebugInfo() - - /** - * Get additional debug information supplied by the application. - * - * @return string debug information - * @access public - */ - function getDebugInfo() - { - return $this->getUserInfo(); - } - - // }}} - // {{{ getBacktrace() - - /** - * Get the call backtrace from where the error was generated. - * Supported with PHP 4.3.0 or newer. - * - * @param int $frame (optional) what frame to fetch - * @return array Backtrace, or NULL if not available. - * @access public - */ - function getBacktrace($frame = null) - { - if (defined('PEAR_IGNORE_BACKTRACE')) { - return null; - } - if ($frame === null) { - return $this->backtrace; - } - return $this->backtrace[$frame]; - } - - // }}} - // {{{ addUserInfo() - - function addUserInfo($info) - { - if (empty($this->userinfo)) { - $this->userinfo = $info; - } else { - $this->userinfo .= " ** $info"; - } - } - - // }}} - // {{{ toString() - - /** - * Make a string representation of this object. - * - * @return string a string with an object summary - * @access public - */ - function toString() { - $modes = array(); - $levels = array(E_USER_NOTICE => 'notice', - E_USER_WARNING => 'warning', - E_USER_ERROR => 'error'); - if ($this->mode & PEAR_ERROR_CALLBACK) { - if (is_array($this->callback)) { - $callback = (is_object($this->callback[0]) ? - strtolower(get_class($this->callback[0])) : - $this->callback[0]) . '::' . - $this->callback[1]; - } else { - $callback = $this->callback; - } - return sprintf('[%s: message="%s" code=%d mode=callback '. - 'callback=%s prefix="%s" info="%s"]', - strtolower(get_class($this)), $this->message, $this->code, - $callback, $this->error_message_prefix, - $this->userinfo); - } - if ($this->mode & PEAR_ERROR_PRINT) { - $modes[] = 'print'; - } - if ($this->mode & PEAR_ERROR_TRIGGER) { - $modes[] = 'trigger'; - } - if ($this->mode & PEAR_ERROR_DIE) { - $modes[] = 'die'; - } - if ($this->mode & PEAR_ERROR_RETURN) { - $modes[] = 'return'; - } - return sprintf('[%s: message="%s" code=%d mode=%s level=%s '. - 'prefix="%s" info="%s"]', - strtolower(get_class($this)), $this->message, $this->code, - implode("|", $modes), $levels[$this->level], - $this->error_message_prefix, - $this->userinfo); - } - - // }}} -} - -/* - * Local Variables: - * mode: php - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ -?> Modified: trunk/moodle/mod/liveclassroom/README.txt =================================================================== --- trunk/moodle/mod/liveclassroom/README.txt 2006-06-30 10:00:33 UTC (rev 40) +++ trunk/moodle/mod/liveclassroom/README.txt 2006-07-05 13:38:19 UTC (rev 41) @@ -1,4 +1,4 @@ -TODO bis: updqte this README file to make it hw4mdl specific. +TODO: updqte this README file to make it hw4mdl specific. USING THE NEW MODULE TEMPLATE ----------------------------- Deleted: trunk/moodle/mod/liveclassroom/System.php =================================================================== --- trunk/moodle/mod/liveclassroom/System.php 2006-06-30 10:00:33 UTC (rev 40) +++ trunk/moodle/mod/liveclassroom/System.php 2006-07-05 13:38:19 UTC (rev 41) @@ -1,587 +0,0 @@ -<?php -/** - * File/Directory manipulation - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to li...@ph... so we can mail you a copy immediately. - * - * @category pear - * @package System - * @author Tomas V.V.Cox <co...@id...> - * @copyright 1997-2006 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id$ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR.php'; -require_once 'Console/Getopt.php'; - -$GLOBALS['_System_temp_files'] = array(); - -/** -* System offers cross plattform compatible system functions -* -* Static functions for different operations. Should work under -* Unix and Windows. The names and usage has been taken from its respectively -* GNU commands. The functions will return (bool) false on error and will -* trigger the error with the PHP trigger_error() function (you can silence -* the error by prefixing a '@' sign after the function call). -* -* Documentation on this class you can find in: -* http://pear.php.net/manual/ -* -* Example usage: -* if (!@System::rm('-r file1 dir1')) { -* print "could not delete file1 or dir1"; -* } -* -* In case you need to to pass file names with spaces, -* pass the params as an array: -* -* System::rm(array('-r', $file1, $dir1)); -* -* @category pear -* @package System -* @author Tomas V.V. Cox <co...@id...> -* @copyright 1997-2006 The PHP Group -* @license http://www.php.net/license/3_0.txt PHP License 3.0 -* @version Release: 1.4.9 -* @link http://pear.php.net/package/PEAR -* @since Class available since Release 0.1 -*/ -class System -{ - /** - * returns the commandline arguments of a function - * - * @param string $argv the commandline - * @param string $short_options the allowed option short-tags - * @param string $long_options the allowed option long-tags - * @return array the given options and there values - * @access private - */ - function _parseArgs($argv, $short_options, $long_options = null) - { - if (!is_array($argv) && $argv !== null) { - $argv = preg_split('/\s+/', $argv, -1, PREG_SPLIT_NO_EMPTY); - } - return Console_Getopt::getopt2($argv, $short_options); - } - - /** - * Output errors with PHP trigger_error(). You can silence the errors - * with prefixing a "@" sign to the function call: @System::mkdir(..); - * - * @param mixed $error a PEAR error or a string with the error message - * @return bool false - * @access private - */ - function raiseError($error) - { - if (PEAR::isError($error)) { - $error = $error->getMessage(); - } - trigger_error($error, E_USER_WARNING); - return false; - } - - /** - * Creates a nested array representing the structure of a directory - * - * System::_dirToStruct('dir1', 0) => - * Array - * ( - * [dirs] => Array - * ( - * [0] => dir1 - * ) - * - * [files] => Array - * ( - * [0] => dir1/file2 - * [1] => dir1/file3 - * ) - * ) - * @param string $sPath Name of the directory - * @param integer $maxinst max. deep of the lookup - * @param integer $aktinst starting deep of the lookup - * @return array the structure of the dir - * @access private - */ - - function _dirToStruct($sPath, $maxinst, $aktinst = 0) - { - $struct = array('dirs' => array(), 'files' => array()); - if (($dir = @opendir($sPath)) === false) { - System::raiseError("Could not open dir $sPath"); - return $struct; // XXX could not open error - } - $struct['dirs'][] = $sPath = realpath($sPath); // XXX don't add if '.' or '..' ? - $list = array(); - while (false !== ($file = readdir($dir))) { - if ($file != '.' && $file != '..') { - $list[] = $file; - } - } - closedir($dir); - sort($list); - if ($aktinst < $maxinst || $maxinst == 0) { - foreach($list as $val) { - $path = $sPath . DIRECTORY_SEPARATOR . $val; - if (is_dir($path) && !is_link($path)) { - $tmp = System::_dirToStruct($path, $maxinst, $aktinst+1); - $struct = array_merge_recursive($tmp, $struct); - } else { - $struct['files'][] = $path; - } - } - } - return $struct; - } - - /** - * Creates a nested array representing the structure of a directory and files - * - * @param array $files Array listing files and dirs - * @return array - * @see System::_dirToStruct() - */ - function _multipleToStruct($files) - { - $struct = array('dirs' => array(), 'files' => array()); - settype($files, 'array'); - foreach ($files as $file) { - if (is_dir($file) && !is_link($file)) { - $tmp = System::_dirToStruct($file, 0); - $struct = array_merge_recursive($tmp, $struct); - } else { - $struct['files'][] = $file; - } - } - return $struct; - } - - /** - * The rm command for removing files. - * Supports multiple files and dirs and also recursive deletes - * - * @param string $args the arguments for rm - * @return mixed PEAR_Error or true for success - * @access public - */ - function rm($args) - { - $opts = System::_parseArgs($args, 'rf'); // "f" do nothing but like it :-) - if (PEAR::isError($opts)) { - return System::raiseError($opts); - } - foreach($opts[0] as $opt) { - if ($opt[0] == 'r') { - $do_recursive = true; - } - } - $ret = true; - if (isset($do_recursive)) { - $struct = System::_multipleToStruct($opts[1]); - foreach($struct['files'] as $file) { - if (!@unlink($file)) { - $ret = false; - } - } - foreach($struct['dirs'] as $dir) { - if (!@rmdir($dir)) { - $ret = false; - } - } - } else { - foreach ($opts[1] as $file) { - $delete = (is_dir($file)) ? 'rmdir' : 'unlink'; - if (!@$delete($file)) { - $ret = false; - } - } - } - return $ret; - } - - /** - * Make directories. - * - * The -p option will create parent directories - * @param string $args the name of the director(y|ies) to create - * @return bool True for success - * @access public - */ - function mkDir($args) - { - $opts = System::_parseArgs($args, 'pm:'); - if (PEAR::isError($opts)) { - return System::raiseError($opts); - } - $mode = 0777; // default mode - foreach($opts[0] as $opt) { - if ($opt[0] == 'p') { - $create_parents = true; - } elseif($opt[0] == 'm') { - // if the mode is clearly an octal number (starts with 0) - // convert it to decimal - if (strlen($opt[1]) && $opt[1]{0} == '0') { - $opt[1] = octdec($opt[1]); - } else { - // convert to int - $opt[1] += 0; - } - $mode = $opt[1]; - } - } - $ret = true; - if (isset($create_parents)) { - foreach($opts[1] as $dir) { - $dirstack = array(); - while (!@is_dir($dir) && $dir != DIRECTORY_SEPARATOR) { - array_unshift($dirstack, $dir); - $dir = dirname($dir); - } - while ($newdir = array_shift($dirstack)) { - if (!is_writeable(dirname($newdir))) { - $ret = false; - break; - } - if (!mkdir($newdir, $mode)) { - $ret = false; - } - } - } - } else { - foreach($opts[1] as $dir) { - if (!@is_dir($dir) && !mkdir($dir, $mode)) { - $ret = false; - } - } - } - return $ret; - } - - /** - * Concatenate files - * - * Usage: - * 1) $var = System::cat('sample.txt test.txt'); - * 2) System::cat('sample.txt test.txt > final.txt'); - * 3) System::cat('sample.txt test.txt >> final.txt'); - * - * Note: as the class use fopen, urls should work also (test that) - * - * @param string $args the arguments - * @return boolean true on success - * @access public - */ - function &cat($args) - { - $ret = null; - $files = array(); - if (!is_array($args)) { - $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); - } - for($i=0; $i < count($args); $i++) { - if ($args[$i] == '>') { - $mode = 'wb'; - $outputfile = $args[$i+1]; - break; - } elseif ($args[$i] == '>>') { - $mode = 'ab+'; - $outputfile = $args[$i+1]; - break; - } else { - $files[] = $args[$i]; - } - } - if (isset($mode)) { - if (!$outputfd = fopen($outputfile, $mode)) { - $err = System::raiseError("Could not open $outputfile"); - return $err; - } - $ret = true; - } - foreach ($files as $file) { - if (!$fd = fopen($file, 'r')) { - System::raiseError("Could not open $file"); - continue; - } - while ($cont = fread($fd, 2048)) { - if (isset($outputfd)) { - fwrite($outputfd, $cont); - } else { - $ret .= $cont; - } - } - fclose($fd); - } - if (@is_resource($outputfd)) { - fclose($outputfd); - } - return $ret; - } - - /** - * Creates temporary files or directories. This function will remove - * the created files when the scripts finish its execution. - * - * Usage: - * 1) $tempfile = System::mktemp("prefix"); - * 2) $tempdir = System::mktemp("-d prefix"); - * 3) $tempfile = System::mktemp(); - * 4) $tempfile = System::mktemp("-t /var/tmp prefix"); - * - * prefix -> The string that will be prepended to the temp name - * (defaults to "tmp"). - * -d -> A temporary dir will be created instead of a file. - * -t -> The target dir where the temporary (file|dir) will be created. If - * this param is missing by default the env vars TMP on Windows or - * TMPDIR in Unix will be used. If these vars are also missing - * c:\windows\temp or /tmp will be used. - * - * @param string $args The arguments - * @return mixed the full path of the created (file|dir) or false - * @see System::tmpdir() - * @access public - */ - function mktemp($args = null) - { - static $first_time = true; - $opts = System::_parseArgs($args, 't:d'); - if (PEAR::isError($opts)) { - return System::raiseError($opts); - } - foreach($opts[0] as $opt) { - if($opt[0] == 'd') { - $tmp_is_dir = true; - } elseif($opt[0] == 't') { - $tmpdir = $opt[1]; - } - } - $prefix = (isset($opts[1][0])) ? $opts[1][0] : 'tmp'; - if (!isset($tmpdir)) { - $tmpdir = System::tmpdir(); - } - if (!System::mkDir(array('-p', $tmpdir))) { - return false; - } - $tmp = tempnam($tmpdir, $prefix); - if (isset($tmp_is_dir)) { - unlink($tmp); // be careful possible race condition here - if (!mkdir($tmp, 0700)) { - return System::raiseError("Unable to create temporary directory $tmpdir"); - } - } - $GLOBALS['_System_temp_files'][] = $tmp; - if ($first_time) { - PEAR::registerShutdownFunc(array('System', '_removeTmpFiles')); - $first_time = false; - } - return $tmp; - } - - /** - * Remove temporary files created my mkTemp. This function is executed - * at script shutdown time - * - * @access private - */ - function _removeTmpFiles() - { - if (count($GLOBALS['_System_temp_files'])) { - $delete = $GLOBALS['_System_temp_files']; - array_unshift($delete, '-r'); - System::rm($delete); - $GLOBALS['_System_temp_files'] = array(); - } - } - - /** - * Get the path of the temporal directory set in the system - * by looking in its environments variables. - * Note: php.ini-recommended removes the "E" from the variables_order setting, - * making unavaible the $_ENV array, that s why we do tests with _ENV - * - * @return string The temporal directory on the system - */ - function tmpdir() - { - if (OS_WINDOWS) { - if ($var = isset($_ENV['TEMP']) ? $_ENV['TEMP'] : getenv('TEMP')) { - return $var; - } - if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) { - return $var; - } - if ($var = isset($_ENV['windir']) ? $_ENV['windir'] : getenv('windir')) { - return $var; - } - return getenv('SystemRoot') . '\temp'; - } - if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) { - return $var; - } - return '/tmp'; - } - - /** - * The "which" command (show the full path of a command) - * - * @param string $program The command to search for - * @param mixed $fallback Value to return if $program is not found - * - * @return mixed A string with the full path or false if not found - * @author Stig Bakken <ss...@ph...> - */ - function which($program, $fallback = false) - { - // enforce API - if (!is_string($program) || '' == $program) { - return $fallback; - } - - // available since 4.3.0RC2 - if (defined('PATH_SEPARATOR')) { - $path_delim = PATH_SEPARATOR; - } else { - $path_delim = OS_WINDOWS ? ';' : ':'; - } - // full path given - if (basename($program) != $program) { - $path_elements[] = dirname($program); - $program = basename($program); - } else { - // Honor safe mode - if (!ini_get('safe_mode') || !$path = ini_get('safe_mode_exec_dir')) { - $path = getenv('PATH'); - if (!$path) { - $path = getenv('Path'); // some OSes are just stupid enough to do this - } - } - $path_elements = explode($path_delim, $path); - } - - if (OS_WINDOWS) { - $exe_suffixes = getenv('PATHEXT') - ? explode($path_delim, getenv('PATHEXT')) - : array('.exe','.bat','.cmd','.com'); - // allow passing a command.exe param - if (strpos($program, '.') !== false) { - array_unshift($exe_suffixes, ''); - } - // is_executable() is not available on windows for PHP4 - $pear_is_executable = (function_exists('is_executable')) ? 'is_executable' : 'is_file'; - } else { - $exe_suffixes = array(''); - $pear_is_executable = 'is_executable'; - } - - foreach ($exe_suffixes as $suff) { - foreach ($path_elements as $dir) { - $file = $dir . DIRECTORY_SEPARATOR . $program . $suff; - if ($pear_is_executable($file)) { - return $file; - } - } - } - return $fallback; - } - - /** - * The "find" command - * - * Usage: - * - * System::find($dir); - * System::find("$dir -type d"); - * System::find("$dir -type f"); - * System::find("$dir -name *.php"); - * System::find("$dir -name *.php -name *.htm*"); - * System::find("$dir -maxdepth 1"); - * - * Params implmented: - * $dir -> Start the search at this directory - * -type d -> return only directories - * -type f -> return only files - * -maxdepth <n> -> max depth of recursion - * -name <pattern> -> search pattern (bash style). Multiple -name param allowed - * - * @param mixed Either array or string with the command line - * @return array Array of found files - * - */ - function find($args) - { - if (!is_array($args)) { - $args = preg_split('/\s+/', $args, -1, PREG_SPLIT_NO_EMPTY); - } - $dir = array_shift($args); - $patterns = array(); - $depth = 0; - $do_files = $do_dirs = true; - for ($i = 0; $i < count($args); $i++) { - switch ($args[$i]) { - case '-type': - if (in_array($args[$i+1], array('d', 'f'))) { - if ($args[$i+1] == 'd') { - $do_files = false; - } else { - $do_dirs = false; - } - } - $i++; - break; - case '-name': - if (OS_WINDOWS) { - if ($args[$i+1]{0} == '\\') { - // prepend drive - $args[$i+1] = addslashes(substr(getcwd(), 0, 2) . $args[$i + 1]); - } - // escape path separators to avoid PCRE problems - $args[$i+1] = str_replace('\\', '\\\\', $args[$i+1]); - } - $patterns[] = "(" . preg_replace(array('/\./', '/\*/'), - array('\.', '.*', ), - $args[$i+1]) - . ")"; - $i++; - break; - case '-maxdepth': - $depth = $args[$i+1]; - break; - } - } - $path = System::_dirToStruct($dir, $depth); - if ($do_files && $do_dirs) { - $files = array_merge($path['files'], $path['dirs']); - } elseif ($do_dirs) { - $files = $path['dirs']; - } else { - $files = $path['files']; - } - if (count($patterns)) { - $patterns = implode('|', $patterns); - $ret = array(); - for ($i = 0; $i < count($files); $i++) { - if (preg_match("#^$patterns\$#", $files[$i])) { - $ret[] = $files[$i]; - } - } - return $ret; - } - return $files; - } -} -?> Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-06-30 10:00:33 UTC (rev 40) +++ trunk/moodle/mod/liveclassroom/api.php 2006-07-05 13:38:19 UTC (rev 41) @@ -43,7 +43,6 @@ require_once('System.php'); - $LIVECLASSROOM_API_ADMIN = '/admin/api/api.pl?'; $LIVECLASSROOM_API_FUNCTION_NOOP = 'function=NOOP'; $LIVECLASSROOM_API_FUNCTION_CREATE_USER = 'function=createUser'; @@ -89,7 +88,7 @@ //add_to_log("", "liveclassroom", "", "liveclassroom_api_authenticate", "URL Sent: $url"); - //add_to_log("", "liveclassroom", "", "", "Creating Auth Cookie in:".dirname(__FILE__).'/cookie.txt'); + //add_to_log("", "liveclassroom", "", "", "Creating Auth Cookie in: ".dirname(__FILE__).'/cookie.txt'); Modified: trunk/moodle/mod/liveclassroom/index.php =================================================================== --- trunk/moodle/mod/liveclassroom/index.php 2006-06-30 10:00:33 UTC (rev 40) +++ trunk/moodle/mod/liveclassroom/index.php 2006-07-05 13:38:19 UTC (rev 41) @@ -28,7 +28,6 @@ /* $Id$ */ - /// This page lists all the instances of liveclassroom in a particular course require_once("../../config.php"); Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-06-30 10:00:33 UTC (rev 40) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-07-05 13:38:19 UTC (rev 41) @@ -1,4 +1,3 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!ICI lib.php!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <?PHP /****************************************************************************** * * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sh...@us...> - 2006-10-16 12:51:25
|
Revision: 89 http://svn.sourceforge.net/hw4mdl/?rev=89&view=rev Author: shazan Date: 2006-10-16 05:51:06 -0700 (Mon, 16 Oct 2006) Log Message: ----------- add liveclassroom block Added Paths: ----------- trunk/moodle/blocks/ trunk/moodle/blocks/next_liveclassroom/ trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php trunk/moodle/blocks/next_liveclassroom/config_global.html Added: trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php =================================================================== --- trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php (rev 0) +++ trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php 2006-10-16 12:51:06 UTC (rev 89) @@ -0,0 +1,151 @@ +<?PHP + +require_once($CFG->libdir.'/datalib.php'); + +class block_next_liveclassroom extends block_base { + + function init() { + $this->title = get_string('blocktitle', 'block_next_liveclassroom'); + $this->version = 2004111200; + } + + function applicable_formats() { + return array('site' => true, 'course-view' => true, 'course-view-social' => false, 'course-view-topics' => true, 'course-view-weeks' => true); + } + + function get_content() { + + global $CFG, $USER, $COURSE; + if ($this->content !== NULL) { + return $this->content; + } + + //guest and not logged user can't have access to the liveclassroom block + if(isguest() || !isloggedin()){ + die; + } + + $this->content = new stdClass; + + $this->content->text = ''; + $this->content->footer = ''; + //$gnumber =5; + //$cnumber= 3; + $gnumber = $CFG->block_next_liveclassroom_globalnumber; + $cnumber = $CFG->block_next_liveclassroom_coursenumber; + + + + //liveclassroom module + if(!$lc = get_record("modules", "name", "liveclassroom")) { + error("module liveclassroom not exist"); + } + + if (($COURSE->format == 'site')) { // Global block : displays the 5 next Live Classroom through any course the user is enrolled in (or a teacher for) + + //table with the course module id + $result = array(); + //table with the activities id + $result1 = array(); + $full = false; + + $allcourses = get_my_courses($USER->id); + + $sectionnumber = 1; + + while($full!=true && $sectionnumber<=10){ + + foreach($allcourses as $cours) { + $sections[$cours->id] = get_record("course_sections", "course", "$cours->id", "section", $sectionnumber); + + } + foreach($sections as $section){ + + if ($full==true) {break;} + else{ + if(($section->section!=0) && ($section->sequence!=null)){ + $lines = explode(",",$section->sequence); + foreach($lines as $line) { + // print $line; + $cm = get_record("course_modules", "id", "$line"); + if($cm->module==$lc->id) { + if(sizeof($result1)==$gnumber) { + $full=true; + break; + } + else{ + array_push($result,$line); + $liveclassroom = get_record("liveclassroom", "id", "$cm->instance"); + array_push($result1,$liveclassroom->name); + } + } + } + } + } + } + $sectionnumber++; + } + + + + } + else{ // Course Block display the 3 next Live Classroom + //table with the course module id + $result = array(); + //table with the activities id + $result1 = array(); + $full = false; + //all section in course + $sections = get_records_sql("SELECT * + FROM {$CFG->prefix}course_sections cs + WHERE cs.course = '$COURSE->id' + ORDER BY cs.section asc"); + + foreach($sections as $section){ + if ($full==true) break; + else{ + if(($section->section!=0) && ($section->sequence!=null)){ + $lines = explode(",",$section->sequence); + foreach($lines as $line) { + //Look just the liveclasssroom instance + $cm = get_record("course_modules", "id", "$line"); + if($cm->module==$lc->id) { + if(sizeof($result1)==$cnumber){ + $full=true; + } + else { + array_push($result,$line); + $liveclassroom = get_record("liveclassroom", "id", "$cm->instance"); + array_push($result1,$liveclassroom->name); + } + } + } + } + } + } + + } + $this->content->text .= '<table width="100%">'; + //Display the list + for($r=0;$r<sizeof($result);$r++) { + // $this->content->text .= '<div style="text-align: left; font-size: 1; padding-top: 5px;">'; + $this->content->text .= '<tr><td>'; + $this->content->text .= '<a href="'.$CFG->wwwroot.'/mod/liveclassroom/view.php?id='.$result[$r].'" >'.$result1[$r].'</a>'; + $this->content->text .= '</tr> </td>'; + // $this->content->text .= '</div>'; + } + $this->content->text .= '</table>'; + + return $this->content; + } + + function has_config() { + return true; + } + + + +} + + +?> \ No newline at end of file Property changes on: trunk/moodle/blocks/next_liveclassroom/block_next_liveclassroom.php ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Date Revision Author Id Name: svn:eol-style + native Added: trunk/moodle/blocks/next_liveclassroom/config_global.html =================================================================== --- trunk/moodle/blocks/next_liveclassroom/config_global.html (rev 0) +++ trunk/moodle/blocks/next_liveclassroom/config_global.html 2006-10-16 12:51:06 UTC (rev 89) @@ -0,0 +1,33 @@ + <table cellpadding="9" cellspacing="0"> +<tr valign="top"> + <td align="right"><?php print_string('coursenumbers', 'block_next_liveclassroom') ?></td> + <td> + <input name="block" type="hidden" value="<?php echo intval($_REQUEST['block']); ?>" /> + <input name="block_next_liveclassroom_coursenumber" type="text" size="5" value="<?php + if(isset($CFG->block_next_liveclassroom_coursenumber)) { + p($CFG->block_next_liveclassroom_coursenumber); + } else { + p(3); + } ?>" /> + </td> + +</tr> +<tr> +<tr valign="top"> + <td align="right"><?php print_string('globalnumbers', 'block_next_liveclassroom') ?></td> + + <td> + <input name="block_next_liveclassroom_globalnumber" type="text" size="5" value="<?php + if(isset($CFG->block_next_liveclassroom_globalnumber)) { + p($CFG->block_next_liveclassroom_globalnumber); + } else { + p(5); + } ?>" /> + </td> + +</tr> + + <td colspan="2" align="center"> + <input type="submit" value="<?php print_string('savechanges') ?>" /></td> +</tr> +</table> Property changes on: trunk/moodle/blocks/next_liveclassroom/config_global.html ___________________________________________________________________ Name: svn:mime-type + text/html Name: svn:keywords + Date Revision Author Id Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2006-11-29 12:32:23
|
Revision: 103 http://svn.sourceforge.net/hw4mdl/?rev=103&view=rev Author: hugues Date: 2006-11-29 04:32:21 -0800 (Wed, 29 Nov 2006) Log Message: ----------- Created the build script Added Paths: ----------- trunk/moodle/bin/ trunk/moodle/bin/package.sh Added: trunk/moodle/bin/package.sh =================================================================== --- trunk/moodle/bin/package.sh (rev 0) +++ trunk/moodle/bin/package.sh 2006-11-29 12:32:21 UTC (rev 103) @@ -0,0 +1,111 @@ +#!/bin/bash + +DEBUG=1 + +TARGET=liveclassroom +#TARGET=liveclassroom, voicetool, pronto + +SVN_USER_PARAM= +SVN_PASS_PARAM= +SVN_TAG_PARAM=liveclassroom_0.9 + +SVN_URL_BASE=https://svn.sourceforge.net/svnroot/hw4mdl +SVN_URL_TRUNK=${SVN_URL_BASE}/trunk +SVN_URL_TAG=${SVN_URL_BASE}/tags/${SVN_TAG_PARAM} + +if [ -n "$DEBUG" ]; then + echo "Using SVN_TRUNK" +fi +SVN_URL=${SVN_URL_TRUNK} + + + BASEDIR=`pwd` + SVN_EXPORT_DIR=${BASEDIR}/export + BUILD_DIR=${BASEDIR}/build + + +function initdir() +{ + echo -n "Creating build directories..." + if [ -d ${SVN_EXPORT_DIR} ]; then + rm -rf ${SVN_EXPORT_DIR} + fi + if [ -d "${BUILD_DIR}" ]; then + rm -rf ${BUILD_DIR} + fi + + mkdir -p ${BUILD_DIR}/${TARGET}/mod + mkdir -p ${BUILD_DIR}/${TARGET}/lang + echo "ok!" +} + + +function export_files () { + SVN_ARGS="-q --non-interactive" + + if [ -n "$SVN_USER_PARAM" ]; then + if [ -n "$DEBUG" ]; then + echo "Using username: ${SVN_USERNAME}"; + fi + SVN_ARGS="${SVN_ARGS} --username ${SVN_USER_PARAM}" + fi + + if [ -n "$SVN_PASS_PARAM" ]; then + if [ -z "$SVN_USER_PARAM" ]; then + echo "error: pass without username" + exit -1 + fi + SVN_ARGS="${SVN_ARGS} --password ${SVN_PASS_PARAM}" + fi + + if [ -n "$DEBUG" ]; then + echo "Using args: $SVN_ARGS" + fi + echo -n "Exporting source code..." + svn export ${SVN_ARGS} ${SVN_URL} ${SVN_EXPORT_DIR} + echo "ok!" +} + + + +function prepare () +{ + + target=$1; + + echo -n "Building distribution for ${target}..." + cp -r ${SVN_EXPORT_DIR}/moodle/mod/${target} ${BUILD_DIR}/${target}/mod/ + + LANG_EXPORT_DIR="${SVN_EXPORT_DIR}/moodle/lang" + LANG_BUILD_DIR="${BUILD_DIR}/${target}/lang" + for afile in `find ${LANG_EXPORT_DIR} -name "${target}.php"` ; do + src=`dirname ${afile}` + dst=${src/#${LANG_EXPORT_DIR}/${LANG_BUILD_DIR}} + mkdir -p ${dst} + cp -r ${afile} ${dst} + done + + cp \ + ${SVN_EXPORT_DIR}/moodle/README.txt\ + ${SVN_EXPORT_DIR}/moodle/LICENSE.txt\ + ${SVN_EXPORT_DIR}/moodle/INSTALL.txt\ + ${BUILD_DIR} + + echo "ok!" +} + +function pack () +{ + target=$1; + + echo -n "Packing ${target}..." + tar czf ${target}-`date +"%d-%m-%Y"`.tar.gz -C ${BUILD_DIR} ${target} + echo "ok!" +} + + + +initdir; +export_files; +prepare $TARGET; +pack $TARGET; Property changes on: trunk/moodle/bin/package.sh ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2006-12-29 13:33:47
|
Revision: 151 http://svn.sourceforge.net/hw4mdl/?rev=151&view=rev Author: hugues Date: 2006-12-29 05:33:44 -0800 (Fri, 29 Dec 2006) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10561 - Internationalized the settings page Modified Paths: -------------- trunk/moodle/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/generateSettings.php Modified: trunk/moodle/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 13:30:12 UTC (rev 150) +++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 13:33:44 UTC (rev 151) @@ -93,7 +93,47 @@ $string['signature'] = "Invalid connection to Live Classroom. Please contact your administrator for more information. "; $string['board'] = "Invalid Voice Board parameters. Please contact your administrator for more information. "; +$string['Settings'] = "Settings"; +$string['Live Classroom'] = "Live Classroom"; +$string['Room Info'] = "Room Info"; +$string['Title: '] = "Title: "; +$string['Description: '] = "Description: "; +$string['Type : '] = "Type: "; +$string['Lecture room'] = "Lecture Room"; +$string['Instructors lead the presentation'] = "Instructors lead the presentation"; +$string['Discussion room'] = "Discussion Room"; +$string['Students and Instructors have the same rigths'] = "Students and Instructors have the same rigths"; +$string['Media'] = "Media"; +$string['Audio'] = "Audio"; +$string['Enable Students to use the phone'] = "Enable Students to use the phone"; +$string['Note: Instructors can always use the phone'] = "Note: Instructors can always use the phone"; +$string['Enable Student\'s microphones at presentation start'] = "Enable Student's microphones at presentation start"; +$string['One-way Video'] = "One-way Video"; +$string['Presenter uses RealProducer'] = "Presenter uses RealProducer"; +$string['Room Id: '] = "Room Id: "; +$string['Third-party Conference Call'] = "Third-party Conference Call"; +$string['Features'] = "Features"; +$string['Enable Students to use eBoard'] = "Enable Students to use eBoard"; +$string['Enable Students to use AppShare'] = "Enable Students to use AppShare"; +$string['Enable Archiving'] = "Enable Archiving"; +$string['Enable Appshare'] = "Enable Appshare"; +$string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import"; +$string['Chat'] = "Chat"; +$string['Enable Students to use text chat'] = "Enable Students to use text chat"; +$string['Enable Public and Private text chat'] = "Enable Public and Private text chat"; +$string['Enable Public text chat only'] = "Enable Public text chat only"; +$string['Note: Students are always able to chat with presenters and/or technical help'] = "Note: Students are always able to chat with presenters and/or technical help"; +$string['Access'] = "Access"; +$string['Available'] = "Available"; +$string['Maximum users: '] = "Maximum users: "; +$string['Unlimited'] = "Unlimited"; +$string['Limited: '] = "Limited: "; +$string['Enable guest access'] = "Enable guest access"; +$string['Room Id: '] = "Room Id: "; + + + //First Time Use - not use yet $string['firstRoom'] = 'Main classroom'; $string['secondRoom'] = 'Group 1'; Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-29 13:30:12 UTC (rev 150) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-29 13:33:44 UTC (rev 151) @@ -32,25 +32,25 @@ // require_once($CFG->dirroot.'/config.php'); require_once("../../config.php"); require_once("lib.php"); - require_once("api.php"); - // Variables needed - global $CFG; + require_once("api.php"); + // Variables needed + global $CFG; - if (version_compare(PHP_VERSION,'5','>=')) { - require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); - } + if (version_compare(PHP_VERSION,'5','>=')) { + require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + } - $courseid = $_GET['enc_course_id']; - $signature = $_GET['signature']; - $action = $_GET['action']; + $courseid = $_GET['enc_course_id']; + $signature = $_GET['signature']; + $action = $_GET['action']; - $MAINLECTURE = 'MainLecture'; - $DISCUSSIONROOM = 'Discussion'; - $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom'; + $MAINLECTURE = 'MainLecture'; + $DISCUSSIONROOM = 'Discussion'; + $MAINDISCUSSION = 'MainLectureRoom-DiscussionRoom'; - if (!liveclassroom_init_session($_GET)) { - error("ExpiredSessionException"); - } + if (!liveclassroom_init_session($_GET)) { + error("ExpiredSessionException"); + } if($action == 'update') { $roomId = $_GET['id']; @@ -80,7 +80,6 @@ $windows->append_child(liveclassroom_create_headerbar($xmldoc)); - // CONTEXT BAR $contextbar = $xmldoc->create_element('windowsElement'); @@ -96,10 +95,10 @@ else $cbname->append_child($xmldoc->create_text_node("New room")); $contextbarinformations->append_child($cbname); $cbcontext = $xmldoc->create_element("context"); - $cbcontext->append_child($xmldoc->create_text_node("Settings")); + $cbcontext->append_child($xmldoc->create_text_node(liveclassroom_get_message("Settings"))); $contextbarinformations->append_child($cbcontext); $cbproduct = $xmldoc->create_element("product"); - $cbproduct->append_child($xmldoc->create_text_node("Live Classroom")); + $cbproduct->append_child($xmldoc->create_text_node(liveclassroom_get_message("Live Classroom"))); $contextbarinformations->append_child($cbproduct); $cbelementParameters->append_child($contextbarinformations); @@ -125,7 +124,7 @@ $panelSettings = $xmldoc->create_element('panelSettings'); // ROOM INFO PANEL INFO - $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', 'Room Info', "1", "block")); + $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabSelected', 'tabDisabled', liveclassroom_get_message('Room Info'), "1", "block")); // ROOM INFO CONTENT $panelContent = $xmldoc->create_element('panelContent'); @@ -154,8 +153,10 @@ $align->append_child($xmldoc->create_text_node("right")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", $parameters=array("class" => "alert", "value" => "*") )); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Title : ") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay, "label", + $parameters=array("class" => "alert", "value" => "*") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", + $parameters=array("value" => liveclassroom_get_message("Title: ")) )); $panelLine->append_child($linepart); $parameters=array("id" => "longname", "maxlength" => "50", "name" => "longname", "type" => "text"); @@ -207,7 +208,8 @@ $align->append_child($xmldoc->create_text_node("right")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", $parameters=array("value" => "Description : ") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"label", + $parameters=array("value" => liveclassroom_get_message("Description: ")))); $panelLine->append_child($linepart); $linepart = $xmldoc->create_element('panelLinePart'); @@ -223,7 +225,10 @@ $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", $parameters=array("cols" => "40", "id" => "description", "value" => $room_info['description'], "name" => "description", "rows" => "4") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"textarea", + $parameters=array("cols" => "40", "id" => "description", + "value" => $room_info['description'], + "name" => "description", "rows" => "4") )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -251,26 +256,28 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("right")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", $parameters=array("value" => "Type : ") )); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay ,"label", + $parameters=array("value" => liveclassroom_get_message("Type : ")))); + $panelLine->append_child($linepart); - $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; - if(($action=="update") && ($isLectureRoom==true)) - { - $_SESSION['led']='instructor'; - $parameters['checked']=true; - } - else if($action=="new") - { - $parameters['checked']=true; - } - else - { - $parameters['checked']=true; - } + $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", + "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; + if(($action=="update") && ($isLectureRoom==true)) + { + $_SESSION['led']='instructor'; + $parameters['checked']=true; + } + else if($action=="new") + { + $parameters['checked']=true; + } + else + { + $parameters['checked']=true; + } - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); + $linepart = $xmldoc->create_element('panelLinePart'); + $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); @@ -281,40 +288,41 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters)); - $panelLine->append_child($linepart); - - $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$MAINLECTURE","input", $parameters)); + $panelLine->append_child($linepart); + + $parameters=array("type" => "radio", "value" => "instructor", "id" => "led_instructor", + "name" => "led", "onclick" => "toggleType(\"$MAINLECTURE\")") ; - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters)); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, "$DISCUSSIONROOM","input", $parameters)); + $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_instructor", "valign" => "top", "value" => "Lecture room" ) )); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", + $parameters=array("for" => "led_instructor", "valign" => "top", "value" => liveclassroom_get_message("Lecture room") ) )); + $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); + $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Instructors lead the presentation" ) )); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Instructors lead the presentation")))); + $panelLine->append_child($linepart); + $panelContent->append_child($panelLine); - $panelContent->append_child($panelLine); + // FOURTH LINE + $panelLine = $xmldoc->create_element('panelLine'); - // FOURTH LINE - $panelLine = $xmldoc->create_element('panelLine'); - - $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); - $panelLine->append_child($plid); + $plid = $xmldoc->create_element('id'); + $plid->append_child($xmldoc->create_text_node("")); + $panelLine->append_child($plid); - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); - $panelLine->append_child($panelLineStyle); + $panelLineStyle = $xmldoc->create_element('style'); + $panelLineStyle->append_child($xmldoc->create_text_node(" ")); + $panelLine->append_child($panelLineStyle); - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); + $linepart = $xmldoc->create_element('panelLinePart'); + $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); @@ -326,11 +334,11 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>""))); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" =>""))); + $panelLine->append_child($linepart); - $linepart = $xmldoc->create_element('panelLinePart'); - $style = $xmldoc->create_element('style'); + $linepart = $xmldoc->create_element('panelLinePart'); + $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); @@ -342,40 +350,38 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ; + $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ; - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters)); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","input", $parameters)); + $panelLine->append_child($linepart); - - $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ; - if(($action=="update") && ($isLectureRoom==false)) - { - $_SESSION['led']='student'; - $parameters['checked']=true; + $parameters=array("type" => "radio", "value" => "student", "id" => "led_student", "name" => "led", "onclick" => "toggleType(\"$DISCUSSIONROOM\")") ; + if(($action=="update") && ($isLectureRoom==false)) + { + $_SESSION['led']='student'; + $parameters['checked']=true; + } + else + { + $parameters['checked']=true; + } - } - else - { - $parameters['checked']=true; - } + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","input", $parameters)); + $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","input", $parameters)); - $panelLine->append_child($linepart); - - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => "Discussion room" ) )); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "led_student", "value" => liveclassroom_get_message("Discussion room")))); + $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); + $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Students and Instructors have the same rigths" ) )); - $panelLine->append_child($linepart); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Students and Instructors have the same rigths")))); + $panelLine->append_child($linepart); - $panelContent->append_child($panelLine); - } + $panelContent->append_child($panelLine); +} - $panelSettings->append_child($panelContent); +$panelSettings->append_child($panelContent); $panelsSettings->append_child($panelSettings); @@ -385,7 +391,7 @@ $panelSettingsM = $xmldoc->create_element('panelSettings'); // MEDIA PANEL INFO - $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Media', "2", 'none')); + $panelSettingsM->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Media'), "2", 'none')); // MEDIA CONTENT $panelContentM = $xmldoc->create_element('panelContent'); @@ -421,7 +427,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters)); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Audio") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Audio")) )); $panelLine->append_child($linepart); $panelContentM->append_child($panelLine); @@ -463,13 +469,13 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Students to use the phone") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use the phone")) )); $panelLine->append_child($linepart); $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note: Instructors can always use the phone") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Note: Instructors can always use the phone")) )); $panelLine->append_child($linepart); $panelContentM->append_child($panelLine); @@ -511,7 +517,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc, $contextDisplay,"input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Student's microphones at presentation start") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Student's microphones at presentation start")) )); $panelLine->append_child($linepart); $panelContentM->append_child($panelLine); @@ -545,11 +551,11 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "One-way Video") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("One-way Video")) )); $panelLine->append_child($linepart); $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"br", $parameters=array() )); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Presenter uses RealProducer") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Presenter uses RealProducer")))); $panelLine->append_child($linepart); $panelContentM->append_child($panelLine); @@ -577,7 +583,7 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => "Room Id : ") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "roomId_field", "value" => liveclassroom_get_message("Room Id: ")))); $panelLine->append_child($linepart); $parameters=array("type" => "text", "id" => "roomId_field", "name" => "roomId_Field", "maxlength" => "50") ; @@ -621,7 +627,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Third-party Conference Call") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Third-party Conference Call")))); $panelLine->append_child($linepart); $panelContentM->append_child($panelLine); @@ -635,7 +641,7 @@ $panelSettings = $xmldoc->create_element('panelSettings'); // FEATURES PANEL INFO - $panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', 'Features', "3", 'none')); + $panelSettings->append_child(create_panel_info($xmldoc, "$MAINDISCUSSION", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Features'), "3", 'none')); // FEATURES CONTENT $panelContent = $xmldoc->create_element('panelContent'); @@ -667,7 +673,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Students to use eBoard") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use eBoard")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -699,7 +705,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", $parameters=array("value" => "Enable Students to use AppShare") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use AppShare")))); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -730,7 +736,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Archiving") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => liveclassroom_get_message("Enable Archiving")))); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -761,7 +767,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable Appshare") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => liveclassroom_get_message("Enable Appshare")))); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -792,7 +798,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => "Enable On-The-Fly PPT Import") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$DISCUSSIONROOM","label", $parameters=array("value" => liveclassroom_get_message("Enable On-The-Fly PPT Import")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -805,7 +811,7 @@ // ------------------ CHAT -------------------- // CHAT PANEL INFO $panelSettings = $xmldoc->create_element('panelSettings'); - $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', 'Chat', "4", 'none')); + $panelSettings->append_child(create_panel_info($xmldoc, "$MAINLECTURE", 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Chat'), "4", 'none')); // CHAT CONTENT $panelContent = $xmldoc->create_element('panelContent'); @@ -835,7 +841,7 @@ else $parameters['checked']=true; $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Students to use text chat") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use text chat")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -865,7 +871,7 @@ else $parameters['checked']=true; $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Public and Private text chat") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Public and Private text chat")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -894,7 +900,7 @@ } $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable Public text chat only") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Public text chat only")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -917,7 +923,7 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => "Note: Students are always able to chat with presenters and/or technical help") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("class" => "comment", "value" => liveclassroom_get_message("Note: Students are always able to chat with presenters and/or technical help")))); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -930,7 +936,7 @@ // ------------------- ACCESS ---------------------- $panelSettings = $xmldoc->create_element('panelSettings'); // ACCESS PANEL INFO - $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabNoSelected', 'tabDisabled', 'Access', "5", 'none')); + $panelSettings->append_child(create_panel_info($xmldoc, 'all', 'tabNoSelected', 'tabDisabled', liveclassroom_get_message('Access'), "5", 'none')); // ACCESS CONTENT $panelContent = $xmldoc->create_element('panelContent'); @@ -960,7 +966,7 @@ else $parameters['checked']=true; $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "acessAvailable_true", "value" => "Available") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "acessAvailable_true", "value" => liveclassroom_get_message("Available")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -1006,7 +1012,7 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Maximum users : ") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Maximum users: ")))); $panelLine->append_child($linepart); $linepart = $xmldoc->create_element('panelLinePart'); @@ -1026,7 +1032,7 @@ else $parameters['checked']=true; $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_false", "value" => "Unlimited") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_false", "value" => liveclassroom_get_message("Unlimited")))); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -1071,7 +1077,7 @@ } $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_true", "value" => "Limited: ") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "userlimit_true", "value" => liveclassroom_get_message("Limited: ")))); $panelLine->append_child($linepart); $parameters=array("type" => "text", "id" => "userlimittext", "name" => "userlimit", "style" => "input", "disabled" => "disabled") ; @@ -1111,7 +1117,7 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => "Enable guest access") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable guest access")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -1137,7 +1143,7 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => "Room Id:") )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id:")) )); $panelLine->append_child($linepart); $parameters=array("type" => "text", "id" => "link", "name" => "link", "maxlength" => "50") ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-01-02 15:45:49
|
Revision: 154 http://svn.sourceforge.net/hw4mdl/?rev=154&view=rev Author: hugues Date: 2007-01-02 07:45:44 -0800 (Tue, 02 Jan 2007) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10533 - Updated the way we send the id of the room to delete and foxed a room deletion bug as well :( - fixed the archive deletion mesage - re-indented another file Modified Paths: -------------- trunk/moodle/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/manageRoomAction.php trunk/moodle/mod/liveclassroom/welcome.php Modified: trunk/moodle/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 16:03:27 UTC (rev 153) +++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-02 15:45:44 UTC (rev 154) @@ -86,6 +86,7 @@ $string['roomCreated'] = "Your room has been successfully created."; $string['roomUpdated'] = "Your room has been successfully updated."; $string['roomDeleted'] = "Your room has been successfully deleted."; +$string['archiveDeleted'] = "Your archive has been successfully deleted."; $string['notfind'] = "Invalid Live Classroom parameters. Please contact your administrator for more information."; $string['room'] = "Invalid Live Classroom parameters. Please contact your administrator for more information. "; $string['connection'] = "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. "; Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-12-29 16:03:27 UTC (rev 153) +++ trunk/moodle/mod/liveclassroom/api.php 2007-01-02 15:45:44 UTC (rev 154) @@ -539,17 +539,19 @@ global $CFG; global $COURSE; - liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid"); - + $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_DELETE_ROOM,"&target=$roomid"); + preg_match("(\d*)", $data, $matches); + $respcode = $matches[0]; + if ( $respcode == 302) { - add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed"); - // error( "Target not found"); - return false; + add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom302","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed"); + // error( "Target not found"); + return false; } else if ( $respcode != 100) { - add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed"); - return false; - } + add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("errorDeleteRoom100","roomId=$roomid&courseId=".$COURSE->id), "$roomid suppression failed"); + return false; + } add_to_log($COURSE->id, "liveclassroom", "Delete Room", liveclassroom_send_logs("deleteRoom","roomId=$roomid&courseId=".$COURSE->id), "$roomid has been deleted with success"); return true; @@ -566,7 +568,7 @@ global $COURSE; - liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0"); + $data = liveclassroom_api_send_query(LIVECLASSROOM_API_FUNCTION_MODIFY_ROOM,"&target=$roomid&preview=0"); preg_match("(\d*)", $data, $matches); $respcode = $matches[0]; Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-12-29 16:03:27 UTC (rev 153) +++ trunk/moodle/mod/liveclassroom/lib.php 2007-01-02 15:45:44 UTC (rev 154) @@ -50,27 +50,27 @@ * @return nothing, but returns an error if the configuration is wrong */ function liveclassroom_process_options ($config) { - global $CFG; - - if(empty($config->servername)){ - add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable"); - error(get_string('wrongconfigurationURLunavailable', 'liveclassroom')); - } - else if(empty($config->adminusername)){ - error(get_string('emptyAdminUsername', 'liveclassroom')); - } - else if(empty($config->adminpassword)){ - error(get_string('emptyAdminPassword', 'liveclassroom')); - } - - liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword); + global $CFG; + + if(empty($config->servername)){ + add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable"); + error(get_string('wrongconfigurationURLunavailable', 'liveclassroom')); + } + else if(empty($config->adminusername)){ + error(get_string('emptyAdminUsername', 'liveclassroom')); + } + else if(empty($config->adminpassword)){ + error(get_string('emptyAdminPassword', 'liveclassroom')); + } + + liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword); - //TODO: check the user is really an admin - return; + //TODO: check the user is really an admin + return; } /* -* Create a new instance of liveclassroom +* Create a new instance of liveclassroom * @param $liveclassroom : object liveclassroom */ function liveclassroom_add_instance($liveclassroom) { @@ -86,11 +86,11 @@ if($result = insert_record("liveclassroom", $liveclassroom)) { add_to_log($liveclassroom->course, "liveclassroom", "Add activity", - liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added"); + liveclassroom_send_logs("addInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" added"); } else { add_to_log($liveclassroom->course, "liveclassroom", "Add activity", - liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added"); + liveclassroom_send_logs("errorAddInstance","liveclassroomId=".$result."&roomname=$roomname"), "Activity \"".$liveclassroom->name."\" has not been added"); $result=false; } return $result; @@ -108,43 +108,43 @@ // Need to update the section - - //get the course_module instance linked to the liveclassroom instance - if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) { - error("Course Module ID was incorrect"); - } - $old_section = $cm->section; - //Find the right section in the course_section - $section = get_record("course_sections", "id", $cm->section); - - //delete in the course section - if (! delete_mod_from_section($cm->id, "$cm->section")) { - // add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$mod->modulename." from that section"); - $result = false; - //notify("Could not delete the $mod->modulename from that section"); - } - //update the course module section - if (! $sectionid = add_mod_to_section($liveclassroom) ) { + + //get the course_module instance linked to the liveclassroom instance + if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) { + error("Course Module ID was incorrect"); + } + $old_section = $cm->section; + //Find the right section in the course_section + $section = get_record("course_sections", "id", $cm->section); + + //delete in the course section + if (! delete_mod_from_section($cm->id, "$cm->section")) { + // add_to_log("", "liveclassroom", "$LIVECLASSROOM_LOGS?error=deleteAll", "Delete all activities", "Could not delete the ".$mod->modulename." from that section"); + $result = false; + //notify("Could not delete the $mod->modulename from that section"); + } + //update the course module section + if (! $sectionid = add_mod_to_section($liveclassroom) ) { error("Could not add the new course module to that section"); } - //update the course modules + //update the course modules if (! set_field("course_modules", "section", $sectionid, "id", $cm->id)) { error("Could not update the course module with the correct section"); } - add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", liveclassroom_send_logs("updateInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been updated with success"); + add_to_log($liveclassrooms->course, "liveclassroom", "Update activity", liveclassroom_send_logs("updateInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been updated with success"); return update_record("liveclassroom", $liveclassroom); /* if(update_record("liveclassroom", $liveclassroom)){ - add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." has been updated with success, associated to the room $roomname"); - return true; - } - + add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." has been updated with success, associated to the room $roomname"); + return true; + } + else { - add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." associated to the room $roomname, has not been updated"); - return false; - }*/ + add_to_log("", "liveclassroom", "Update activity", "$LIVECLASSROOM_LOGS?type=addInstance", "Activity ".$liveclassroom->name." associated to the room $roomname, has not been updated"); + return false; + }*/ } @@ -152,7 +152,7 @@ /// Given an ID of an instance of this module, /// this function will permanently delete the instance /// and any data that depends on it. - + if (! $liveclassroom = get_record("liveclassroom", "id", "$id")) { return false; } @@ -162,11 +162,11 @@ # Delete any dependent records here # if (! delete_records("liveclassroom", "id", $liveclassroom->id)) { - add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("errorDeleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." deletion failed"); - $result = false; + add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("errorDeleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." deletion failed"); + $result = false; } - add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("deleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been deleted with success"); - + add_to_log($liveclassrooms->course, "liveclassroom", "Delete activity", liveclassroom_send_logs("deleteInstance","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Activity ".$liveclassroom->name." has been deleted with success"); + return $result; } @@ -255,11 +255,11 @@ $enc_coursename = str_replace(" ", "_", $course->shortname); $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX; - + if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Teacher')) { //error("Cannot Create Teacher profile"); - return false; + return false; } $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX; @@ -267,7 +267,7 @@ if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Student')) { //error("Cannot Create Student profile"); - return false; + return false; } return true; } @@ -281,16 +281,16 @@ */ function liveclassroom_create_rooms ($course) { - //teacher is the lead of the presentation + //teacher is the lead of the presentation - liveclassroom_create_room($course->id, "Main Lecture Hall", true, liveclassroom_api_give_lectureroom_attributes()); - - //teachers and students have the same rights - liveclassroom_create_room($course->id, "Group 1", false, liveclassroom_api_give_discussionroom_attributes()); - liveclassroom_create_room($course->id, "Group 2", false, liveclassroom_api_give_discussionroom_attributes()); - liveclassroom_create_room($course->id, "Group 3", false, liveclassroom_api_give_discussionroom_attributes()); - - return true; + liveclassroom_create_room($course->id, "Main Lecture Hall", true, liveclassroom_api_give_lectureroom_attributes()); + + //teachers and students have the same rights + liveclassroom_create_room($course->id, "Group 1", false, liveclassroom_api_give_discussionroom_attributes()); + liveclassroom_create_room($course->id, "Group 2", false, liveclassroom_api_give_discussionroom_attributes()); + liveclassroom_create_room($course->id, "Group 3", false, liveclassroom_api_give_discussionroom_attributes()); + + return true; } @@ -326,53 +326,53 @@ $teacherid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX; $studentid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX; - - if($bool==true) { // main lecture hall - - if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) { - //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname"); - return false; - } - if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) { - - //error('liveclassroom_create_room: Cannot add classadminright to Teachers'); - return false; - } - if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Student')) { - //error('liveclassroom_create_room: Cannot add Participant right to students'); - return false; - } - if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) { - //error('liveclassroom_create_room: Cannot remove Participant right to Guest'); - return false; - } - } - else if($bool==false){ // discussion room - if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) { - //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname"); - return false; - } - if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) { - - //error('liveclassroom_create_room: Cannot add classadminright to Teachers'); - return false; - } - if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Instructor')) { - //error('liveclassroom_create_room: Cannot add Participant right to students'); - return false; - } - if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) { - //error('liveclassroom_create_room: Cannot remove Participant right to Guest'); - return false; - } - } - //Guest enabled? - if ((isset($attributes['guests'])) && ($attributes['guests']==1)) { - if (! liveclassroom_api_add_user_role ($roomid, 'Guest' , 'Student')) { - return false; - } - } - + + if($bool==true) { // main lecture hall + + if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) { + //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname"); + return false; + } + if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) { + + //error('liveclassroom_create_room: Cannot add classadminright to Teachers'); + return false; + } + if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Student')) { + //error('liveclassroom_create_room: Cannot add Participant right to students'); + return false; + } + if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) { + //error('liveclassroom_create_room: Cannot remove Participant right to Guest'); + return false; + } + } + else if($bool==false){ // discussion room + if (! liveclassroom_api_create_class ($roomid, $roomname, $bool, $attributes)) { + //error ("liveclassroom_create_room: Cannot create room with id:$roomid and name: $roomname"); + return false; + } + if (! liveclassroom_api_add_user_role ($roomid, $teacherid, 'ClassAdmin')) { + + //error('liveclassroom_create_room: Cannot add classadminright to Teachers'); + return false; + } + if (! liveclassroom_api_add_user_role ($roomid, $studentid, 'Instructor')) { + //error('liveclassroom_create_room: Cannot add Participant right to students'); + return false; + } + if (! liveclassroom_api_remove_user_role ($roomid, 'Guest' , 'Student')) { + //error('liveclassroom_create_room: Cannot remove Participant right to Guest'); + return false; + } + } + //Guest enabled? + if ((isset($attributes['guests'])) && ($attributes['guests']==1)) { + if (! liveclassroom_api_add_user_role ($roomid, 'Guest' , 'Student')) { + return false; + } + } + return true; } @@ -384,7 +384,7 @@ * @return array the activity ids of classrooms links available for this course */ function liveclassroom_ids($courseid) { - return array (); + return array (); } /** @@ -393,7 +393,7 @@ * @return string the number of classrooms available for this course */ function liveclassroom_count_rooms($courseid) { - return '0'; + return '0'; } @@ -403,7 +403,7 @@ * @return string the number of archives available for this course */ function liveclassroom_count_archives($courseid) { - return '0'; + return '0'; } @@ -413,15 +413,15 @@ * Return a string : the shortname of the course */ function liveclassroom_get_course_shortname($courseid) { - - if(!($course = get_record('course','id',$courseid))) { - //error( "Response get room name: query to database failed"); - return false; - } + + if(!($course = get_record('course','id',$courseid))) { + //error( "Response get room name: query to database failed"); + return false; + } - // $name = $course->shortname; - return $course->shortname; - + // $name = $course->shortname; + return $course->shortname; + } /* @@ -431,20 +431,20 @@ * Return a table with the activities name */ function liveclassroom_get_activities_list_per_room($course,$roomname) { - - if(!($activity_list = get_records('liveclassroom','course',$course->id))) { - error( "Response get_activities_list : query to database failed"); - } + + if(!($activity_list = get_records('liveclassroom','course',$course->id))) { + error( "Response get_activities_list : query to database failed"); + } - $i=0; - foreach($activity_list as $liveclassroom) { - if($liveclassroom->type==$roomname) { - $list_return[$i] = $liveclassroom->name; - $i++; - } - } + $i=0; + foreach($activity_list as $liveclassroom) { + if($liveclassroom->type==$roomname) { + $list_return[$i] = $liveclassroom->name; + $i++; + } + } - return $list_return; + return $list_return; } /* To know if the room given is a lecture room @@ -452,16 +452,16 @@ * return a boolean : true if the room is lecture room, false if not. */ function liveclassroom_is_lecturehall($roomid,$courseid) { - - $studentuserid = liveclassroom_api_get_student_user_id($courseid); + + $studentuserid = liveclassroom_api_get_student_user_id($courseid); - if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { - return true; - } - else{ - return false ; - } - + if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Student') { + return true; + } + else{ + return false ; + } + } /* To know if the room given is a discussion room @@ -469,67 +469,67 @@ * return a boolean : true if the room is breakout room, false if not. */ function liveclassroom_is_breakout($roomid, $courseid) { - - $studentuserid = liveclassroom_api_get_student_user_id($courseid); + + $studentuserid = liveclassroom_api_get_student_user_id($courseid); - if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Instructor') { - return true; - } - else{ - return false; - } + if(liveclassroom_api_role_user_room($roomid, $studentuserid)=='Instructor') { + return true; + } + else{ + return false; + } } /* * Delete all the activities on Moodle database for a room given * @praram $roomid : the id of the room associated to the activities -* return a boolean true if all is well done +* return a boolean true if all is well done */ function liveclassroom_delete_all_instance_of_room($roomid) { /// Given an ID of an instance of this module, /// this function will permanently delete the instance /// and any data that depends on it. - - $result = true; + + $result = true; if ($liveclassrooms = get_records("liveclassroom", "type", $roomid)) { $roomname = liveclassroom_api_get_room_name($liveclassroom->type); - # Delete any dependent records here # - foreach($liveclassrooms as $liveclassroom){ - - //get the course_module instance linked to the liveclassroom instance - if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) { - error("Course Module ID was incorrect"); - } - if (! delete_course_module($cm->id)) { - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllcm","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)"); - $result = false; - //Delete a course module and any associated data at the course level (events) - // notify("Could not delete the $cm->id (coursemodule)"); - } - if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) { - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAlldb","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database"); - $result = false; - } - //delete in the course section too - if (! delete_mod_from_section($cm->id, "$cm->section")) { - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllsection","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section"); - $result = false; - //notify("Could not delete the $mod->modulename from that section"); - } - - } - } - - add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("deleteAll","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have been deleted with success"); - + # Delete any dependent records here # + foreach($liveclassrooms as $liveclassroom){ + + //get the course_module instance linked to the liveclassroom instance + if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $liveclassroom->course)) { + error("Course Module ID was incorrect"); + } + if (! delete_course_module($cm->id)) { + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllcm","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id), "Delete all activities", "Could not delete the ".$cm->id." (coursemodule)"); + $result = false; + //Delete a course module and any associated data at the course level (events) + // notify("Could not delete the $cm->id (coursemodule)"); + } + if (! delete_records("liveclassroom", "id", "$liveclassroom->id")) { + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAlldb","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have not been deleted from the liveclassroom database"); + $result = false; + } + //delete in the course section too + if (! delete_mod_from_section($cm->id, "$cm->section")) { + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("errorDeleteAllsection","liveclassroomId=".$liveclassroom->id."&roomname=$roomname&cm=".$cm->id."§ion=".$cm->section), "Delete all activities", "Could not delete the ".$cm->id." from that section"); + $result = false; + //notify("Could not delete the $mod->modulename from that section"); + } + + } + } + + add_to_log($liveclassrooms->course, "liveclassroom", liveclassroom_send_logs("deleteAll","liveclassroomId=".$liveclassroom->id."&roomname=$roomname"), "Delete all activities", "All activities associated to the room $roomname have been deleted with success"); + return $result; } /* -* Create a linePart element - represent a <td> +* Create a linePart element - represent a <td> * * @param $xmldoc : the DOM document * @param $p_type : type of the element @@ -538,67 +538,67 @@ * Return a DOM document element **/ function liveclassroom_create_linepart_element($xmldoc, $p_displayContext, $p_type, $p_parameters) { - - $element = $xmldoc->create_element('lineElement'); - - $displayContext = $xmldoc->create_element('displayContext'); - $displayContext->append_child($xmldoc->create_text_node($p_displayContext)); - $element->append_child($displayContext); - $type = $xmldoc->create_element('type'); - $type->append_child($xmldoc->create_text_node($p_type)); - $element->append_child($type); - $parameters = $xmldoc->create_element('parameters'); - - foreach ($p_parameters as $key => $valuetab) { - - $parameter = $xmldoc->create_element('parameter'); - $name = $xmldoc->create_element('name'); - $name->append_child($xmldoc->create_text_node("$key")); - $value = $xmldoc->create_element('value'); - $value->append_child($xmldoc->create_text_node("$valuetab")); - $parameter->append_child($name); - $parameter->append_child($value); - - $parameters->append_child($parameter); - - } + + $element = $xmldoc->create_element('lineElement'); + + $displayContext = $xmldoc->create_element('displayContext'); + $displayContext->append_child($xmldoc->create_text_node($p_displayContext)); + $element->append_child($displayContext); + $type = $xmldoc->create_element('type'); + $type->append_child($xmldoc->create_text_node($p_type)); + $element->append_child($type); + $parameters = $xmldoc->create_element('parameters'); + + foreach ($p_parameters as $key => $valuetab) { + + $parameter = $xmldoc->create_element('parameter'); + $name = $xmldoc->create_element('name'); + $name->append_child($xmldoc->create_text_node("$key")); + $value = $xmldoc->create_element('value'); + $value->append_child($xmldoc->create_text_node("$valuetab")); + $parameter->append_child($name); + $parameter->append_child($value); + + $parameters->append_child($parameter); + + } - - $element->append_child($parameters); - - return $element; + + $element->append_child($parameters); + + return $element; } /* -* Create a header bar element +* Create a header bar element * * @param $xmldoc : the DOM document * * Return a DOM document element which represent the header bar **/ function liveclassroom_create_headerbar($xmldoc){ - $headerbar = $xmldoc->create_element('windowsElement'); - - $hbtype = $xmldoc->create_element('type'); - $hbtype->append_child($xmldoc->create_text_node("headerBar")); - $headerbar->append_child($hbtype); - $hbelementParameters = $xmldoc->create_element("windowsElementParameters"); - $headerbarinformations = $xmldoc->create_element("headerBarInformations"); - $hbstyle = $xmldoc->create_element("style"); - $hbstyle->append_child($xmldoc->create_text_node("headerBar")); - $headerbarinformations->append_child($hbstyle); - $hbpictureUrl = $xmldoc->create_element("pictureUrl"); - $hbpictureUrl->append_child($xmldoc->create_text_node("pictures/items/headerbar-logo.png")); - $headerbarinformations->append_child($hbpictureUrl); - $hbelementParameters->append_child($headerbarinformations); - - $headerbar->append_child($hbelementParameters); - - return $headerbar; + $headerbar = $xmldoc->create_element('windowsElement'); + + $hbtype = $xmldoc->create_element('type'); + $hbtype->append_child($xmldoc->create_text_node("headerBar")); + $headerbar->append_child($hbtype); + $hbelementParameters = $xmldoc->create_element("windowsElementParameters"); + $headerbarinformations = $xmldoc->create_element("headerBarInformations"); + $hbstyle = $xmldoc->create_element("style"); + $hbstyle->append_child($xmldoc->create_text_node("headerBar")); + $headerbarinformations->append_child($hbstyle); + $hbpictureUrl = $xmldoc->create_element("pictureUrl"); + $hbpictureUrl->append_child($xmldoc->create_text_node("pictures/items/headerbar-logo.png")); + $headerbarinformations->append_child($hbpictureUrl); + $hbelementParameters->append_child($headerbarinformations); + + $headerbar->append_child($hbelementParameters); + + return $headerbar; } /* -* Create a validation comment element +* Create a validation comment element * * @param $xmldoc : the DOM document * @param $parameters : array of parameters to add to the element @@ -606,28 +606,28 @@ * Return a DOM document element which represent the validation comment **/ function liveclassroom_create_validation_comment($xmldoc, $parameters){ - $validationelement = $xmldoc->create_element("validationElement"); - $vtype = $xmldoc->create_element("type"); - $vtype->append_child($xmldoc->create_text_node("validationComment")); - $validationelement->append_child($vtype); - - $vparameters = $xmldoc->create_element("parameters"); - - foreach ($parameters as $key => $valuetab) { - - $name = $xmldoc->create_element("$key"); - $name->append_child($xmldoc->create_text_node("$valuetab")); - $vparameters->append_child($name); - - } - - $validationelement->append_child($vparameters); - - return $validationelement; + $validationelement = $xmldoc->create_element("validationElement"); + $vtype = $xmldoc->create_element("type"); + $vtype->append_child($xmldoc->create_text_node("validationComment")); + $validationelement->append_child($vtype); + + $vparameters = $xmldoc->create_element("parameters"); + + foreach ($parameters as $key => $valuetab) { + + $name = $xmldoc->create_element("$key"); + $name->append_child($xmldoc->create_text_node("$valuetab")); + $vparameters->append_child($name); + + } + + $validationelement->append_child($vparameters); + + return $validationelement; } /* -* Create a validation button element +* Create a validation button element * * @param $xmldoc : the DOM document * @param $parameters : array of parameters to add to the element @@ -637,48 +637,48 @@ **/ function liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters){ - $validationelement = $xmldoc->create_element("validationElement"); - $vtype = $xmldoc->create_element("type"); - $vtype->append_child($xmldoc->create_text_node("validationButton")); - $validationelement->append_child($vtype); - - $vparameters = $xmldoc->create_element("parameters"); - - $vstyle = $xmldoc->create_element("style"); - $vstyle->append_child($xmldoc->create_text_node($parameters['style'])); - $vparameters->append_child($vstyle); + $validationelement = $xmldoc->create_element("validationElement"); + $vtype = $xmldoc->create_element("type"); + $vtype->append_child($xmldoc->create_text_node("validationButton")); + $validationelement->append_child($vtype); + + $vparameters = $xmldoc->create_element("parameters"); + + $vstyle = $xmldoc->create_element("style"); + $vstyle->append_child($xmldoc->create_text_node($parameters['style'])); + $vparameters->append_child($vstyle); - $vaction = $xmldoc->create_element("action"); - $vactionName = $xmldoc->create_element("name"); - $vactionName->append_child($xmldoc->create_text_node($parameters['action'] )); - $vaction->append_child($vactionName); - - - - $vactionParameters = $xmldoc->create_element("parameters"); - - foreach ($actionParameters as $parameter) { - - $actionParameter = $xmldoc->create_element("parameter"); - $actionParameter->append_child($xmldoc->create_text_node("$parameter")); + $vaction = $xmldoc->create_element("action"); + $vactionName = $xmldoc->create_element("name"); + $vactionName->append_child($xmldoc->create_text_node($parameters['action'] )); + $vaction->append_child($vactionName); + + + + $vactionParameters = $xmldoc->create_element("parameters"); + + foreach ($actionParameters as $parameter) { + + $actionParameter = $xmldoc->create_element("parameter"); + $actionParameter->append_child($xmldoc->create_text_node("$parameter")); - $vactionParameters->append_child($actionParameter); - - } - $vaction->append_child($vactionParameters); - - $vparameters->append_child($vaction); - - $vactionValue = $xmldoc->create_element("value"); - $vactionValue->append_child($xmldoc->create_text_node($parameters['value'])); - $vparameters->append_child($vactionValue); - - $validationelement->append_child($vparameters); - return $validationelement; + $vactionParameters->append_child($actionParameter); + + } + $vaction->append_child($vactionParameters); + + $vparameters->append_child($vaction); + + $vactionValue = $xmldoc->create_element("value"); + $vactionValue->append_child($xmldoc->create_text_node($parameters['value'])); + $vparameters->append_child($vactionValue); + + $validationelement->append_child($vparameters); + return $validationelement; } /* -* Create a validation button bar element +* Create a validation button bar element * * @param $xmldoc : the DOM document * Uses liveclassroom_create_validation_comment and liveclassroom_create_validation_button @@ -686,48 +686,48 @@ **/ function liveclassroom_create_validationbar($xmldoc,$roomId){ - $headerbar = $xmldoc->create_element('windowsElement'); - - $hbtype = $xmldoc->create_element('type'); - $hbtype->append_child($xmldoc->create_text_node("validationBar")); - $headerbar->append_child($hbtype); - $hbelementParameters = $xmldoc->create_element("windowsElementParameters"); - - $validationelements = $xmldoc->create_element("validationElements"); - $parameters = array("style" => "alert", "value" => "*"); - $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters)); - - $parameters = array("style" => "", "value" => "Required Fields"); - $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters)); - - $parameters = array("style" => "", "name" => "", "action" => "launchAjaxRequest", "value" => "Cancel"); - $actionParameters = array("generateListRooms.php", "Management", "_", "false"); - $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters)); - - if($_GET['action']=='update'){ - $submit = "updateRoom"; - $submitName = "Save all"; - } - else - { - $submit = "createRoom"; - $submitName = "Create"; - } - - $parameters = array("style" => "comment", "name" => "", "action" => "submitForm", "value" => "$submitName"); - - $actionParameters = array("manageRoomAction.php", "$submit", "id" => "$roomId"); - $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters)); - - - $hbelementParameters->append_child($validationelements); - $headerbar->append_child($hbelementParameters); - - return $headerbar; + $headerbar = $xmldoc->create_element('windowsElement'); + + $hbtype = $xmldoc->create_element('type'); + $hbtype->append_child($xmldoc->create_text_node("validationBar")); + $headerbar->append_child($hbtype); + $hbelementParameters = $xmldoc->create_element("windowsElementParameters"); + + $validationelements = $xmldoc->create_element("validationElements"); + $parameters = array("style" => "alert", "value" => "*"); + $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters)); + + $parameters = array("style" => "", "value" => "Required Fields"); + $validationelements->append_child(liveclassroom_create_validation_comment($xmldoc, $parameters)); + + $parameters = array("style" => "", "name" => "", "action" => "launchAjaxRequest", "value" => "Cancel"); + $actionParameters = array("generateListRooms.php", "Management", "_", "false"); + $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters)); + + if($_GET['action']=='update'){ + $submit = "updateRoom"; + $submitName = "Save all"; + } + else + { + $submit = "createRoom"; + $submitName = "Create"; + } + + $parameters = array("style" => "comment", "name" => "", "action" => "submitForm", "value" => "$submitName"); + + $actionParameters = array("manageRoomAction.php", "$submit", "id" => "$roomId"); + $validationelements->append_child(liveclassroom_create_validation_button($xmldoc, $parameters, $actionParameters)); + + + $hbelementParameters->append_child($validationelements); + $headerbar->append_child($hbelementParameters); + + return $headerbar; } /* -* Create a menu element +* Create a menu element * * @param $xmldoc : the DOM document * @params $p_... : parameters of the menu element @@ -736,57 +736,57 @@ **/ function liveclassroom_create_menu_element($xmldoc,$p_availibility, $p_type, $p_typeOfUser, $p_typeOfProduct, $p_pictureUrl, $p_value, $p_lcTypeAction, $p_lcNameAction){ - $menuElement = $xmldoc->create_element('menuElement'); - - $type = $xmldoc->create_element('type'); - $type->append_child($xmldoc->create_text_node("$p_type")); - $menuElement->append_child($type); - - $typeOfProduct = $xmldoc->create_element('typeOfProduct'); - $typeOfProduct->append_child($xmldoc->create_text_node("$p_typeOfProduct")); - $menuElement->append_child($typeOfProduct); - - $availibility = $xmldoc->create_element('availibility'); - $availibility->append_child($xmldoc->create_text_node("$p_availibility")); - $menuElement->append_child($availibility); - - $typeOfUser = $xmldoc->create_element('typeOfUser'); - $typeOfUser->append_child($xmldoc->create_text_node("$p_typeOfUser")); - $menuElement->append_child($typeOfUser); - - $pictureUrl = $xmldoc->create_element('pictureUrl'); - $pictureUrl->append_child($xmldoc->create_text_node("$p_pictureUrl")); - $menuElement->append_child($pictureUrl); - - $value = $xmldoc->create_element('value'); - $value->append_child($xmldoc->create_text_node("$p_value")); - $menuElement->append_child($value); - - $lcAction = $xmldoc->create_element('action'); - $lcActionName = $xmldoc->create_element('name'); - $lcActionName->append_child($xmldoc->create_text_node("$p_lcTypeAction")); + $menuElement = $xmldoc->create_element('menuElement'); + + $type = $xmldoc->create_element('type'); + $type->append_child($xmldoc->create_text_node("$p_type")); + $menuElement->append_child($type); + + $typeOfProduct = $xmldoc->create_element('typeOfProduct'); + $typeOfProduct->append_child($xmldoc->create_text_node("$p_typeOfProduct")); + $menuElement->append_child($typeOfProduct); + + $availibility = $xmldoc->create_element('availibility'); + $availibility->append_child($xmldoc->create_text_node("$p_availibility")); + $menuElement->append_child($availibility); + + $typeOfUser = $xmldoc->create_element('typeOfUser'); + $typeOfUser->append_child($xmldoc->create_text_node("$p_typeOfUser")); + $menuElement->append_child($typeOfUser); + + $pictureUrl = $xmldoc->create_element('pictureUrl'); + $pictureUrl->append_child($xmldoc->create_text_node("$p_pictureUrl")); + $menuElement->append_child($pictureUrl); + + $value = $xmldoc->create_element('value'); + $value->append_child($xmldoc->create_text_node("$p_value")); + $menuElement->append_child($value); + + $lcAction = $xmldoc->create_element('action'); + $lcActionName = $xmldoc->create_element('name'); + $lcActionName->append_child($xmldoc->create_text_node("$p_lcTypeAction")); - $lcAction->append_child($lcActionName); - $lcActionParameters = $xmldoc->create_element('parameters'); - - $lcActionParameter = $xmldoc->create_element('parameter'); - $lcActionParameter->append_child($xmldoc->create_text_node("$p_lcNameAction")); - $lcActionParameters->append_child($lcActionParameter); - - $lcAction->append_child($lcActionParameters); + $lcAction->append_child($lcActionName); + $lcActionParameters = $xmldoc->create_element('parameters'); + + $lcActionParameter = $xmldoc->create_element('parameter'); + $lcActionParameter->append_child($xmldoc->create_text_node("$p_lcNameAction")); + $lcActionParameters->append_child($lcActionParameter); + + $lcAction->append_child($lcActionParameters); - $lcAction->append_child($lcActionParameters); + $lcAction->append_child($lcActionParameters); - - $menuElement->append_child($lcAction); + + $menuElement->append_child($lcAction); - $xmldoc->append_child($menuElement); + $xmldoc->append_child($menuElement); - return $menuElement; + return $menuElement; } /* -* Create a product information element +* Create a product information element * * @param $xmldoc : the DOM document * @param $position : type of the element @@ -798,25 +798,25 @@ **/ function liveclassroom_create_product_information($xmldoc,$position,$name,$style,$value) { - $productInfo = $xmldoc->create_element('productInformations'); - - $productPosition = $xmldoc->create_element('position'); - $productPosition->append_child($xmldoc->create_text_node("$position")); - $productInfo->append_child($productPosition); - - $productName = $xmldoc->create_element('name'); - $productName->append_child($xmldoc->create_text_node("$name")); - $productInfo->append_child($productName); - - $productStyle = $xmldoc->create_element('style'); - $productStyle->append_child($xmldoc->create_text_node("$style")); - $productInfo->append_child($productStyle); - - $productValue = $xmldoc->create_element('value'); - $productValue->append_child($xmldoc->create_text_node("$value")); - $productInfo->append_child($productValue); - - return $productInfo; + $productInfo = $xmldoc->create_element('productInformations'); + + $productPosition = $xmldoc->create_element('position'); + $productPosition->append_child($xmldoc->create_text_node("$position")); + $productInfo->append_child($productPosition); + + $productName = $xmldoc->create_element('name'); + $productName->append_child($xmldoc->create_text_node("$name")); + $productInfo->append_child($productName); + + $productStyle = $xmldoc->create_element('style'); + $productStyle->append_child($xmldoc->create_text_node("$style")); + $productInfo->append_child($productStyle); + + $productValue = $xmldoc->create_element('value'); + $productValue->append_child($xmldoc->create_text_node("$value")); + $productInfo->append_child($productValue); + + return $productInfo; } @@ -830,109 +830,109 @@ */ function create_panel_info($xmldoc, $p_context, $p_styleEnabled, $p_styleDisabled, $p_name, $pos, $p_display) { - $panelInformation = $xmldoc->create_element('panelInformations'); - - $display = $xmldoc->create_element('display'); - $display->append_child($xmldoc->create_text_node("$p_display")); - $panelInformation->append_child($display); - - $styleEnabled = $xmldoc->create_element('styleEnabled'); - $styleEnabled->append_child($xmldoc->create_text_node("$p_styleEnabled")); - $panelInformation->append_child($styleEnabled); - - $styleDisabled = $xmldoc->create_element('styleDisabled'); - $styleDisabled->append_child($xmldoc->create_text_node("$p_styleDisabled")); - $panelInformation->append_child($styleDisabled); - - $name = $xmldoc->create_element('name'); - $name->append_child($xmldoc->create_text_node("$p_name")); - $panelInformation->append_child($name); - - $position = $xmldoc->create_element('position'); - $position->append_child($xmldoc->create_text_node($pos)); - $panelInformation->append_child($position); - - $contextDisplay = $xmldoc->create_element('contextDisplay'); - $contextDisplay->append_child($xmldoc->create_text_node("$p_context")); - $panelInformation->append_child($contextDisplay); - - return $panelInformation; + $panelInformation = $xmldoc->create_element('panelInformations'); + + $display = $xmldoc->create_element('display'); + $display->append_child($xmldoc->create_text_node("$p_display")); + $panelInformation->append_child($display); + + $styleEnabled = $xmldoc->create_element('styleEnabled'); + $styleEnabled->append_child($xmldoc->create_text_node("$p_styleEnabled")); + $panelInformation->append_child($styleEnabled); + + $styleDisabled = $xmldoc->create_element('styleDisabled'); + $styleDisabled->append_child($xmldoc->create_text_node("$p_styleDisabled")); + $panelInformation->append_child($styleDisabled); + + $name = $xmldoc->create_element('name'); + $name->append_child($xmldoc->create_text_node("$p_name")); + $panelInformation->append_child($name); + + $position = $xmldoc->create_element('position'); + $position->append_child($xmldoc->create_text_node($pos)); + $panelInformation->append_child($position); + + $contextDisplay = $xmldoc->create_element('contextDisplay'); + $contextDisplay->append_child($xmldoc->create_text_node("$p_context")); + $panelInformation->append_child($contextDisplay); + + return $panelInformation; } /** -* This function is to check the parameters are good on the frame and there is no hack ! +* This function is to check the parameters are good on the frame and there is no hack ! * @param $request : array with the url parameters (usually $_POST or $_GET) * return a string with all the parameters if the signature is ok, false if not (HACKING) */ function liveclassroom_init_session($request){ - - if(time() <= ($request['time']+1800)) { - - $enc_params = array(); - //array of keys - $url_parameters = $request; - foreach ($request as $key => $url_p) { - if(strstr($key,"enc_")) { - $enc_params[substr($key, 4)]=$url_p; - } - } + + if(time() <= ($request['time']+1800)) { + + $enc_params = array(); + //array of keys + $url_parameters = $request; + foreach ($request as $key => $url_p) { + if(strstr($key,"enc_")) { + $enc_params[substr($key, 4)]=$url_p; + } + } - foreach ($enc_params as $key => $value) { - $signature .= $value; - $url_params .= "enc_".$key."=".$value."&" ; - } - - if(strcmp(md5($signature), $request['signature'])!=0) { - add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSignature",""), "Init session", "Signature is not recognize."); - error("Signature is not recognize."); - return false; - - } + foreach ($enc_params as $key => $value) { + $signature .= $value; + $url_params .= "enc_".$key."=".$value."&" ; + } + + if(strcmp(md5($signature), $request['signature'])!=0) { + add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSignature",""), "Init session", "Signature is not recognize."); + error("Signature is not recognize."); + return false; + + } - return true; - } - else { - add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSessionTimeOut",""), "Init session", "Session has timed out due to inactivity."); - error("The session has timed out due to inactivity. Please reload the page to reconnect."); - return false; - - } + return true; + } + else { + add_to_log($request['enc_course_id'], "liveclassroom", liveclassroom_send_logs("errorSessionTimeOut",""), "Init session", "Session has timed out due to inactivity."); + error("The session has timed out due to inactivity. Please reload the page to reconnect."); + return false; + + } } /* * Give the parameters with the signature md5 to give to the frame -* @param $courseid : the id of the current course +* @param $courseid : the id of the current course * return a string with all the parameters to give to the url */ function liveclassroom_get_url_params($courseid) { - global $USER; - global $CFG; - - //For moodle 1.7 -// if(strstr($CFG->release,"1.6")) // 1.6.* version + global $USER; + global $CFG; + + //For moodle 1.7 +// if(strstr($CFG->release,"1.6")) // 1.6.* version - if(isstudent($courseid)) { //Student - $role='Student'; - } - else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher - $role='Instructor'; - } - - if(strstr($CFG->release,"1.7")) { // 1.7.* version - if (iscreator()) { // Course Creator - $role='Instructor'; - } - else if (!isteacheredit($courseid)) { // Non-editing Teacher - $role='Student'; - } - } - - $signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role); - $url_params = "enc_course_id=".$courseid."&enc_email=".$USER->email."&enc_firstname=".$USER->firstname."&enc_lastname=".$USER->lastname."&enc_role=".$role."&signature=".$signature; + if(isstudent($courseid)) { //Student + $role='Student'; + } + else if (isadmin() || isteacher($courseid, $USER->id)) { // Admin, Teacher + $role='Instructor'; + } + + if(strstr($CFG->release,"1.7")) { // 1.7.* version + if (iscreator()) { // Course Creator + $role='Instructor'; + } + else if (!isteacheredit($courseid)) { // Non-editing Teacher + $role='Student'; + } + } + + $signature = md5($courseid.$USER->email.$USER->firstname.$USER->lastname.$role); + $url_params = "enc_course_id=".$courseid."&enc_email=".$USER->email."&enc_firstname=".$USER->firstname."&enc_lastname=".$USER->lastname."&enc_role=".$role."&signature=".$signature; - return $url_params; + return $url_params; } @@ -944,48 +944,48 @@ function liveclassroom_get_session_params($xmldoc, $sessionParams) { // General Information - global $CFG; - - $information = $xmldoc->create_element("information"); + global $CFG; + + $information = $xmldoc->create_element("information"); $firstName = $xmldoc->create_element("firstName"); $firstName->append_child($xmldoc->create_text_node($sessionParams['enc_firstname'])); $lastName = $xmldoc->create_element("lastName"); $lastName->append_child($xmldoc->create_text_node($sessionParams['enc_lastname'])); $role = $xmldoc->create_element("role"); - $role->append_child($xmldoc->create_text_node($sessionParams['enc_role'])); + $role->append_child($xmldoc->create_text_node($sessionParams['enc_role'])); $email = $xmldoc->create_element("email"); $email->append_child($xmldoc->create_text_node($sessionParams['enc_email'])); $timeOfLoad = $xmldoc->create_element("timeOfLoad"); $timeOfLoad->append_child($xmldoc->create_text_node($sessionParams['time'])); $courseId = $xmldoc->create_element("courseId"); - $courseId->append_child($xmldoc->create_text_node($sessionParams['enc_course_id'])); - if ($sessionParams['authToken'] != null) { - $authToken = $xmldoc->create_element("authToken"); - $authToken->append_child($xmldoc->create_text_node($sessionParams['authToken'])); - } - $lcServerUrl = $xmldoc->create_element("lcServerUrl"); - $lcServerUrl->append_child($xmldoc->create_text_node($CFG->liveclassroom_servername)); - $vtServerUrl = $xmldoc->create_element("vtServerUrl"); - $vtServerUrl->append_child($xmldoc->create_text_node("")); + $courseId->append_child($xmldoc->create_text_node($sessionParams['enc_course_id'])); + if ($sessionParams['authToken'] != null) { + $authToken = $xmldoc->create_element("authToken"); + $authToken->append_child($xmldoc->create_text_node($sessionParams['authToken'])); + } + $lcServerUrl = $xmldoc->create_element("lcServerUrl"); + $lcServerUrl->append_child($xmldoc->create_text_node($CFG->liveclassroom_servername)); + $vtServerUrl = $xmldoc->create_element("vtServerUrl"); + $vtServerUrl->append_child($xmldoc->create_text_node("")); $signature = $xmldoc->create_element("signature"); $signature->append_child($xmldoc->create_text_node($sessionParams['signature'])); - + $information->append_child($firstName); $information->append_child($lastName); - $information->append_child($role); - $information->append_child($email); - $information->append_child($timeOfLoad); + $information->append_child($role); + $information->append_child($email); + $information->append_child($timeOfLoad); $information->append_child($courseId); $information->append_child($authToken); $information->append_child($lcServerUrl); $information->append_child($vtServerUrl); - $information->append_child($signature); + $information->append_child($signature); return $information; - - // END of General Information - + + // END of General Information + } /* Create a message element @@ -996,36 +996,36 @@ */ function liveclassroom_create_message($xmldoc, $value) { - $message = $xmldoc->create_element('windowsElement'); - - $messagetype = $xmldoc->create_element('type'); - $messagetype->append_child($xmldoc->create_text_node("message")); - $message->append_child($messagetype); - - $messageElementParameters = $xmldoc->create_element("windowsElementParameters"); - - $m = $xmldoc->create_element("message"); - - $mtype = $xmldoc->create_element("type"); - $mtype->append_child($xmldoc->create_text_node("message")); - $m->append_child($mtype); - - $mvalue = $xmldoc->create_element("value"); - $mvalue->append_child($xmldoc->create_text_node($value)); - $m->append_child($mvalue); - - $messageElementParameters->append_child($m); - - $message->append_child($messageElementParameters); - - return $message; + $message = $xmldoc->create_element('windowsElement'); + + $messagetype = $xmldoc->create_element('type'); + $messagetype->append_child($xmldoc->create_text_node("message")); + $message->append_child($messagetype); + + $messageElementParameters = $xmldoc->create_element("windowsElementParameters"); + + $m = $xmldoc->create_element("message"); + + $mtype = $xmldoc->create_element("type"); + $mtype->append_child($xmldoc->create_text_node("message")); + $m->append_child($mtype); + + $mvalue = $xmldoc->create_element("value"); + $mvalue->append_child($xmldoc->create_text_node($value)); + $m->append_child($mvalue); + + $messageElementParameters->append_child($m); + + $message->append_child($messageElementParameters); + + return $message; } /* -* Get the message with a type +* Get the message with a type * @param $type : a string with the type of the message -* return a string with the message to display +* return a string with the message to display */ function liveclassroom_get_message($type) { @@ -1045,14 +1045,14 @@ */ function liveclassroom_send_logs($type,$parameters) { - global $LIVECLASSROOM_LOGS; + global $LIVECLASSROOM_LOGS; - - $link = $LIVECLASSROOM_LOGS."?type=$type"; - $link .= "&$parameters"; - $link .= "&time=".time(); - - return $link; + + $link = $LIVECLASSROOM_LOGS."?type=$type"; + $link .= "&$parameters"; + $link .= "&time=".time(); + + return $link; } @@ -1086,7 +1086,7 @@ if (empty($version)) { return "emptyversion"; } - + return $version; } Modified: trunk/moodle/mod/liveclassroom/manageRoomAction.php =================================================================== --- trunk/moodle/mod/liveclassroom/manageRoomAction.php 2006-12-29 16:03:27 UTC (rev 153) +++ trunk/moodle/mod/liveclassroom/manageRoomAction.php 2007-01-02 15:45:44 UTC (rev 154) @@ -129,23 +129,33 @@ $messageType = 'roomUpdated'; } else if($_GET['action']=='deleteRoom') { + + $is_archive = liveclassroom_api_room_is_archive($_GET['id']); + //delete the activities linked to this room if (! liveclassroom_delete_all_instance_of_room($_GET['id'])) { - notify("Could not delete the instances of the room"); + notify("Could not delete the activities for the room: " + $_GET['id']); } //delete the room on the server - liveclassroom_api_delete_room($_GET['id']); - - $messageType = 'roomDeleted'; + if (! liveclassroom_api_delete_room($_GET['id'])) { + error("Unable to delete room with Id: ".$_GET['id']); + } + + if ($is_archive) { + $messageType = 'archiveDeleted'; + } + else { + $messageType = 'roomDeleted'; + } } if (!$usersession = liveclassroom_create_session ($course, isteacher($courseid, $USER->id))) { error ("Cannot create session"); } - - $urlParams = $url.'&authToken='.$usersession.'&time='.$_GET['time']; - if(isset($messageType)) $urlParams .= '&messageType='.$messageType; + + $urlParams = $url.'&authToken='.$usersession.'&time='.$_GET['time']; + if(isset($messageType)) $urlParams .= '&messageType='.$messageType; header('Location: welcome.php?id='.$courseid.'&'.$urlParams); } Modified: trunk/moodle/mod/liveclassroom/welcome.php =================================================================== --- trunk/moodle/mod/liveclassroom/welcome.php 2006-12-29 16:03:27 UTC (rev 153) +++ trunk/moodle/mod/liveclassroom/welcome.php 2007-01-02 15:45:44 UTC (rev 154) @@ -106,7 +106,7 @@ function doDelete(){ if(currentId!=""){ - var complete_url='manageRoomAction.php'+'?time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'&id ='+currentId+'&action=deleteRoom&hza='+session['authToken'] ; + var complete_url='manageRoomAction.php'+'?time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]+'&id='+currentId+'&action=deleteRoom&hza='+session['authToken'] ; location.href = complete_url //var w = window.open(complete_url, '_top'); // w.focus(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-01-03 10:48:52
|
Revision: 155 http://svn.sourceforge.net/hw4mdl/?rev=155&view=rev Author: hugues Date: 2007-01-03 02:48:50 -0800 (Wed, 03 Jan 2007) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10557 - Updated the configuration to only accept URLs without trailing slashes. If a user enters a trailing slash, the module will reject it with an error message and return the user to the configuration page. Modified Paths: -------------- trunk/moodle/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/lib.php Modified: trunk/moodle/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-02 15:45:44 UTC (rev 154) +++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-03 10:48:50 UTC (rev 155) @@ -49,6 +49,7 @@ $string['wrongconfigurationURLincorrect'] = 'Wrong server configuration, URL incorrect, please see the logs to fix the error'; $string['wrongAdminPassword'] = 'Wrong password'; $string['wrongadminpass'] = 'Invalid Authentication, please check your admin name or password'; +$string['trailingSlash'] = 'The Live Classroom Server Name ends with a trailing \'/\'. Please remove it and submit the configuration again.'; //Add activity form $string['name'] = 'Name'; Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2007-01-02 15:45:44 UTC (rev 154) +++ trunk/moodle/mod/liveclassroom/lib.php 2007-01-03 10:48:50 UTC (rev 155) @@ -53,7 +53,8 @@ global $CFG; if(empty($config->servername)){ - add_to_log("", "liveclassroom", "URL", liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable"); + add_to_log("", "liveclassroom", "URL", + liveclassroom_send_logs("errorUrlUnavailable",""), "URL unavailable"); error(get_string('wrongconfigurationURLunavailable', 'liveclassroom')); } else if(empty($config->adminusername)){ @@ -62,7 +63,12 @@ else if(empty($config->adminpassword)){ error(get_string('emptyAdminPassword', 'liveclassroom')); } - + + $length = strlen($config->servername); + if ($config->servername{$length-1} == '/') { + error(get_String('trailingSlash', 'liveclassroom'), $_SERVER["HTTP_REFERER"]); + } + liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword); //TODO: check the user is really an admin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-01-04 09:58:31
|
Revision: 160 http://svn.sourceforge.net/hw4mdl/?rev=160&view=rev Author: hugues Date: 2007-01-04 01:55:29 -0800 (Thu, 04 Jan 2007) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10615 - Updated the display of the Room ID: labrel and ield when guest access os enabled - Updated a typo in french Modified Paths: -------------- trunk/moodle/lang/fr/liveclassroom.php trunk/moodle/lang/fr_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/generateSettings.php Modified: trunk/moodle/lang/fr/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159) +++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160) @@ -133,7 +133,7 @@ $string['Unlimited'] = "Illimité"; $string['Limited: '] = "Limite : "; $string['Enable guest access'] = "Autoriser l'accès Invité"; -$string['Room Id: '] = "Room Id&bnsp;: "; +$string['Room Id: '] = "Room Id : "; Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 07:58:56 UTC (rev 159) +++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160) @@ -133,7 +133,7 @@ $string['Unlimited'] = "Illimité"; $string['Limited: '] = "Limite : "; $string['Enable guest access'] = "Autoriser l'accès Invité"; -$string['Room Id: '] = "Room Id&bnsp;: "; +$string['Room Id: '] = "Room Id : "; Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 07:58:56 UTC (rev 159) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 09:55:29 UTC (rev 160) @@ -1111,6 +1111,7 @@ $linepart->append_child($align); $parameters=array("type" => "checkbox", "value" => "1", "id" => "guestAcess_value", "name" => "guests", "onclick" => "hideDiv(\"launcher_link_row\")") ; if(($action=='update')&&(liveclassroom_api_role_user_room($roomId,'Guest')=='Student')){ + $guest_access_enabled = true; $parameters['checked']=true; } @@ -1122,12 +1123,11 @@ $panelContent->append_child($panelLine); - // SIXTH LINE - HIDE + // SIXTH LINE - Hide when guest access disabled $panelLine = $xmldoc->create_element('panelLine'); - $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node("hide")); + $panelLineStyle->append_child($xmldoc->create_text_node($guest_access_enabled?"visible":"hide")); $panelLine->append_child($panelLineStyle); $panelLineId = $xmldoc->create_element('id'); $panelLineId->append_child($xmldoc->create_text_node("launcher_link_row")); @@ -1135,7 +1135,7 @@ $linepart = $xmldoc->create_element('panelLinePart'); $style = $xmldoc->create_element('style'); - $style->append_child($xmldoc->create_text_node(" ")); + $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); $colspan = $xmldoc->create_element('colspan'); $colspan->append_child($xmldoc->create_text_node("2")); @@ -1143,7 +1143,8 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id:")) )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", + $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id: ")) )); $panelLine->append_child($linepart); $parameters=array("type" => "text", "id" => "link", "name" => "link", "maxlength" => "50") ; @@ -1178,7 +1179,7 @@ $xmldoc->append_child($root); - $xmldoc->dump_file("choice.xml", false, true); + $xmldoc->dump_file("/Users/hugues/Sites/moodledata/choice.xml", false, true); $xmlstring = $xmldoc->dump_mem(true); // Xml datas into a string $finalstring = str_replace("\n", '', $xmlstring); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-01-04 10:22:55
|
Revision: 161 http://svn.sourceforge.net/hw4mdl/?rev=161&view=rev Author: hugues Date: 2007-01-04 02:22:50 -0800 (Thu, 04 Jan 2007) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10615 - Displays a launcher link Modified Paths: -------------- trunk/moodle/lang/en/liveclassroom.php trunk/moodle/lang/en_utf8/liveclassroom.php trunk/moodle/lang/fr/liveclassroom.php trunk/moodle/lang/fr_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/generateSettings.php Modified: trunk/moodle/lang/en/liveclassroom.php =================================================================== --- trunk/moodle/lang/en/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160) +++ trunk/moodle/lang/en/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161) @@ -132,6 +132,7 @@ $string['Limited: '] = "Limited: "; $string['Enable guest access'] = "Enable guest access"; $string['Room Id: '] = "Room Id: "; +$string['launcherLink'] = "Launcher link: "; Modified: trunk/moodle/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160) +++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161) @@ -132,6 +132,7 @@ $string['Limited: '] = "Limited: "; $string['Enable guest access'] = "Enable guest access"; $string['Room Id: '] = "Room Id: "; +$string['launcherLink'] = "Launcher link: "; Modified: trunk/moodle/lang/fr/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160) +++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161) @@ -134,6 +134,7 @@ $string['Limited: '] = "Limite : "; $string['Enable guest access'] = "Autoriser l'accès Invité"; $string['Room Id: '] = "Room Id : "; +$string['launcherLink'] = "Lien de lancement : "; Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 09:55:29 UTC (rev 160) +++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 10:22:50 UTC (rev 161) @@ -134,6 +134,7 @@ $string['Limited: '] = "Limite : "; $string['Enable guest access'] = "Autoriser l'accès Invité"; $string['Room Id: '] = "Room Id : "; +$string['launcherLink'] = "Lien de lancement : "; Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 09:55:29 UTC (rev 160) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 10:22:50 UTC (rev 161) @@ -1144,16 +1144,18 @@ $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", - $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("Room Id: ")) )); + $parameters=array("for" => "launcher_link_field", "value" => liveclassroom_get_message("launcherLink")) )); $panelLine->append_child($linepart); - - $parameters=array("type" => "text", "id" => "link", "name" => "link", "maxlength" => "50") ; + + $launcher_link = $CFG->liveclassroom_servername."/launcher.cgi?room=".$roomId; + $parameters=array("type" => "text", "id" => "link", + "name" => "link", "maxlength" => "50", + "size" => strlen($launcher_link)); if($action=='update'){ - $parameters['value']=$roomId; + $parameters['value']=$launcher_link; } $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $panelContent->append_child($panelLine); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-01-04 17:43:57
|
Revision: 167 http://svn.sourceforge.net/hw4mdl/?rev=167&view=rev Author: hugues Date: 2007-01-04 09:43:55 -0800 (Thu, 04 Jan 2007) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10613 - updated the display of the checkboxes - Changed the text, the functionnality was actually correctly implemented Modified Paths: -------------- trunk/moodle/lang/en/liveclassroom.php trunk/moodle/lang/en_utf8/liveclassroom.php trunk/moodle/lang/fr/liveclassroom.php trunk/moodle/lang/fr_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/generateSettings.php Modified: trunk/moodle/lang/en/liveclassroom.php =================================================================== --- trunk/moodle/lang/en/liveclassroom.php 2007-01-04 16:32:37 UTC (rev 166) +++ trunk/moodle/lang/en/liveclassroom.php 2007-01-04 17:43:55 UTC (rev 167) @@ -116,7 +116,7 @@ $string['Third-party Conference Call'] = "Third-party Conference Call"; $string['Features'] = "Features"; $string['Enable Students to use eBoard'] = "Enable Students to use eBoard"; -$string['Enable Students to use AppShare'] = "Enable Students to use AppShare"; +$string['enableScreenGrab'] = "Enable Students to use the Screen Grab tool."; $string['Enable Archiving'] = "Enable Archiving"; $string['Enable Appshare'] = "Enable Appshare"; $string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import"; Modified: trunk/moodle/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 16:32:37 UTC (rev 166) +++ trunk/moodle/lang/en_utf8/liveclassroom.php 2007-01-04 17:43:55 UTC (rev 167) @@ -116,7 +116,7 @@ $string['Third-party Conference Call'] = "Third-party Conference Call"; $string['Features'] = "Features"; $string['Enable Students to use eBoard'] = "Enable Students to use eBoard"; -$string['Enable Students to use AppShare'] = "Enable Students to use AppShare"; +$string['enableScreenGrab'] = "Enable Students to use the Screen Grab tool."; $string['Enable Archiving'] = "Enable Archiving"; $string['Enable Appshare'] = "Enable Appshare"; $string['Enable On-The-Fly PPT Import'] = "Enable On-The-Fly PPT Import"; Modified: trunk/moodle/lang/fr/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 16:32:37 UTC (rev 166) +++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-04 17:43:55 UTC (rev 167) @@ -118,7 +118,7 @@ $string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif"; $string['Features'] = "Fonctions"; $string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>"; -$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de partage d'écran."; +$string['enableScreenGrab'] = "Permettre aux étudiants d'utiliser l'outil de capture d'écran."; $string['Enable Archiving'] = "Autoriser l'Archivage"; $string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>"; $string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée"; Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 16:32:37 UTC (rev 166) +++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-04 17:43:55 UTC (rev 167) @@ -118,7 +118,7 @@ $string['Third-party Conference Call'] = "Système de Conférence Téléphonique Alternatif"; $string['Features'] = "Fonctions"; $string['Enable Students to use eBoard'] = "Permettre aux étudiants d'utiliser le tableau blanc <i>eBoard</i>"; -$string['Enable Students to use AppShare'] = "Permettre aux étudiants d'utiliser l'outil de partage d'écran."; +$string['enableScreenGrab'] = "Permettre aux étudiants d'utiliser l'outil de capture d'écran."; $string['Enable Archiving'] = "Autoriser l'Archivage"; $string['Enable Appshare'] = "Autoriser le partage d'application <i>AppShare</i>"; $string['Enable On-The-Fly PPT Import'] = "Autoriser l'import de fichier PPT à-la-volée"; Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 16:32:37 UTC (rev 166) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2007-01-04 17:43:55 UTC (rev 167) @@ -666,15 +666,19 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_eboard", "name" => "student_wb_enabled") ; + $parameters=array("type" => "checkbox", "value" => "1", + "id" => "enabled_eboard", "name" => "student_wb_enabled", + "onclick" => "hideDiv(\"screenGrab\")") ; if($action=='update'){ - if($room_info['student_wb_enabled']==1) $parameters['checked']=true; + if($room_info['student_wb_enabled']==1) { + $parameters['checked']=true; + } } - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay, "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use eBoard")) )); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,$contextDisplay,"label", + $parameters=array("value" => liveclassroom_get_message("Enable Students to use eBoard")) )); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); @@ -682,10 +686,10 @@ // SECOND LINE $panelLine = $xmldoc->create_element('panelLine'); $plid = $xmldoc->create_element('id'); - $plid->append_child($xmldoc->create_text_node("")); + $plid->append_child($xmldoc->create_text_node("screenGrab")); $panelLine->append_child($plid); $panelLineStyle = $xmldoc->create_element('style'); - $panelLineStyle->append_child($xmldoc->create_text_node(" ")); + $panelLineStyle->append_child($xmldoc->create_text_node(($room_info['student_wb_enabled']==1)?"visible":"hide")); $panelLine->append_child($panelLineStyle); $linepart = $xmldoc->create_element('panelLinePart'); $style = $xmldoc->create_element('style'); @@ -698,7 +702,8 @@ $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); - $parameters=array("type" => "checkbox", "value" => "1", "id" => "enabled_liveapp", "name" => "student_wb_liveapp") ; + $parameters=array("type" => "checkbox", "value" => "1", + "id" => "enabled_liveapp", "name" => "student_wb_liveapp") ; if($action=='update'){ if($room_info['student_wb_liveapp']==1) $parameters['checked']=true; } @@ -706,7 +711,8 @@ $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE", "input", $parameters) ); $panelLine->append_child($linepart); - $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", $parameters=array("value" => liveclassroom_get_message("Enable Students to use AppShare")))); + $linepart->append_child(liveclassroom_create_linepart_element($xmldoc,"$MAINLECTURE","label", + $parameters=array("value" => liveclassroom_get_message("enableScreenGrab")))); $panelLine->append_child($linepart); $panelContent->append_child($panelLine); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-01-10 07:59:38
|
Revision: 173 http://svn.sourceforge.net/hw4mdl/?rev=173&view=rev Author: hugues Date: 2007-01-09 23:59:32 -0800 (Tue, 09 Jan 2007) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10077 - Added help files (as oposed to documentation on docs.moodle.org) to the lang folder Modified Paths: -------------- trunk/moodle/lang/fr/liveclassroom.php trunk/moodle/lang/fr_utf8/liveclassroom.php trunk/moodle/mod/voicetool/mod.html Added Paths: ----------- trunk/moodle/lang/en/help/ trunk/moodle/lang/en/help/liveclassroom/ trunk/moodle/lang/en/help/liveclassroom/mods.html trunk/moodle/lang/en_utf8/help/ trunk/moodle/lang/en_utf8/help/liveclassroom/ trunk/moodle/lang/en_utf8/help/liveclassroom/mods.html trunk/moodle/lang/fr/help/ trunk/moodle/lang/fr/help/liveclassroom/ trunk/moodle/lang/fr/help/liveclassroom/mods.html trunk/moodle/lang/fr_utf8/help/ trunk/moodle/lang/fr_utf8/help/liveclassroom/ trunk/moodle/lang/fr_utf8/help/liveclassroom/mods.html Added: trunk/moodle/lang/en/help/liveclassroom/mods.html =================================================================== --- trunk/moodle/lang/en/help/liveclassroom/mods.html (rev 0) +++ trunk/moodle/lang/en/help/liveclassroom/mods.html 2007-01-10 07:59:32 UTC (rev 173) @@ -0,0 +1,14 @@ +<p><img alt="" src="<?php echo $CFG->wwwroot?>/mod/liveclassroom/icon.gif" /> <b>Live Classroom</b></p> +<div class="indent"> +<p> + Live Classroom allows students and instructors to meet synchronously online, + using multi-way Voice over IP audio, application sharing, and content display, + enabling instructors to add vitally important elements of interaction that + simply cannot be provided in a text-based course. Sessions within Live + Classroom may be recorded for future review. +</p> +<p> + Two types of Live Classrooms are available: Lecture rooms are instructor-led, + while Discussion rooms provide shared presentation rights to both students and + instructors, designed for student collaboration in the absence of an instructor. +</div> Property changes on: trunk/moodle/lang/en/help/liveclassroom/mods.html ___________________________________________________________________ Name: svn:mime-type + text/html Name: svn:keywords + Date Revision Author Id Name: svn:eol-style + native Added: trunk/moodle/lang/en_utf8/help/liveclassroom/mods.html =================================================================== --- trunk/moodle/lang/en_utf8/help/liveclassroom/mods.html (rev 0) +++ trunk/moodle/lang/en_utf8/help/liveclassroom/mods.html 2007-01-10 07:59:32 UTC (rev 173) @@ -0,0 +1,14 @@ +<p><img alt="" src="<?php echo $CFG->wwwroot?>/mod/liveclassroom/icon.gif" /> <b>Live Classroom</b></p> +<div class="indent"> +<p> + Live Classroom allows students and instructors to meet synchronously online, + using multi-way Voice over IP audio, application sharing, and content display, + enabling instructors to add vitally important elements of interaction that + simply cannot be provided in a text-based course. Sessions within Live + Classroom may be recorded for future review. +</p> +<p> + Two types of Live Classrooms are available: Lecture rooms are instructor-led, + while Discussion rooms provide shared presentation rights to both students and + instructors, designed for student collaboration in the absence of an instructor. +</div> Property changes on: trunk/moodle/lang/en_utf8/help/liveclassroom/mods.html ___________________________________________________________________ Name: svn:mime-type + text/html Name: svn:keywords + Date Revision Author Id Name: svn:eol-style + native Added: trunk/moodle/lang/fr/help/liveclassroom/mods.html =================================================================== --- trunk/moodle/lang/fr/help/liveclassroom/mods.html (rev 0) +++ trunk/moodle/lang/fr/help/liveclassroom/mods.html 2007-01-10 07:59:32 UTC (rev 173) @@ -0,0 +1,15 @@ +<p><img alt="" src="<?php echo $CFG->wwwroot?>/mod/liveclassroom/icon.gif" /> <b>Live Classroom</b></p> +<div class="indent"> +<p> + Live Classroom permet aux \x8Etudiants et aux instructeurs de se rencontrer en + ligne en utilisant la voix sur IP, le partage d'application, et l'afichage de + contenu. Ceci permets aux instructeur d'ajouter d'importants \x8El\x8Ements + d'interaction qui ne peuvent \x90tre apport\x8Es par le contenu textuel. Les sessions + de Live Classroom peuvent \x90tre enregistr\x8Ees pour un visionnage futur. +</p> +<p> + Deux types de Live Classrooms sont disponibles: les Salles de Classe sont + dirig\x8Ees par l'instructeur, tandis que les Salles de Discussion donnent les + m\x90mes droits aux instructeurs et aux \x8Etudiants, permettant la collaboration + entre \x8Etudiants en l'absence d'un instructeur. +</div> Property changes on: trunk/moodle/lang/fr/help/liveclassroom/mods.html ___________________________________________________________________ Name: svn:mime-type + text/html Name: svn:keywords + Date Revision Author Id Name: svn:eol-style + native Modified: trunk/moodle/lang/fr/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr/liveclassroom.php 2007-01-10 00:24:15 UTC (rev 172) +++ trunk/moodle/lang/fr/liveclassroom.php 2007-01-10 07:59:32 UTC (rev 173) @@ -56,7 +56,7 @@ //Add activity form $string['name'] = 'Nom'; $string['liveclassroomtype'] = 'Live Classroom Associée'; -$string['topicformat'] = 'Sujet de l\activité'; +$string['topicformat'] = 'Sujet de l\'activité'; $string['weeksformat'] = 'Semaine de l\'activité'; $string['requiredfields'] = 'Champs nécessaires'; $string['topicdisplay'] = 'Sujet'; Added: trunk/moodle/lang/fr_utf8/help/liveclassroom/mods.html =================================================================== --- trunk/moodle/lang/fr_utf8/help/liveclassroom/mods.html (rev 0) +++ trunk/moodle/lang/fr_utf8/help/liveclassroom/mods.html 2007-01-10 07:59:32 UTC (rev 173) @@ -0,0 +1,15 @@ +<p><img alt="" src="<?php echo $CFG->wwwroot?>/mod/liveclassroom/icon.gif" /> <b>Live Classroom</b></p> +<div class="indent"> +<p> + Live Classroom permet aux \x8Etudiants et aux instructeurs de se rencontrer en + ligne en utilisant la voix sur IP, le partage d'application, et l'afichage de + contenu. Ceci permets aux instructeur d'ajouter d'importants \x8El\x8Ements + d'interaction qui ne peuvent \x90tre apport\x8Es par le contenu textuel. Les sessions + de Live Classroom peuvent \x90tre enregistr\x8Ees pour un visionnage futur. +</p> +<p> + Deux types de Live Classrooms sont disponibles: les Salles de Classe sont + dirig\x8Ees par l'instructeur, tandis que les Salles de Discussion donnent les + m\x90mes droits aux instructeurs et aux \x8Etudiants, permettant la collaboration + entre \x8Etudiants en l'absence d'un instructeur. +</div> Property changes on: trunk/moodle/lang/fr_utf8/help/liveclassroom/mods.html ___________________________________________________________________ Name: svn:mime-type + text/html Name: svn:keywords + Date Revision Author Id Name: svn:eol-style + native Modified: trunk/moodle/lang/fr_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-10 00:24:15 UTC (rev 172) +++ trunk/moodle/lang/fr_utf8/liveclassroom.php 2007-01-10 07:59:32 UTC (rev 173) @@ -56,7 +56,7 @@ //Add activity form $string['name'] = 'Nom'; $string['liveclassroomtype'] = 'Live Classroom Associée'; -$string['topicformat'] = 'Sujet de l\activité'; +$string['topicformat'] = 'Sujet de l\'activité'; $string['weeksformat'] = 'Semaine de l\'activité'; $string['requiredfields'] = 'Champs nécessaires'; $string['topicdisplay'] = 'Sujet'; Modified: trunk/moodle/mod/voicetool/mod.html =================================================================== --- trunk/moodle/mod/voicetool/mod.html 2007-01-10 00:24:15 UTC (rev 172) +++ trunk/moodle/mod/voicetool/mod.html 2007-01-10 07:59:32 UTC (rev 173) @@ -7,7 +7,7 @@ require_once('api.php'); require_once($CFG->dirroot.'/calendar/lib.php'); - require_once($CFG->dirroot.'/mod/voicetools/lib.php'); + require_once($CFG->dirroot.'/mod/voicetool/lib.php'); $id = optional_param('id', 0, PARAM_INT); require_once("../config.php"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2007-04-19 11:48:01
|
Revision: 190 http://svn.sourceforge.net/hw4mdl/?rev=190&view=rev Author: hugues Date: 2007-04-19 04:47:58 -0700 (Thu, 19 Apr 2007) Log Message: ----------- Updating README's and INSTALL's Modified Paths: -------------- trunk/moodle/INSTALL.txt trunk/moodle/README.txt Removed Paths: ------------- trunk/moodle/mod/liveclassroom/README.txt trunk/moodle/mod/voicetools/README.txt Modified: trunk/moodle/INSTALL.txt =================================================================== --- trunk/moodle/INSTALL.txt 2007-04-13 13:26:54 UTC (rev 189) +++ trunk/moodle/INSTALL.txt 2007-04-19 11:47:58 UTC (rev 190) @@ -1,32 +1,5 @@ -This is the Installation file for the Horizon Wimba 4 Moodle Modules and blocks. +The Wimba Modules Installation and Configuration Guide is available within a bundled, downloadable package from Wimba. -Activity Modules: ------------------ +These Modules require that a Wimba Live Classroom and/or Voice Tools server is in place to integrate with Moodle. -Installation of the Moodle Activity Module can be performed in two steps: - 1) Installing the Module files - 2) Configuring the Module - - -To Install the files, pick up the folder named after the module you want to -install (e.g. one of liveclassroom, voicetools or pronto), and copy this folder -over to the directory <MOODLE>/mod of you Moodle installation. - -Then, for each language you have available in you Moodle installation, pick -the appropriate lang file in the lang folder of this package. The default lang -file that should be installed is located in lang/en_utf8. - -Et Voila! You're done with files. - - -To configure the Module, login to Moodle as an administratior and navigate -to the "Configuration" section. Moodle will discover automatically that you -installed a new Activity Module and will initialize the Database accordingly. -At the time of this writting, the HW4Mdl modules only support MySQL and -PostgreSQL. - -Once the tables are created succefully, navogate to the settings page of the -Appropriate activity module and fill the form according to the information -provided by your PSM. - - +For more information, please visit http://www.wimba.com or contact sa...@wi... \ No newline at end of file Modified: trunk/moodle/README.txt =================================================================== --- trunk/moodle/README.txt 2007-04-13 13:26:54 UTC (rev 189) +++ trunk/moodle/README.txt 2007-04-19 11:47:58 UTC (rev 190) @@ -1 +1,18 @@ -Horizon Wimba Moodle Integration aims at providing to the Moodle community integrations of the products developed by Horizon Wimba into Moodle. At this time, we plan to have quickly support for Live Classroom and Voice Tools Activity Modules. \ No newline at end of file +Wimba Modules enable institutions to easily enhance their Moodle courses by allowing seamless access to complementary applications. Wimba Modules allow instructors and students to access up to five tools from within the Moodle environment: + + * Live Classroom: a live virtual classroom supporting multi-way audio, video, application sharing, polling and content display + * Voice Board: a threaded, voice-based discussion board that can also be used for one to one vocal exercises + * Voice Presentation: a presentation consisting of web content alongside voice messages + * Voice Recorder: a recorded message that a user can play back anytime, usually accompanying content within a web page (available only via the Wimba Voice Recorder Block) + * Wimba Podcaster: a tool that allows for the creation and subscription of podcasts + +Wimba Modules include the following features: + + * Single Sign On: students and instructors seamlessly access Wimba Live Classroom and Voice Tools within Moodle. They do not need to log in again or type a URL. + * Integrated creation and management of Wimba tools: Instructors can easily create and manage Wimba tools using the Moodle interface. There is no need to access and learn a new administration interface. + * Consistent look and feel and navigation: Wimba tools look like, and can be used as, any other Moodle tool. Consequently, there is almost no learning curve to use it. + + +These Modules require that a Wimba Live Classroom and/or Voice Tools server is in place to integrate with Moodle. + +For more information, please visit http://www.wimba.com or contact sa...@wi... Deleted: trunk/moodle/mod/liveclassroom/README.txt =================================================================== --- trunk/moodle/mod/liveclassroom/README.txt 2007-04-13 13:26:54 UTC (rev 189) +++ trunk/moodle/mod/liveclassroom/README.txt 2007-04-19 11:47:58 UTC (rev 190) @@ -1,59 +0,0 @@ -TODO: updqte this README file to make it hw4mdl specific. - -USING THE NEW MODULE TEMPLATE ------------------------------ - -1. Unzip the archive and read this file ;-) - -2. Change the name of the directory to your new module name. - This name should be a single english word, if possible, - all lowercase and with only a-z characters. eg widget - -3. Edit all the files in this directory and change all the - instances of NEWMODULE to your new module name (eg widget). - -4. Edit db/mysql.sql and put in the SQL database definitions - for your module. The names of any table definitions you create - there should use the prefix 'prefix_' instead of 'mdl_' - (or whatever you've configured your moodle installation to use - as a table prefix) (optional) - -5. Edit db/mysql.php and change all the instances of NEWMODULE - to your new module name. (optional) - -6. Do the same for db/postgres7.sql and db/postgres7.php as you - did for db/mysql.sql and db/mysql.php (optional) - -7. Create one or more language files for your module in - lang/LANG/NEWMODULE.php where LANG is the language or - languages you are creating the module for use with. (usually - this will be 'en') Use one of the language files for another - module as a template for the file. - -8. Visit the admin page and your module should be noticed and - registered as a new entry in the table "modules". - -Now you can start adding code to the .php and .html files in -this directory to make it do what you want! - -Note about database changes: - - Every time you update the database schema in the db directory, - remember to - - - edit version.php with a higher version number - - edit db/mysql.php with an execute_sql() call that - upgrades the databases to the new format (see core - modules for examples) - - and then visit the admin page to actually upgrade your databases. - - -If you have problems, questions, suggestions etc then visit -the "Activity modules" developers forum in the online -course called "Using Moodle" at http:/* moodle.org */ - -Or email me: ma...@mo... - -Cheers! -Martin Dougiamas Deleted: trunk/moodle/mod/voicetools/README.txt =================================================================== --- trunk/moodle/mod/voicetools/README.txt 2007-04-13 13:26:54 UTC (rev 189) +++ trunk/moodle/mod/voicetools/README.txt 2007-04-19 11:47:58 UTC (rev 190) @@ -1,57 +0,0 @@ -USING THE NEW MODULE TEMPLATE ------------------------------ - -1. Unzip the archive and read this file ;-) - -2. Change the name of the directory to your new module name. - This name should be a single english word, if possible, - all lowercase and with only a-z characters. eg widget - -3. Edit all the files in this directory and change all the - instances of NEWMODULE to your new module name (eg widget). - -4. Edit db/mysql.sql and put in the SQL database definitions - for your module. The names of any table definitions you create - there should use the prefix 'prefix_' instead of 'mdl_' - (or whatever you've configured your moodle installation to use - as a table prefix) (optional) - -5. Edit db/mysql.php and change all the instances of NEWMODULE - to your new module name. (optional) - -6. Do the same for db/postgres7.sql and db/postgres7.php as you - did for db/mysql.sql and db/mysql.php (optional) - -7. Create one or more language files for your module in - lang/LANG/NEWMODULE.php where LANG is the language or - languages you are creating the module for use with. (usually - this will be 'en') Use one of the language files for another - module as a template for the file. - -8. Visit the admin page and your module should be noticed and - registered as a new entry in the table "modules". - -Now you can start adding code to the .php and .html files in -this directory to make it do what you want! - -Note about database changes: - - Every time you update the database schema in the db directory, - remember to - - - edit version.php with a higher version number - - edit db/mysql.php with an execute_sql() call that - upgrades the databases to the new format (see core - modules for examples) - - and then visit the admin page to actually upgrade your databases. - - -If you have problems, questions, suggestions etc then visit -the "Activity modules" developers forum in the online -course called "Using Moodle" at http:/* moodle.org */ - -Or email me: ma...@mo... - -Cheers! -Martin Dougiamas This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2006-12-28 14:45:09
|
Revision: 141 http://svn.sourceforge.net/hw4mdl/?rev=141&view=rev Author: hugues Date: 2006-12-28 06:45:06 -0800 (Thu, 28 Dec 2006) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10528 - The intermediate page monitors the presence of the LC window and display a message when it is not displayed Modified Paths: -------------- trunk/moodle/lang/en_utf8/liveclassroom.php trunk/moodle/mod/liveclassroom/view.php Modified: trunk/moodle/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-28 13:47:21 UTC (rev 140) +++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-28 14:45:06 UTC (rev 141) @@ -41,9 +41,7 @@ $string['settinguniqueid'] = 'Unique Prefix ID'; $string['configsettinguniqueid'] = 'A unique prefix id so that multiple moodle instances can share one Live Classroom Server without collision.'; $string['lcversion'] = 'Live Classroom Version'; -$string['lcversionnumber'] = '4.3.1'; $string['integrationversion'] = 'Integration Version'; -$string['integrationversionnumber'] = '1.0'; $string['emptyAdminUsername'] = 'Admin user name is empty'; $string['emptyAdminPassword'] = 'Admin user password is empty'; @@ -82,9 +80,9 @@ $string['wizard.text2.3'] = 'to make sure that your computer is ready to use the Live Classroom'; +$string['lcpopupshouldappear'] = 'The Live Classroom should now appear.<br/> if it does not, please click <a href=\"javascript:startActivity ();\">this link</a> to open it. '; - //First Time Use - not use yet $string['firstRoom'] = 'Main classroom'; $string['secondRoom'] = 'Group 1'; Modified: trunk/moodle/mod/liveclassroom/view.php =================================================================== --- trunk/moodle/mod/liveclassroom/view.php 2006-12-28 13:47:21 UTC (rev 140) +++ trunk/moodle/mod/liveclassroom/view.php 2006-12-28 14:45:06 UTC (rev 141) @@ -30,67 +30,83 @@ /// This page prints a particular instance of the live classroom links - require_once("../../config.php"); - require_once("lib.php"); +require_once("../../config.php"); +require_once("lib.php"); - $id = optional_param('id', 0, PARAM_INT); - $a = optional_param('a', 0, PARAM_INT);// liveclassroom ID +$id = optional_param('id', 0, PARAM_INT); +$a = optional_param('a', 0, PARAM_INT);// liveclassroom ID - if ($id) { - if (! $cm = get_record("course_modules", "id", $id)) { - error("Course Module ID was incorrect 1 "); - } - - if (! $course = get_record("course", "id", $cm->course)) { - error("Course is misconfigured"); - } - - if (! $liveclassroom = get_record("liveclassroom", "id", $cm->instance)) { - error("Course module is incorrect1"); - } +if ($id) { + if (! $cm = get_record("course_modules", "id", $id)) { + error("Course Module ID was incorrect 1 "); + } + if (! $course = get_record("course", "id", $cm->course)) { + error("Course is misconfigured"); + } + if (! $liveclassroom = get_record("liveclassroom", "id", $cm->instance)) { + error("Course module is incorrect1"); + } +} else { + if (! $liveclassroom = get_record("liveclassroom", "id", $a)) { + error("Course module is incorrect2"); + } + if (! $course = get_record("course", "id", $liveclassroom->course)) { + error("Course is misconfigured"); + } + if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $course->id)) { + error("Course Module ID was incorrect"); + } +} - } else { - if (! $liveclassroom = get_record("liveclassroom", "id", $a)) { - - error("Course module is incorrect2"); - } - if (! $course = get_record("course", "id", $liveclassroom->course)) { - error("Course is misconfigured"); - } - if (! $cm = get_coursemodule_from_instance("liveclassroom", $liveclassroom->id, $course->id)) { - error("Course Module ID was incorrect"); - } - } +require_login($course->id); - require_login($course->id); - // Create the session for this user - if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) { - error ("Cannot create session"); - } +if (!$usersession = liveclassroom_create_session ($course, isteacher($course->id, $USER->id))) { + error ("Cannot create session"); +} - $classid = $liveclassroom->type; +$classid = $liveclassroom->type; +/// Print the main part of the page +if ($course->category) { + $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->"; +} -/// Print the main part of the page +$strlcs = get_string("modulenameplural", "liveclassroom"); +$strlc = get_string("modulename", "liveclassroom"); + +print_header("$course->shortname: $liveclassroom->name", "$course->fullname", + "$navigation <A HREF=index.php?id=$course->id>$strlcs</A> -> $liveclassroom->name", + "", "", true, "", + navmenu($course, $cm)); + ?> -<!--script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch-7892.js'></script--> + <script type="text/javascript" src='<?PHP p($CFG->liveclassroom_servername)?>/js/launch.js'></script> - +<script type="text/javascript"> - <script type="text/javascript"> - - function startActivity(){ +function monitor (name, destination) { + if (win[name] == null) { + setTimeout(monitor(name, destination), 1000); + } + else { // window exists + location.href= destination; + } +} - startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>'); - location.href = "<?php echo $CFG->wwwroot;?>/course/view.php?id=<?php echo $course->id; ?>"; - } - - </script> - - - <script> startActivity(); </script> - - \ No newline at end of file +function startActivity(){ + startHorizon('<?php p($classid) ?>',null,null,null,null,'hzA=<?php p($usersession)?>'); + setTimeout (monitor('horizonWin', "<?php echo "$CFG->wwwroot/course/view.php?id=$course->id" ?>"), 1000); +} + +startActivity(); +</script> + +<?php echo get_string ('lcpopupshouldappear', 'liveclassroom');?> + +<?php +/// Finish the page +print_footer($course); +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@us...> - 2006-12-29 10:25:44
|
Revision: 147 http://svn.sourceforge.net/hw4mdl/?rev=147&view=rev Author: hugues Date: 2006-12-29 02:25:41 -0800 (Fri, 29 Dec 2006) Log Message: ----------- http://u.horizonwimba.com/bugzilla/show_bug.cgi?id=10561 - Fixing some issues with define() - started to display i18n'd mesages in xml (does not work yet) Modified Paths: -------------- trunk/moodle/lang/en_utf8/liveclassroom.php trunk/moodle/lang/en_utf8/voicetool.php trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/lib.php Modified: trunk/moodle/lang/en_utf8/liveclassroom.php =================================================================== --- trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 09:49:02 UTC (rev 146) +++ trunk/moodle/lang/en_utf8/liveclassroom.php 2006-12-29 10:25:41 UTC (rev 147) @@ -83,6 +83,17 @@ $string['lcpopupshouldappear'] = 'The Live Classroom should now appear.<br/> if it does not, please click <a href=\"javascript:startActivity ();\">this link</a> to open it. '; +$string['roomCreated'] = "Your room has been successfully created."; +$string['roomUpdated'] = "Your room has been successfully updated."; +$string['roomDeleted'] = "Your room has been successfully deleted."; +$string['notfind'] = "Invalid Live Classroom parameters. Please contact your administrator for more information."; +$string['room'] = "Invalid Live Classroom parameters. Please contact your administrator for more information. "; +$string['connection'] = "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. "; +$string['bd'] = "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. "; +$string['signature'] = "Invalid connection to Live Classroom. Please contact your administrator for more information. "; +$string['board'] = "Invalid Voice Board parameters. Please contact your administrator for more information. "; + + //First Time Use - not use yet $string['firstRoom'] = 'Main classroom'; $string['secondRoom'] = 'Group 1'; Modified: trunk/moodle/lang/en_utf8/voicetool.php =================================================================== --- trunk/moodle/lang/en_utf8/voicetool.php 2006-12-29 09:49:02 UTC (rev 146) +++ trunk/moodle/lang/en_utf8/voicetool.php 2006-12-29 10:25:41 UTC (rev 147) @@ -52,6 +52,11 @@ $string['goodquality'] = 'Good Quality (FM Radio quality) - 20.8 kbit/s - Broadband usage'; $string['audioquality'] = 'Audio Quality'; +$string['connection_vt'] = "Moodle cannot connect to the Voice Board server. Please reload the page or contact your administrator for more information. "; +$string['bdvt'] = "Moodle cannot connect to the Voice Board database. Please reload the page or contact your administrator for more information. "; +$string['sessionvt'] = "The Voice Board session has timed out due to inactivity. Please reload the page to reconnect. "; +$string['signaturevt'] = "Invalid connection to Voice Board. Please contact your administrator for more information. "; + // Voice Direct tags $string['voicedirect'] = 'Voice Direct'; $string['voicedirects'] = 'Voice Directs'; Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-12-29 09:49:02 UTC (rev 146) +++ trunk/moodle/mod/liveclassroom/api.php 2006-12-29 10:25:41 UTC (rev 147) @@ -43,7 +43,7 @@ require_once('lib.php'); -$LIVECLASSROOM_MOODLE_PREFIX = liveclassroom_api_get_prefix(); +define("LIVECLASSROOM_MOODLE_PREFIX", liveclassroom_api_get_prefix()); define("LIVECLASSROOM_API_ADMIN","/admin/api/api.pl?"); define("LIVECLASSROOM_API_FUNCTION_NOOP","function=NOOP"); @@ -129,7 +129,6 @@ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 4); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); - // curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $data = curl_exec($ch); @@ -231,7 +230,6 @@ */ function liveclassroom_api_create_user ($userid, $coursename, $rolename) { global $CFG; - global $LIVECLASSROOM_MOODLE_PREFIX; global $COURSE; $final_list = "&target=$userid&first_name=$rolename&last_name=$coursename"; Modified: trunk/moodle/mod/liveclassroom/lib.php =================================================================== --- trunk/moodle/mod/liveclassroom/lib.php 2006-12-29 09:49:02 UTC (rev 146) +++ trunk/moodle/mod/liveclassroom/lib.php 2006-12-29 10:25:41 UTC (rev 147) @@ -38,12 +38,12 @@ define (LIVECLASSROOM_MODULE_VERSION, "0.9"); //Suffixes used when creting the profiles account on the LC server -define (LIVECLASSROOM_TEACHER_SUFFIX, "_T"); //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_TEACHER_SUFFIX -define (LIVECLASSROOM_STUDENT_SUFFIX, "_S"); //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + $LIVECLASSROOM_STUDENT_SUFFIX +define (LIVECLASSROOM_TEACHER_SUFFIX, "_T"); //Teachers will use the user $CFG->liveclassroom_settinguniqueid + $course->id + LIVECLASSROOM_TEACHER_SUFFIX +define (LIVECLASSROOM_STUDENT_SUFFIX, "_S"); //Students will use the user $CFG->liveclassroom_settinguniqueid + $course->id + LIVECLASSROOM_STUDENT_SUFFIX - $LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs + /** * Validate the data in passed in the configuration page * @param $config - the information from the form mod.html @@ -61,13 +61,11 @@ } else if(empty($config->adminpassword)){ error(get_string('emptyAdminPassword', 'liveclassroom')); - } + } + liveclassroom_api_authenticate($config->servername,$config->adminusername,$config->adminpassword); -// error(get_string('wrongconfigurationURLincorrect', 'liveclassroom')); - //TODO: check the user is really an admin - return; } @@ -253,13 +251,10 @@ function liveclassroom_create_profiles ($course) { global $CFG; - global $LIVECLASSROOM_TEACHER_SUFFIX; - global $LIVECLASSROOM_STUDENT_SUFFIX; - global $LIVECLASSROOM_MOODLE_PREFIX; $enc_coursename = str_replace(" ", "_", $course->shortname); - $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_TEACHER_SUFFIX; + $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX; if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Teacher')) { @@ -267,7 +262,7 @@ return false; } - $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_STUDENT_SUFFIX; + $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX; if (! liveclassroom_api_create_user ($userid, $enc_coursename, 'Student')) { //error("Cannot Create Student profile"); @@ -301,14 +296,11 @@ function liveclassroom_create_session ($course, $isteacher) { global $CFG, $USER; - global $LIVECLASSROOM_TEACHER_SUFFIX; - global $LIVECLASSROOM_STUDENT_SUFFIX; - global $LIVECLASSROOM_MOODLE_PREFIX; - $enc_coursename = str_replace(" ", "_", $course->shortname); + $enc_coursename = str_replace(" ", "_", $course->shortname); - $userid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename. - ($isteacher?$LIVECLASSROOM_TEACHER_SUFFIX:$LIVECLASSROOM_STUDENT_SUFFIX); + $userid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename. + ($isteacher?LIVECLASSROOM_TEACHER_SUFFIX:LIVECLASSROOM_STUDENT_SUFFIX); $nickname = fullname($USER); @@ -325,18 +317,14 @@ */ function liveclassroom_create_room ($courseid, $roomname, $bool, $attributes) { global $CFG; - global $LIVECLASSROOM_TEACHER_SUFFIX, - $LIVECLASSROOM_STUDENT_SUFFIX; - - global $LIVECLASSROOM_MOODLE_PREFIX; - + $course_name = liveclassroom_get_course_shortname($courseid); $enc_coursename = str_replace(" ", "_", $course_name); - $roomid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.'_'.rand(); + $roomid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.'_'.rand(); - $teacherid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_TEACHER_SUFFIX; - $studentid = $LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.$LIVECLASSROOM_STUDENT_SUFFIX; + $teacherid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_TEACHER_SUFFIX; + $studentid = LIVECLASSROOM_MOODLE_PREFIX.$enc_coursename.LIVECLASSROOM_STUDENT_SUFFIX; if($bool==true) { // main lecture hall @@ -553,8 +541,6 @@ $element = $xmldoc->create_element('lineElement'); - - $displayContext = $xmldoc->create_element('displayContext'); $displayContext->append_child($xmldoc->create_text_node($p_displayContext)); $element->append_child($displayContext); @@ -1042,52 +1028,14 @@ * return a string with the message to display */ function liveclassroom_get_message($type) { - - switch ($type) { - case "roomCreated": - return "Your room has been successfully created."; - case "roomUpdated": - return "Your room has been successfully updated."; - - case "roomDeleted": - return "Your room has been successfully deleted."; - - case "notfind": - return "Invalid Live Classroom parameters. Please contact your administrator for more information."; - - case "room": - return "Invalid Live Classroom parameters. Please contact your administrator for more information. "; - - case "connection": - return "Moodle cannot connect to the Live Classroom server. Please reload the page or contact your administrator for more information. "; - - case "bd": - return "Moodle cannot connect to the Live Classroom database. Please reload the page or contact your administrator for more information. "; - + switch ($type) { case "session": //createMessage("exception","the session has timed out due to inactivity. Please reload the page to reconnect. "); - case "signature": - return "Invalid connection to Live Classroom. Please contact your administrator for more information. "; - - case "board": - return "Invalid Voice Board parameters. Please contact your administrator for more information. "; - - case "connection_vt": - return "Moodle cannot connect to the Voice Board server. Please reload the page or contact your administrator for more information. "; - - case "bdvt": - return "Moodle cannot connect to the Voice Board database. Please reload the page or contact your administrator for more information. "; - - case "sessionvt": - return "The Voice Board session has timed out due to inactivity. Please reload the page to reconnect. "; - - case "signaturevt": - return "Invalid connection to Voice Board. Please contact your administrator for more information. "; - } - return "Default Message"; + + return get_string ($type, 'liveclassrom'); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tro...@us...> - 2007-08-01 14:11:56
|
Revision: 195 http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=195&view=rev Author: trollinger Date: 2007-08-01 07:11:55 -0700 (Wed, 01 Aug 2007) Log Message: ----------- update vocie recorder block after release 3.1 remove not useful directory Modified Paths: -------------- trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php Removed Paths: ------------- trunk/moodle/bin/ trunk/moodle/lang/ Modified: trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php =================================================================== --- trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php 2007-08-01 14:10:39 UTC (rev 194) +++ trunk/moodle/blocks/bvoicerecorder/block_bvoicerecorder.php 2007-08-01 14:11:55 UTC (rev 195) @@ -51,7 +51,7 @@ } function preferred_width() { - return 210; + return 220; } function applicable_formats() { @@ -82,7 +82,7 @@ $this->content->text .= '<tr><td align="center">'; - $this->content->text .= '<iframe src='.$CFG->wwwroot.'/mod/voicetools/voicerecorder.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="210px" height="185px"></iframe>'; + $this->content->text .= '<iframe src='.$CFG->wwwroot.'/mod/voicetools/voicerecorder.php?course_id='. $COURSE->id.'&block_id='.$this->instance->id.' name="frameWidget" style="overflow:hidden" FRAMEBORDER=0 width="220px" height="220px"></iframe>'; $this->content->text .= '</td></tr>'; $this->content->text .= '</table>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |