You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by dr...@codespot.com on 2012/10/11 11:29:06 UTC
[drupal-plugin-openmeetings] r2 committed - move drupal plugin
project to apache-extras.org
Revision: 2
Author: seba.wagner
Date: Thu Oct 11 02:28:28 2012
Log: move drupal plugin project to apache-extras.org
http://code.google.com/a/apache-extras.org/p/drupal-plugin-openmeetings/source/detail?r=2
Added:
/trunk/.project
/trunk/CHANGELOG
/trunk/DISCLAIMER
/trunk/LICENSE
/trunk/NOTICE
/trunk/README.txt
/trunk/build.xml
/trunk/dist
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.tar.gz
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.tar.gz.md5
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.tar.gz.sig
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.zip
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.zip.md5
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.zip.sig
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.tar.gz
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.tar.gz.md5
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.tar.gz.sig
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.zip
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.zip.md5
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.zip.sig
/trunk/dist/sites
/trunk/dist/sites/all
/trunk/dist/sites/all/modules
/trunk/dist/sites/all/modules/openmeetings
/trunk/dist/sites/all/modules/openmeetings/lib
/trunk/dist/sites/all/modules/openmeetings/lib/openmeetings_rest_service.php
/trunk/dist/sites/all/modules/openmeetings/openmeetings.info
/trunk/dist/sites/all/modules/openmeetings/openmeetings.install
/trunk/dist/sites/all/modules/openmeetings/openmeetings.module
/trunk/dist/sites/all/modules/openmeetings/openmeetingsRoomManagament.php
/trunk/dist/sites/all/modules/openmeetings/openmeetings_conference.php
/trunk/dist/sites/all/modules/openmeetings/openmeetings_gateway.php
/trunk/ivy.xml
/trunk/ivysettings.xml
/trunk/ivysettings.xsd
/trunk/sites
/trunk/sites/all
/trunk/sites/all/modules
/trunk/sites/all/modules/openmeetings
/trunk/sites/all/modules/openmeetings/lib
/trunk/sites/all/modules/openmeetings/lib/openmeetings_rest_service.php
/trunk/sites/all/modules/openmeetings/openmeetings.info
/trunk/sites/all/modules/openmeetings/openmeetings.install
/trunk/sites/all/modules/openmeetings/openmeetings.module
/trunk/sites/all/modules/openmeetings/openmeetingsRoomManagament.php
/trunk/sites/all/modules/openmeetings/openmeetings_conference.php
/trunk/sites/all/modules/openmeetings/openmeetings_gateway.php
=======================================
--- /dev/null
+++ /trunk/.project Thu Oct 11 02:28:28 2012
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<projectDescription>
+ <name>drupal_7.x</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>net.sourceforge.phpeclipse.parserbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>net.sourceforge.phpeclipse.phpnature</nature>
+ </natures>
+</projectDescription>
=======================================
--- /dev/null
+++ /trunk/CHANGELOG Thu Oct 11 02:28:28 2012
@@ -0,0 +1,4 @@
+Apache OpenMeetings Drupal Plugin Change Log
+
+ * Refactoring to use REST instead of SOAP/NuSOAP Library
+ * Initial version released
=======================================
--- /dev/null
+++ /trunk/DISCLAIMER Thu Oct 11 02:28:28 2012
@@ -0,0 +1,15 @@
+Apache OpenMeetings Drupal Plugin is an effort undergoing incubation at
the Apache Software
+Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further
review
+indicates that the infrastructure, communications, and decision making
process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
+
+For more information about the incubation status of the OpenMeetings
project you
+can go to the following page:
+
+http://incubator.apache.org/openmeetings/
=======================================
--- /dev/null
+++ /trunk/LICENSE Thu Oct 11 02:28:28 2012
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other
modifications
+ represent, as a whole, an original work of authorship. For the
purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces
of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright
owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control
systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this
License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
=======================================
--- /dev/null
+++ /trunk/NOTICE Thu Oct 11 02:28:28 2012
@@ -0,0 +1,6 @@
+Apache OpenMeetings Drupal Plugin
+Copyright 2011-2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
=======================================
--- /dev/null
+++ /trunk/README.txt Thu Oct 11 02:28:28 2012
@@ -0,0 +1,8 @@
+This Drupal plugin uses Apache OpenMeetings [Incbuating].
+You need your own Apache OpenMeetings instance running.
+
+Check out:
+http://incubator.apache.org/openmeetings/
+
+For installation see:
+http://incubator.apache.org/openmeetings/DrupalPlugin.html
=======================================
--- /dev/null
+++ /trunk/build.xml Thu Oct 11 02:28:28 2012
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<!DOCTYPE project>
+<project name="openmeetings drupal plugin" basedir="./" default="dist-bin"
xmlns="antlib:org.apache.tools.ant"
xmlns:rat="antlib:org.apache.rat.anttasks"
xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <property name="dist.dir" value="dist" />
+ <property name="project.version" value="1.0" />
+ <property name="project.distname" value="openmeetings-drupal-plugin" />
+ <property name="plugin.name" value="openmeetings" />
+
+ <target name="dist-bin" depends="clean">
+ <property name="archive.file.name"
value="${dist.dir}/apache-${project.distname}-incubating-${project.version}"
/>
+
+ <mkdir dir="${dist.dir}" />
+ <copy todir="${dist.dir}">
+ <fileset dir="${basedir}">
+ <exclude name=".*" />
+ <exclude name="dist/**" />
+ <exclude name="build.xml" />
+ <exclude name="ivy.xml" />
+ <exclude name="ivysettings.xml" />
+ <exclude name="ivysettings.xsd" />
+
+ </fileset>
+ </copy>
+ <zip destfile="${archive.file.name}.zip" filesonly="false">
+ <zipfileset dir="${dist.dir}">
+ <include name="sites/**/**" />
+ <include name="CHANGELOG" />
+ <include name="DISCLAIMER" />
+ <include name="LICENSE" />
+ <include name="NOTICE" />
+ <include name="README.txt" />
+ </zipfileset>
+ </zip>
+ <zip destfile="${archive.file.name}-src.zip" filesonly="false">
+ <zipfileset dir="${basedir}">
+ <exclude name="*dist/**" />
+ </zipfileset>
+ </zip>
+ <tar longfile="gnu" compression="gzip"
destfile="${archive.file.name}.tar.gz">
+ <tarfileset dir="${dist.dir}">
+ <include name="sites/**/**" />
+ <include name="CHANGELOG" />
+ <include name="DISCLAIMER" />
+ <include name="LICENSE" />
+ <include name="NOTICE" />
+ <include name="README.txt" />
+ </tarfileset>
+ </tar>
+ <tar longfile="gnu" compression="gzip"
destfile="${archive.file.name}-src.tar.gz">
+ <tarfileset dir="${basedir}">
+ <exclude name="*dist/**" />
+ </tarfileset>
+ </tar>
+ <delete>
+ <fileset dir="${dist.dir}">
+ <include name="CHANGELOG" />
+ <include name="DISCLAIMER" />
+ <include name="LICENSE" />
+ <include name="NOTICE" />
+ <include name="README.txt" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="clean">
+ <delete includeemptydirs="true" dir="${dist.dir}" />
+ </target>
+
+ <!-- RAT -->
+ <property name="ivy.install.version" value="2.3.0-rc1" />
+ <property name="project.lib.dir" value="${dist.dir}" />
+ <property name="ivy.jar.path"
value="${project.lib.dir}/ivy-${ivy.install.version}.jar" />
+
+ <available file="${ivy.jar.path}" type="file" property="ivy.installed" />
+ <target name="-download-ivy" unless="ivy.installed">
+ <mkdir dir="${project.lib.dir}" />
+ <echo message="Downloading ivy..." />
+ <get
src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.path}" usetimestamp="true" />
+ </target>
+
+ <path id="rat.classpath">
+ <fileset dir="${project.lib.dir}" includes="*.jar" />
+ </path>
+ <target name="-availability-check" unless="red5.installed"
description="Check which libraries need to be retrieved">
+ <mkdir dir="${project.lib.dir}" />
+ <available classpathref="rat.classpath"
classname="org.apache.rat.Report" property="rat.installed" />
+ </target>
+ <!-- Check for rat libraries -->
+ <target name="-retrieve-rat" unless="rat.installed"
description="Retrieves the libraries if needed"
depends="-availability-check, -download-ivy">
+ <taskdef uri="antlib:org.apache.ivy.ant"
resource="org/apache/ivy/ant/antlib.xml" classpath="${ivy.jar.path}" />
+
+ <ivy:resolve file="ivy.xml" checkIfChanged="false" transitive="false" />
+ <ivy:retrieve
pattern="${project.lib.dir}/[artifact]-[type]-[revision].[ext]" />
+ </target>
+
+ <target name="report_rat" depends="-retrieve-rat">
+ <taskdef uri="antlib:org.apache.rat.anttasks"
resource="org/apache/rat/anttasks/antlib.xml" classpathref="rat.classpath"
/>
+
+ <rat:report>
+ <fileset dir="${basedir}">
+ <exclude name="*dist/**" />
+ </fileset>
+ </rat:report>
+ </target>
+
+</project>
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.tar.gz
Thu Oct 11 02:28:28 2012
Binary file, no diff available.
=======================================
--- /dev/null
+++
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.tar.gz.md5
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,1 @@
+e55980827d3dd7cd011712e817ae8b14
apache-openmeetings-drupal-plugin-incubating-1.0-src.tar.gz
=======================================
--- /dev/null
+++
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.tar.gz.sig
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,8 @@
+
+ P#ª
+ U¿£º' «G~@û:ÕF¨pçau¸
+À Ê~q5Û6iw×î*ÎzD@ZLF!3?×£ã°U¾ÿ12«ìÒËÀeb
+æB òåáM¼´ÔØÏßyØwïgÚ«S*v\ݼ9PrNTQï?lÈ(@ñ:ªjnÞýȱ
+ó$ñNYí5¹duÕ¿o'lÖ
Û5OOR%Þ]6mÉØ)ÙùKÙ¾±(Lt¹èùSìF¡zîÚG£ÈzÖ ÑþQ%8ãͲ Å#bÞ38J\=9E·çÛh
+
+PxlñÂðR¨S/WÜ
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.zip
Thu Oct 11 02:28:28 2012
Binary file, no diff available.
=======================================
--- /dev/null
+++
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.zip.md5
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,1 @@
+1f1a9845857369675eadcad539f783cb
apache-openmeetings-drupal-plugin-incubating-1.0-src.zip
=======================================
--- /dev/null
+++
/trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0-src.zip.sig
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,5 @@
+
+ P#ª
+
U¿£Ö ¹)B²L(Ex8ødùxCâë±ÁA4oû}Ýc,ì³ÖD;^×snóxk^ÂÆ8ζbá¸Úq¸pöI}॰/t+'ö±ûÖ;Y7¡×褲CÈ0m#)Vð/7ë´å´~ÀÙ8Î;U½èKV¤bĬ%ß{i¸"4zòZвÚ`±~*ûÈë/ach$z²AúéɨV6;yÄj¸U.¦&¯xoÞ´vkÈtNj/xûß?@i5|
çS\øjdq1èÕ°é
+±òp=ªqôô5éZ ËxO&®Ö
+àâ:"Ð$
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.tar.gz Thu
Oct 11 02:28:28 2012
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.tar.gz.md5
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,1 @@
+c81ef154aa180296fe72ae05a7438ea8
apache-openmeetings-drupal-plugin-incubating-1.0.tar.gz
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.tar.gz.sig
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,7 @@
+
+ P#©ì
+ U¿£Ù±ÿQw.¯* s1
+@¿É~õ@n»¦4" y!UgO/Zð·êñVÀ,
+öþmÍah<è^dÚaÍ»}¥¯'w|Jè¿æËj´Qzo*Ú£Ìhÿ·çîÁ_Ëý
+\ò7%³0Òþ'Dìº%Nq&=ê%lBHî"é«ÏÂJ=¤8ïÛ¨(å·hC
f3F*zéªF:¢V*àÂ¥
+ðF×a·¹bÃ*Ъñ÷8ÉîQÙmÚ,5øÉñ?{Ì°V£æ73kµ§Lþ·L¼EƸb/;`Ñ¥Jµé¥,O¯àVúr
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.zip Thu
Oct 11 02:28:28 2012
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.zip.md5
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,1 @@
+d82f748c8a0945c0b521e2b96373c976
apache-openmeetings-drupal-plugin-incubating-1.0.zip
=======================================
--- /dev/null
+++ /trunk/dist/apache-openmeetings-drupal-plugin-incubating-1.0.zip.sig
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,9 @@
+
+ P#©ý
+ U¿£ì Îz9L}ÝûW"íòÔÓs&zÝ=»ÄL
4ûIPô5 AQV116þ?É#æ¹'ä»N/7öÛ\]·ïÙ^êýVh dz%AmSáJþ÷ò
+
+Û¤TÖBîd¶!1füÃyßöOx§¡w6×e!Ùnw9J
+53{A·þ
+¾¸ ø`WßËi²ÁR§V¬Fv/Ȧ® ÅÎË|Îþ
+ûVU%ýX°?å¡ «è¢§Þ´Öúò
+F CÈVìtÀó>Üá*ûâv¦)Uíe)*d`GÃ2øgÚüÆÓ®N¦ #Äf+ôæ
=======================================
--- /dev/null
+++
/trunk/dist/sites/all/modules/openmeetings/lib/openmeetings_rest_service.php
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,127 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+class openmeetings_rest_service {
+
+ var $current_call;
+
+ function call($request,$returnAttribute="return"){
+ // This will allow you to view errors in the browser
+ // Note: set "display_errors" to 0 in production
+ //ini_set('display_errors',1);
+
+ // Report all PHP errors (notices, errors, warnings, etc.)
+ //error_reporting(E_ALL);
+
+ // URI used for making REST call. Each Web Service uses a unique URL.
+ //$request
+
+ // Initialize the session by passing the request as a parameter
+ $session = curl_init($request);
+
+ $this->current_call = $request;
+
+
+ // Set curl options by passing session and flags
+ // CURLOPT_HEADER allows us to receive the HTTP header
+ curl_setopt($session, CURLOPT_HEADER, true);
+
+ // CURLOPT_RETURNTRANSFER will return the response
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ // Make the request
+ $response = curl_exec($session);
+
+ // Close the curl session
+ curl_close($session);
+
+ // Confirm that the request was transmitted to the OpenMeetings! Image
Search Service
+ if(!$response) {
+ die("Request OpenMeetings! OpenMeetings Service failed and no
response was returned.");
+ }
+
+ // Create an array to store the HTTP response codes
+ $status_code = array();
+
+ // Use regular expressions to extract the code from the header
+ preg_match('/\d\d\d/', $response, $status_code);
+
+ // Check the HTTP Response code and display message if status code is
not 200 (OK)
+ switch( $status_code[0] ) {
+ case 200:
+ // Success
+ break;
+ case 503:
+ die('Your call to OpenMeetings Web Services failed and
returned an HTTP status of 503.
+ That means: Service unavailable. An internal
problem prevented us from returning'.
+ ' data to you.');
+ break;
+ case 403:
+ die('Your call to OpenMeetings Web Services failed and
returned an HTTP status of 403.
+ That means: Forbidden. You do not have permission
to access this resource, or are over'.
+ ' your rate limit.');
+ break;
+ case 400:
+ // You may want to fall through here and read the
specific XML error
+ die('Your call to OpenMeetings Web Services failed and
returned an HTTP status of 400.
+ That means: Bad request. The parameters passed to
the service did not match as expected.
+ The exact error is returned in the XML response.');
+ break;
+ default:
+ die('Your call to OpenMeetings Web Services returned an
unexpected HTTP status of: ' . $status_code[0]." Request ".$request);
+ }
+
+ // Get the XML from the response, bypassing the header
+ if (!($xml = strstr($response, '<ns'))) {
+ $xml = null;
+ }
+
+ $dom = new DOMDocument();
+ $dom->loadXML($xml);
+
+ if ($returnAttribute == "") {
+ //echo "XML".$xml."<br/>";
+ return $dom;
+ } else {
+ $returnNodeList = $dom->getElementsByTagName($returnAttribute);
+ foreach ($returnNodeList as $returnNode) {
+ return $returnNode->nodeValue;
+ }
+ }
+
+ }
+
+
+
+ function getError(){
+ return false;
+
+ }
+
+ function getErrorMessage(){
+ return "Error invokeing call ".$this->current_call;
+
+ }
+
+ function fault(){
+ return false;
+ }
+}
+
+?>
=======================================
--- /dev/null
+++ /trunk/dist/sites/all/modules/openmeetings/openmeetings.info Thu Oct 11
02:28:28 2012
@@ -0,0 +1,30 @@
+;
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License") + you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied. See the License for the
+; specific language governing permissions and limitations
+; under the License.
+;
+; $Id$
+name = OpenMeetings
+description = OpenMeetings integration module. OpenMeetings is a video
conference system.<BR>More information on <a
href="http://incubator.apache.org/openmeetings/" target="_blank">Apache
OpenMeetings [Incubating]</a>.
+core = 7.x
+
+configure = admin/config/system/openmeetings
+
+files[] = openmeetings.module
+
+package = "OpenMeetings"
+
+version = "7.x-7.7"
=======================================
--- /dev/null
+++ /trunk/dist/sites/all/modules/openmeetings/openmeetings.install Thu Oct
11 02:28:28 2012
@@ -0,0 +1,264 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+/**
+ * @file
+ * OpenMeetings Integration Module : Installation
+ */
+
+/**
+ * Implementation of hook_install()
+ */
+function openmeetings_install() {
+
+ if (!db_table_exists('openmeetings_rooms')) {
+ drupal_install_schema('openmeetings');
+ }
+
+ node_types_rebuild();
+ $types = node_type_get_types();
+ node_add_body_field($types['openmeetings']);
+
+}
+
+/**
+ * Implementation of hook_uninstall()
+ */
+function openmeetings_uninstall() {
+ //drupal_uninstall_schema('openmeetings');
+ //db_query("DROP TABLE {openmeetings_rooms};");
+
+ if (db_table_exists('openmeetings_rooms')) {
+ db_drop_table('openmeetings_rooms');
+ }
+}
+
+/**
+ * Implementation of hook_schema()
+ *
+ * @return array of Schema API table definitions.
+ */
+function openmeetings_schema() {
+ $schema['openmeetings_rooms'] = array(
+ 'fields' => array(
+ 'rid' => array('type' => 'serial',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'description' => "Room ID",
+ ),
+ 'nid' => array('type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'description' => "Node ID",
+ ),
+ 'room_id' => array('type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'description' => "openmeetings room ID",
+ ),
+ 'roomtype_id' => array('type' => 'int',
+ 'not null' => TRUE,
+ 'description' => "openmeetings room type ID",
+ ),
+ 'room_name' => array('type' => 'text', 'not null' => FALSE,
+ // NOTE: On MySQL, text fields cannot have default values.
+ 'description' => "Room name.",
+ ),
+ 'room_comment' => array('type' => 'text', 'not null' => FALSE,
+ // NOTE: On MySQL, text fields cannot have default values.
+ 'description' => "Room comment.",
+ ),
+ 'owner_id' => array('type' => 'int',
+ 'not null' => TRUE,
+ 'description' => "openmeetings number of partizipants in this
room",
+ ),
+ 'number_of_partizipants' => array('type' => 'int',
+ 'not null' => TRUE,
+ 'description' => "openmeetings number of partizipants in this
room",
+ ),
+ 'timecreated' => array('type' => 'int', 'not null' =>
TRUE, 'default' => 0,
+ 'description' => "Created Timestamp (Unix Timestamp, which is
limited to values above Jan 1, 1970)",
+ ),
+ 'timelastaccess' => array('type' => 'int', 'not null' =>
TRUE, 'default' => 0,
+ 'description' => "Last Access Timestamp (Unix Timestamp, which is
limited to values above Jan 1, 1970)",
+ ),
+ 'timeexpire' => array('type' => 'int', 'not null' => TRUE, 'default'
=> 0,
+ 'description' => "Expiration Timestamp (Unix Timestamp, which is
limited to values above Jan 1, 1970)",
+ ),
+ 'credits' => array('type' => 'int', 'not null' => TRUE, 'default' =>
0,
+ 'description' => "Available time in minutes",
+ ),
+ 'timeused' => array('type' => 'int', 'size' => 'big', 'not null' =>
TRUE, 'default' => 0,
+ 'description' => "How long was this used for",
+ ),
+ 'file_delete' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'is_public' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'appointment' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'is_moderated_room' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'demo' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'allowUserQuestions' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'isAudioOnly' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'allowRecording' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'indexes' => array(
+ 'timelastaccess' => array('timelastaccess'),
+ 'room_id' => array('room_id'),
+ 'rid' => array('rid'),
+ ),
+ 'primary key' => array('rid'),
+ );
+
+ return $schema;
+}
+
+/**
+ * Implementation of hook_requirements().
+ */
+function openmeetings_requirements($phase) {
+ $requirements = array();
+
+
+ return $requirements;
+}
+
+/**
+ * Implementation of hook_enable().
+ */
+function openmeetings_enable() {
+
+ // Set default role_permissions.
+ /*
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', access
openmeetings room') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', access
openmeetings room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', create
openmeetings room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
openmeetings room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', delete
openmeetings room') WHERE rid = '2';");
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
room_comment') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
roomtype_id') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
number_of_partizipants') WHERE rid = '2';");
+
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
is_public') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
appointment') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
is_moderated_room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
room_id') WHERE rid = '2';");
+
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use room')
WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
room_comment') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
roomtype_id') WHERE rid = '2';");
+
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
number_of_partizipants') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
is_public') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
appointment') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
is_moderated_room') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
room_id') WHERE rid = '1';");
+ */
+ /*
+ db_update('role_permission')
+ ->fields(array('permission' => 'access openmeetings room'))
+ ->condition('rid', 1)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'access openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'create openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'edit openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'delete openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+ */
+
+ //drupal_flush_all_caches();
+ node_types_rebuild();
+ // node_menu() defines menu items based on node types so it needs to come
+ // after node types are rebuilt.
+ menu_rebuild();
+}
=======================================
--- /dev/null
+++ /trunk/dist/sites/all/modules/openmeetings/openmeetings.module Thu Oct
11 02:28:28 2012
@@ -0,0 +1,1051 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+/**
+ * @file
+ * OpenMeetins Integration Module
+ */
+
+/*******************************************************************************
+ * Hook Functions (Drupal)
+
******************************************************************************/
+
+/**
+ * Display help and module information
+ *
+ * @param path which path of the site we're displaying help
+ * @param arg array that holds the current path as would be returned from
arg() function
+ *
+ * @return help text for the path
+ */
+function openmeetings_help($path, $arg) {
+
+ switch ($path) {
+ case 'admin/settings/admin_menu' :
+ return t('The administration menu module provides a dropdown menu
arranged for one- or two-click access to most administrative tasks and
other common destinations (to users with the proper permissions). Use the
settings below to customize the appearance of the menu.');
+
+ case 'admin/help#openmeetings' :
+ $output = '<p>' . t("Video Conference Script integration module
details, installation instructions, updates") . ': <a
href="http://incubator.apache.org/openmeetings/">http://incubator.apache.org/openmeetings/</a></p>';
+
+ return $output;
+ }
+
+ //return $output;
+}
+
+/**
+ * Valid permissions for this module
+ *
+ * @return array An array of valid permissions for the openmeetings_module
module
+ */
+function openmeetings_permission() {
+
+ return array (
+ 'administer openmeetings' => array (
+ 'title' => t('administer openmeetings'),
+ 'description' => t('administer openmeetings.'),
+
+ ),
+ 'create openmeetings room' => array (
+ 'title' => t('create openmeetings room'),
+ 'description' => t('create openmeetings room.'),
+
+ ),
+ 'edit openmeetings room' => array (
+ 'title' => t('edit openmeetings room'),
+ 'description' => t('edit openmeetings room.'),
+
+ ),
+ 'edit any openmeetings room' => array (
+ 'title' => t('edit any openmeetings room'),
+ 'description' => t('edit any openmeetings room.'),
+
+ ),
+ 'edit any openmeetings room' => array (
+ 'title' => t('Flush caches'),
+ 'description' => t('Access links to flush caches in the administration
menu.'),
+
+ ),
+ 'delete any openmeetings room' => array (
+ 'title' => t('delete any openmeetings room'),
+ 'description' => t('delete any openmeetings room.'),
+
+ ),
+ 'access openmeetings room' => array (
+ 'title' => t('access openmeetings room'),
+ 'description' => t('access openmeetings room.'),
+
+ ),
+ 'edit openmeetings_url' => array (
+ 'title' => t('edit openmeetings_url'),
+ 'description' => t('edit openmeetings_url.'),
+
+ ),
+ 'edit openmeetings_port' => array (
+ 'title' => t('edit openmeetings_port'),
+ 'description' => t('edit openmeetings_port.'),
+
+ ),
+ 'access openmeetings room' => array (
+ 'title' => t('access openmeetings room'),
+ 'description' => t('access openmeetings room.'),
+
+ ),
+
+ 'edit openmeetings_username' => array (
+ 'title' => t('edit openmeetings_username'),
+ 'description' => t('edit openmeetings_username.'),
+
+ ),
+ 'edit openmeetings_password' => array (
+ 'title' => t('edit openmeetings_port'),
+ 'description' => t('edit openmeetings_password.'),
+
+ ),
+
+ 'edit room' => array (
+ 'title' => t('edit room'),
+ 'description' => t('edit room.'),
+
+ ),
+ 'edit room_comment' => array (
+ 'title' => t('edit room_comment'),
+ 'description' => t('edit room_comment.'),
+
+ ),
+ 'edit roomtype_id' => array (
+ 'title' => t('edit roomtype_id'),
+ 'description' => t('edit roomtype_id.'),
+
+ ),
+ 'edit number_of_partizipants' => array (
+ 'title' => t('edit number_of_partizipants'),
+ 'description' => t('edit number_of_partizipants.'),
+
+ ),
+ 'edit allowUserQuestions' => array (
+ 'title' => t('edit allowUserQuestions'),
+ 'description' => t('edit allowUserQuestions.'),
+
+ ),
+
+
+ );
+}
+
+/**
+ * Menu for this module
+ *
+ * @return array An array with this module's menus.
+ */
+function openmeetings_menu() {
+
+ $items = array ();
+
+ $items['admin/config/system/openmeetings'] = array (
+ 'title' => 'OpenMeetings',
+ 'description' => 'OpenMeetings admin interface.',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array (
+ 'openmeetings_admin'
+ ),
+ 'access arguments' => array (
+ 'administer openmeetings'
+ ),
+ 'type' => MENU_NORMAL_ITEM,
+
+ );
+
+ $items['myopenmeetings'] = array (
+ 'title' => 'OpenMeetings Rooms',
+ 'description' => 'My openmeetings rooms.',
+ 'page callback' => 'openmeetings_roomlist',
+ 'access arguments' => array (
+ 'edit openmeetings room'
+ ),
+ 'type' => MENU_NORMAL_ITEM,
+
+ );
+
+ return $items;
+
+}
+
+/**
+ * Room list page
+ *
+ * @return page contents.
+ */
+function openmeetings_roomlist() {
+ global $user;
+
+ $page_content = "";
+
+ $options = array (
+ "attributes" => array (
+ "title" => "",
+ 'target' => '_blank'
+ )
+ );
+
+ $myrooms = db_query("SELECT room.room_id, node.title, node.nid FROM
{openmeetings_rooms} as room, " .
+ "{node} as node WHERE node.uid=:uid AND room.nid = node.nid ORDER BY
room.timelastaccess DESC", array (
+ ':uid' => $user->uid
+ ));
+
+ if ($myrooms !== FALSE) {
+ $page_content .= "<UL>";
+ foreach ($myrooms as $row) {
+ //print_r($row);
+ // $link = l("$row[title] ($row[room])", "node/$row[nid]", $options);
+ $link = l("$row->title", "node/$row->nid", $options);
+ $page_content .= "<LI>$link</LI>";
+ }
+ $page_content .= "</UL>";
+ }
+
+ $link = l(t('Add New Room'), "node/add/openmeetings", $options);
+ $page_content .= "<BR><h3>$link</h3>";
+ return $page_content;
+}
+
+/**
+ * Room login form
+ *
+ * @return form an array of form data.
+ */
+function openmeetings_start_form($form_state, $node) {
+ global $base_url, $user, $language;
+ require_once 'openmeetings_gateway.php';
+
+ $path = drupal_get_path('module', 'openmeetings');
+
+ $url = $base_url . "/" . $path . "/openmeetings_conference.php";
+
+ $url_server = variable_get('openmeetings_url', 'localhost');
+ $url_port = variable_get('openmeetings_port', '5080');
+ $webapp_name = variable_get('openmeetings_webapp_name', 'openmeetings');
+ $room_id = $node['build_info']['args'][0]->room->room_id;
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ //room creator is moderator
+ if ($node['build_info']['args'][0]->uid == $user->uid) {
+ $becomemoderator = 1;
+ } else {
+ $becomemoderator = 0;
+ }
+
+ $allowRecording = $node['build_info']['args'][0]->room->allowRecording;
+
+ //test if user is logined
+ if (!in_array("anonymous user", $user->roles)) {
+ $roomhash =
$openmeetings_gateway->openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($user->name,
$user->name, '', $user->picture, $user->mail, $user->uid, $user->roles[2],
$room_id, $becomemoderator, $allowRecording);
+ } else {
+ $roomhash =
$openmeetings_gateway->openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag('anonymous
user', 'anonymous user', '', 'anonymous user', 'anonymous user',
$user->uid, $user->roles[1], $room_id, $becomemoderator, $allowRecording);
+ }
+
+ if ($language->language == 'en') {
+ $om_laguage_id = 1;
+ } else if ($language->language == 'de') {
+ $om_laguage_id = 2;
+ } else if ($language->language == 'fr') {
+ $om_laguage_id = 4;
+ } else if ($language->language == 'it') {
+ $om_laguage_id = 5;
+ } else if ($language->language == 'pt') {
+ $om_laguage_id = 6;
+ } else if ($language->language == 'es') {
+ $om_laguage_id = 8;
+ } else if ($language->language == 'ru') {
+ $om_laguage_id = 9;
+ } else if ($language->language == 'swedish') {
+ $om_laguage_id = 10;
+ } else if ($language->language == 'default') {
+ $om_laguage_id = 1;
+ } else if ($language->language == 'ko-KR') {
+ $om_laguage_id = 13;
+ } else if ($language->language == 'ar-AA') {
+ $om_laguage_id = 13;
+ } else if ($language->language == 'ua-UA') {
+ $om_laguage_id = 18;
+ } else if ($language->language == 'persian') {
+ $om_laguage_id = 20;
+ } else if ($language->language == 'nl-NL') {
+ $om_laguage_id = 26;
+ } else if ($language->language == 'ca-ES') {
+ $om_laguage_id = 28;
+ } else if ($language->language == 'da-DK') {
+ $om_laguage_id = 30;
+ } else {
+ $om_laguage_id = 1;
+ }
+
+
+
+ if (!empty ($roomhash)) {
+
+ $swfurl = "http://" . $url_server . ":" . $url_port . "/" .
$webapp_name . "/?" .
+ "scopeRoomId=" . $room_id .
+ "&secureHash=" . $roomhash .
+ "&language=" . $om_laguage_id;
+
+ }
+ }
+
+ $form['swfurl'] = array (
+ '#type' => 'hidden',
+ '#value' => check_plain($swfurl)
+ );
+ $form['#action'] = $url;
+ $form['#attributes'] = array (
+ 'enctype' => "multipart/form-data"
+ );
+ $form['submit'] = array (
+ '#type' => 'submit',
+ '#value' => t('Enter Conference Room'),
+
+ );
+ return $form;
+}
+
+/**
+ * Rooms cleanup
+ */
+function openmeetings_cleanup() {
+ //cleanup
+ $ztime = time();
+ db_query("DELETE FROM {openmeetings_rooms} WHERE ((timeexpire>0) AND
(timeexpire<$ztime))");
+}
+
+/**
+ * Admin page
+ *
+ * @return page contents.
+ */
+function openmeetings_admin() {
+ $form = array ();
+
+ $form['openmeetings_url'] = array (
+ '#type' => 'textfield',
+ '#title' => t('OpenMeetings URL'),
+ '#default_value' => variable_get('openmeetings_url', "localhost"),
+ '#size' => 48,
+ '#maxlength' => 255,
+ '#description' => t('OpenMeetings URL'),
+ '#required' => TRUE,
+
+ );
+
+ $form['openmeetings_port'] = array (
+ '#type' => 'textfield',
+ '#title' => t('OpenMeetings Port'),
+ '#default_value' => variable_get('openmeetings_port', "5080"),
+ '#size' => 48,
+ '#maxlength' => 10,
+ '#description' => t("OpenMeetigs Port"),
+ '#required' => TRUE,
+
+ );
+
+ $form['openmeetings_username'] = array (
+ '#type' => 'textfield',
+ '#title' => t('Username'),
+ '#default_value' => variable_get('openmeetings_username', "admin"),
+ '#size' => 24,
+ '#maxlength' => 48,
+ '#description' => t("OpenMeetings admin username."),
+ '#required' => TRUE,
+
+ );
+
+ $form['openmeetings_password'] = array (
+ '#type' => 'password',
+ '#title' => t('Password'),
+ '#default_value' => variable_get('openmeetings_password', "admin"),
+ '#size' => 48,
+ '#maxlength' => 48,
+ '#description' => t("Admin Password."),
+ '#required' => TRUE,
+
+ );
+
+ return system_settings_form($form);
+}
+
+function openmeetings_node_info() {
+ return array (
+ 'openmeetings' => array (
+ 'name' => t('OpenMeetings Room'),
+ 'base' => 'openmeetings',
+ 'description' => t("A <i>room</i> that can be used for customized video
conference."),
+ 'has_title' => TRUE,
+ 'title_label' => t('Video Conference'),
+ 'has_body' => TRUE,
+ 'body_label' => t('Room Description'),
+
+ ),
+
+ );
+}
+
+function openmeetings_node_access($op, $node, $account) {
+
+ if ($op == 'access') {
+ return user_access('access openmeetings room', $account);
+ }
+
+ if ($op == 'create') {
+ return user_access('create openmeetings room', $account);
+ }
+
+ if ($op == 'update') {
+ if (user_access('edit any openmeetings room', $account) ||
(user_access('edit openmeetings room', $account) && ($account->uid ==
$node->uid))) {
+ return TRUE;
+ }
+ }
+
+ if ($op == 'delete') {
+ if (user_access('delete any openmeetings room', $account) ||
(user_access('delete openmeetings room', $account) && ($account->uid ==
$node->uid))) {
+ return TRUE;
+ }
+ }
+}
+
+/**
+ * Implementation of hook_form().
+ */
+function openmeetings_form(& $node) {
+ // The site admin can decide if this node type has a title and body, and
how
+ // the fields should be labeled. We need to load these settings so we can
+ // build the node form correctly.
+ global $user;
+ // $type = node_get_types('type', $node);
+
+ $node->room = null;
+
+ if (isset($node->vid)) {
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $node->vid
+ ));
+
+ foreach($additions as $room) {
+ $node->room = $room;
+ }
+ }
+
+
+ $type = _node_types_build()->types;
+
+ $form['title'] = array (
+ '#type' => 'textfield',
+ '#title' => check_plain($type['openmeetings']->title_label),
+ '#required' => TRUE,
+ '#default_value' => $node->title,
+ '#weight' => -5,
+
+ );
+ //}
+
+ //if ($type->has_body) {
+ // In Drupal 6, we can use node_body_field() to get the body and filter
+ // elements. This replaces the old textarea + filter_form() method of
+ // setting this up. It will also ensure the teaser splitter gets set up
+ // properly.
+ //$form['body_field'] = node_body_field($node, $type->body_label,
$type->min_word_count);
+
+ // add the body field to the content type
+ //node_add_body_field($type, 'body');
+
+ //}
+
+ $form['room_name'] = array (
+ '#type' => 'textfield',
+ '#title' => t('New room name'),
+ '#default_value' => isset ($node->room->room_name) ?
$node->room->room_name :
variable_get('openmeetings_room_prefix2', 'NewRoom'),
+ '#size' => 32,
+ '#maxlength' => 64,
+ '#description' => t("Label that will be used to access the room. Leave
as it is to generate one."),
+
+ );
+
+ if (user_access('edit room_comment', $user)) {
+ $form['room_comment'] = array (
+ '#type' => 'textarea',
+ '#title' => t('Room comments'),
+ '#default_value' => isset ($node->room->room_comment) ?
$node->room->room_comment : '',
+ '#cols' => 32,
+ '#rows' => 2,
+ '#description' => t("Room comments."),
+
+ );
+ } else {
+ $form['room_comment'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->room_comment) ?
$node->room->room_comment : '',
+
+ );
+ }
+
+ if (user_access('edit roomtype_id', $user)) {
+ $options = array (
+ "1" => "Conference (max 20 Users recommended, Democratic)",
+ "3" => "Webinar (max 150 Users recommended, Moderated)",
+ "4" => "Interview (Only 2 Users, no Whiteboard, Record Audio/Video,
Moderated)"
+ );
+ $form['roomtype_id'] = array (
+ '#type' => 'select',
+ '#title' => t('Roomtype'),
+ '#default_value' => isset ($node->room->roomtype_id) ?
$node->room->roomtype_id : 1,
+ '#options' => $options,
+ '#description' => t('Roomtype'),
+
+ );
+ } else {
+ $form['roomtype_id'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->roomtype_id) ?
$node->room->roomtype_id : 1,
+
+ );
+ }
+
+ if (user_access('edit number_of_partizipants', $user)) {
+ $form['number_of_partizipants'] = array (
+ '#type' => 'textfield',
+ '#title' => t('Number of partizipants'),
+ '#default_value' => isset ($node->room->number_of_partizipants) ?
$node->room->number_of_partizipants : 12,
+ '#size' => 2,
+ '#maxlength' => 3,
+ '#description' => t("The maximum users allowed in this room."),
+
+ );
+ } else {
+ $form['number_of_partizipants'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->number_of_partizipants) ?
$node->room->number_of_partizipants : 12,
+
+ );
+ }
+
+ if (user_access('edit is_public', $user)) {
+
+ //the "ispublic" flag has no effect to the drupal integration,
+ //integrated rooms should always have the flag set to false/0
+
+// $options = array (
+// "1" => t('Yes'),
+// "0" => t('No')
+// );
+// $form['is_public'] = array (
+// '#type' => 'select',
+// '#title' => t('Public Room'),
+// '#default_value' => isset ($node->room->is_public) ?
$node->room->is_public : "1",
+// '#options' => $options,
+// '#description' => t('If this room is public, it will appear in the
frontend for everybody.'),
+//
+// );
+
+ $form['is_public'] = array (
+ '#type' => 'hidden',
+ '#default_value' => 0,
+
+ );
+
+ } else {
+ $form['is_public'] = array (
+ '#type' => 'hidden',
+ '#default_value' => 0,
+
+ );
+ }
+
+ if (user_access('edit appointment', $user)) {
+ $form['appointment'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->appointment) ?
$node->room->appointment : "0",
+
+ );
+ } else {
+ $form['appointment'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->appointment) ?
$node->room->appointment : "0",
+
+ );
+ }
+
+ if (user_access('edit is_moderated_room', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['is_moderated_room'] = array (
+ '#type' => 'select',
+ '#title' => t('Moderated Room'),
+ '#default_value' => isset ($node->room->is_moderated_room) ?
$node->room->is_moderated_room : "1",
+ '#options' => $options,
+ '#description' => t('Users have to wait untill a Moderator arrives.'),
+
+ );
+ } else {
+ $form['is_moderated_room'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->is_moderated_room) ?
$node->room->is_moderated_room : "1",
+
+ );
+ }
+
+ if (user_access('edit isAudioOnly', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['isAudioOnly'] = array (
+ '#type' => 'select',
+ '#title' => t('Is Audio Only'),
+ '#default_value' => isset ($node->room->isAudioOnly) ?
$node->room->isAudioOnly : "0",
+ '#options' => $options,
+ '#description' => t('Is Audio Only.'),
+
+ );
+ } else {
+ $form['isAudioOnly'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->isAudioOnly) ?
$node->room->isAudioOnly : "1",
+
+ );
+ }
+
+ if (user_access('edit allowUserQuestions', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['allowUserQuestions'] = array (
+ '#type' => 'select',
+ '#title' => t('Allow User Questions'),
+ '#default_value' => isset ($node->room->allowUserQuestions) ?
$node->room->allowUserQuestions : "1",
+ '#options' => $options,
+ '#description' => t('Allow users to ask questions.'),
+
+ );
+ } else {
+ $form['allowUserQuestions'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->allowUserQuestions) ?
$node->room->allowUserQuestions : "1",
+
+ );
+ }
+
+ if (user_access('edit allowRecording', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['allowRecording'] = array (
+ '#type' => 'select',
+ '#title' => t('Allow Recording'),
+ '#default_value' => isset ($node->room->allowRecording) ?
$node->room->allowRecording : "1",
+ '#options' => $options,
+ '#description' => t('Allow Recording.'),
+
+ );
+ } else {
+ $form['allowRecording'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->allowRecording) ?
$node->room->allowRecording : "1",
+
+ );
+ }
+
+ if (user_access('edit room_id', $user)) {
+ $form['room_id'] = array (
+ '#type' => 'hidden',
+ '#title' => t('room_id'),
+ '#default_value' => isset ($node->room_id) ? $node->room_id : "0",
+ '#size' => 6,
+ '#maxlength' => 6,
+ '#description' => t("Room id."),
+
+ );
+ } else {
+ $form['room_id'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room_id) ? $node->room_id : "0",
+
+ );
+ }
+
+ return $form;
+}
+
+/**
+ * Implementation of hook_form_FORM_ID_alter().
+ *
+ */
+function openmeetings_form_openmeetings_node_form_alter(& $form,
$form_state) {
+
+ //$form['options']['promote']['#disabled'] = FALSE;
+ //$form['options']['promote']['#default_value'] = 0;
+ //$form['options']['promote']['#value'] = 1;
+}
+
+/**
+ * Implementation of hook_delete().
+ */
+function openmeetings_delete($node) {
+ global $user;
+ $path = drupal_get_path('module', 'openmeetings');
+ require_once ("./$path/openmeetingsRoomManagament.php");
+ // Notice that we're matching all revision, by using the node's nid.
+ if (user_access('delete openmeetings room', $user)) {
+
+ //$data['room_id'] = $node->room->room_id;
+
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $node->nid
+ ));
+
+ $data['room_id'] = -1;
+
+ foreach ($additions as $record) {
+ $data['room_id'] = $record->room_id;
+ }
+
+ $omRoomManagament = new openmeetingsRoomManagament();
+ $room_id = $omRoomManagament->deleteRoom($data);
+
+
+ //Currently the openmeetings API does not return a positive value
+ //if the SOAP/REST user that invokes the call "deleteRecording"
+ //if ($room_id > 0) {
+ if (true) {
+ //db_query('DELETE FROM {openmeetings_rooms} WHERE nid = %d',
$node->nid);
+
+ db_delete('openmeetings_rooms')->condition('nid',
$node->nid)->execute();
+ } else {
+
+ drupal_set_message(t('Could not login User to OpenMeetings, check your
OpenMeetings Module Configuration [1] '), 'error');
+ }
+ }
+}
+
+/**
+ * Implementation of hook_insert().
+ */
+function openmeetings_insert($node) {
+
+ global $user;
+ $path = drupal_get_path('module', 'openmeetings');
+ require_once ("./$path/openmeetingsRoomManagament.php");
+
+ $room_name = check_plain($node->room_name);
+ if ($room_name == variable_get('openmeetings_room_prefix2', 'NewRoom')) {
+ $room_name =
variable_get('openmeetings_room_prefix2', 'NewRoom') . "_" .
base_convert((time() - 1225500000) . rand(0, 10), 10, 36);
+ }
+
+ $ztime = time();
+
+ $data['name'] = $node->room_name;
+ $data['roomtype_id'] = $node->roomtype_id;
+ $data['comment'] = $node->room_comment;
+ $data['number_of_partizipants'] = $node->number_of_partizipants;
+ $data['is_public'] = $node->is_public;
+ $data['isDemoRoom'] = 0;
+ $data['isAudioOnly'] = $node->isAudioOnly;
+ $data['allowUserQuestions'] = $node->allowUserQuestions;
+ $data['demoTime'] = "";
+ $data['is_moderated_room'] = $node->is_moderated_room;
+
+ $omRoomManagament = new openmeetingsRoomManagament();
+ $room_id = $omRoomManagament->createMyRoomWithMod($data);
+
+ //Make sure the Openmeetings Room was succsefully created
+
+ if ($room_id > 0) {
+ $expiration = 0;
+
+ db_insert('openmeetings_rooms')->fields(array (
+ 'nid' => $node->nid,
+ 'room_id' => $room_id,
+ 'roomtype_id' => $node->roomtype_id,
+ 'room_name' => $node->room_name,
+ 'room_comment' => $node->room_comment,
+ 'owner_id' => $user->uid,
+ 'number_of_partizipants' => $node->number_of_partizipants,
+ 'timecreated' => $ztime,
+ 'timelastaccess' => $ztime,
+ 'timeexpire' => $expiration,
+ 'credits' => 0,
+ 'timeused' => 0,
+ 'file_delete' => 0,
+ 'is_public' => $node->is_public,
+ 'appointment' => 0,
+ 'is_moderated_room' => $node->is_moderated_room,
+ 'allowRecording' => $node->allowRecording,
+ 'isAudioOnly' => $node->isAudioOnly,
+ 'allowUserQuestions' => $node->allowUserQuestions,
+ 'demo' => 0,
+
+ ))->execute();
+
+ $options = array (
+ "attributes" => array (
+ "title" => $node->room_name,
+ 'target' => '_blank'
+ )
+ );
+ $link = l($room_name, "node/" . $node->nid, $options);
+ //drupal_set_message(t('Use this link to access this Video Conference
room and invite the other participant: ') . "<BR>" . $link);
+ } else {
+
+ drupal_set_message(t('Could not login User to OpenMeetings, check your
OpenMeetings Module Configuration [2] '), 'error');
+ }
+
+}
+
+/**
+ * Implementation of hook_update().
+ */
+function openmeetings_update($node) {
+ global $user;
+ $path = drupal_get_path('module', 'openmeetings');
+ require_once ("./$path/openmeetingsRoomManagament.php");
+ // if this is a new node or we're adding a new revision,
+ if ($node->revision) {
+ openmeetings_insert($node);
+ } else {
+
+ //print_r($node);
+ //die("UDPATE");
+
+ $room_name = check_plain($node->room_name);
+ if ($room_name == variable_get('openmeetings_room_prefix2', 'NewRoom')) {
+ $room_name =
variable_get('openmeetings_room_prefix2', 'NewRoom') . "_" .
base_convert((time() - 1225500000) . rand(0, 10), 10, 36);
+ }
+
+ $data = array();
+
+ $data['room_id'] = $node->room->room_id;
+ $data['name'] = $node->room_name;
+ $data['roomtype_id'] = $node->roomtype_id;
+ $data['comment'] = $node->room_comment;
+ $data['number_of_partizipants'] = $node->number_of_partizipants;
+ $data['is_public'] = $node->is_public;
+ $data['appointment'] = $node->appointment;
+ $data['isDemoRoom'] = 0;
+ $data['demoTime'] = "";
+ $data['isAudioOnly'] = $node->isAudioOnly;
+ $data['is_moderated_room'] = $node->is_moderated_room;
+ $data['allowUserQuestions'] = $node->allowUserQuestions;
+
+ $omRoomManagament = new openmeetingsRoomManagament();
+ $room_id =
$omRoomManagament->updateRoomWithModerationAndQuestions($data);
+
+ if ($room_id > 0) {
+
+ db_update('openmeetings_rooms')->fields(array (
+ 'nid' => $node->nid,
+ 'room_id' => $room_id,
+ 'roomtype_id' => $node->roomtype_id,
+ 'room_name' => $node->room_name,
+ 'room_comment' => $node->room_comment,
+ 'owner_id' => $user->uid,
+ 'number_of_partizipants' => $node->number_of_partizipants,
+ //'timecreated' => $ztime,
+ //'timelastaccess' => $ztime,
+ //'timeexpire' => $expiration,
+ 'credits' => 0,
+ 'timeused' => 0,
+ 'file_delete' => 0,
+ 'is_public' => 0,
+ 'appointment' => 0,
+ 'is_moderated_room' => $node->is_moderated_room,
+ 'allowRecording' => $node->allowRecording,
+ 'isAudioOnly' => $node->isAudioOnly,
+ 'allowUserQuestions' => $node->allowUserQuestions,
+ 'demo' => 0,
+
+ ))->condition('nid', $node->nid)->execute();
+
+ } else {
+
+ drupal_set_message(t('Could not login User to OpenMeetings, check your
OpenMeetings Module Configuration [3] '), 'error');
+ }
+
+ }
+}
+
+/**
+ * Implementation of hook_load().
+ */
+function openmeetings_load($node) {
+
+ foreach ($node as $nod) {
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $nod->nid
+ ));
+ }
+
+// foreach ($node as $record) {
+//
+// $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+// ':nid' => $record->nid
+// ));
+//
+// print_r($record->nid);
+// echo "<br/>";
+// print_r($record);
+// echo "<br/>";
+// print_r($additions);
+// echo "<br/>";
+//
+// foreach($additions as $room){
+// print_r($room);
+// }
+//
+//
+// foreach($additions as $room){
+// $node[$room->nid]->room = $room;
+// }
+//
+// }
+//
+// //die ("<h2> Room ? </h2>");
+
+ return $additions;
+}
+
+/**
+ * Implementation of hook_view().
+ */
+function openmeetings_view($node, $view_mode) {
+ global $user;
+
+ if ($view_mode != "teaser") {
+
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $node->vid
+ ));
+
+ $node->room = null;
+
+ foreach($additions as $room) {
+ $node->room = $room;
+ }
+
+ $disabled_content = "";
+ $room_access = 1;
+ $myrooms = false;
+ if ($node->room != null) {
+
+ $myrooms = db_query("SELECT * FROM {openmeetings_rooms} WHERE
room_id=:room_id", array (
+ ':room_id' => $node->room->room_id
+ ));
+
+ if ($myrooms !== FALSE) {
+
+ if (USER_REGISTER_VISITORS && empty ($user->name)) {
+ $room_access = 0;
+
+ }
+ } else {
+ $disabled_content = t('Room not found ');
+ }
+
+ if (!$room_access && !$disabled_content) {
+ $disabled_content .= t('Instant access to visitors is disabled. You
need to be registered and logged into this website to access conference
rooms.');
+ }
+
+ //$options = array("attributes" => array("title" =>
$node->room_id, 'target' => '_blank'));
+ //$link = l($node->room_name, "node/". $node->nid, $options);
+ // $access_content = "<BR>". t('Use this link to access this Video
Conference room and invite the other participant: ') ."<BR>". $link;
+
+ if ($node->room->roomtype_id == 1) {
+ $room_type_name = t('Conference');
+ } else if ($node->room->roomtype_id == 2) {
+ $room_type_name = t('Audience');
+ } else if ($node->room->roomtype_id == 3) {
+ $room_type_name = t('Restricted');
+ } else if ($node->room->roomtype_id == 4) {
+ $room_type_name = t('Interview');
+ } else if ($node->room->roomtype_id == 5) {
+ $room_type_name = t('Custom');
+ }
+
+ $stats_content = "";
+
+ $stats_content .= t('Room name') . ": " .
$node->room->room_name . "<BR>" . t('Room comments') . ": " .
$node->room->room_comment . "<BR>" . t('Room type') . ": " .
$room_type_name . "<BR>" . t('Number of partizipants') . ": " .
$node->room->number_of_partizipants;
+
+ }
+ //$body_text = "<BR>" .
$stats_content."<BR><BR>".drupal_render($my_temp_variable =
drupal_get_form('openmeetings_start_form', $node));
+
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++
/trunk/dist/sites/all/modules/openmeetings/openmeetingsRoomManagament.php
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,112 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+require_once("openmeetings_gateway.php");
+
+
+class openmeetingsRoomManagament {
+
+
+ function createMyRoomWithMod($data) {
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ $openmeetings = new stdClass;
+
+ $openmeetings->name = $data['name'];
+ $openmeetings->roomtypes_id = $data['roomtype_id'];
+ $openmeetings->comment = $data['comment'];
+ $openmeetings->numberOfPartizipants = $data['number_of_partizipants'];
+ $openmeetings->ispublic = $data['is_public'];
+ $openmeetings->isAudioOnly = $data['isAudioOnly'];
+ $openmeetings->allowUserQuestions = $data['allowUserQuestions'];
+ $openmeetings->isDemoRoom = 0;
+ $openmeetings->demoTime = "";
+ $openmeetings->isModeratedRoom = $data['is_moderated_room'];
+
+ $roomid =
$openmeetings_gateway->openmeetings_createRoomWithModAndTypeAndAudioOption($openmeetings);
+
+ return $roomid;
+
+ } else {
+ echo "Could not login User to OpenMeetings, check your OpenMeetings
Module Configuration [4]";
+ }
+ }
+
+ function updateRoomWithModerationAndQuestions($data) {
+
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ $openmeetings = new stdClass;
+
+ $openmeetings->name = $data['name'];
+ $openmeetings->room_id = $data['room_id'];
+ $openmeetings->roomtypes_id = $data['roomtype_id'];
+ $openmeetings->comment = $data['comment'];
+ $openmeetings->numberOfPartizipants = $data['number_of_partizipants'];
+ $openmeetings->ispublic = $data['is_public'];
+ $openmeetings->appointment = $data['appointment'];
+ $openmeetings->isDemoRoom = 0;
+ $openmeetings->demoTime = "";
+ $openmeetings->isModeratedRoom = $data['is_moderated_room'];
+ $openmeetings->isAudioOnly = $data['isAudioOnly'];
+ $openmeetings->allowUserQuestions = $data['allowUserQuestions'];
+
+ $roomid =
$openmeetings_gateway->openmeetings_updateRoomWithModerationAndQuestions($openmeetings);
+
+ return $roomid;
+
+ } else {
+ echo "Could not login User to OpenMeetings, check your OpenMeetings
Module Configuration [7]";
+
+ }
+ }
+
+ function deleteRoom ($data){
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ $openmeetings = new stdClass;
+
+ $openmeetings->room_id = $data['room_id'];
+ if ($openmeetings->room_id > 0) {
+ $roomid = $openmeetings_gateway->deleteRoom($openmeetings);
+ return $roomid;
+ } else {
+ return -1;
+ }
+
+ } else {
+ echo "Could not login User to OpenMeetings, check your OpenMeetings
Module Configuration [8]";
+
+ }
+
+
+ }
+
+
+}
+
+
+?>
=======================================
--- /dev/null
+++ /trunk/dist/sites/all/modules/openmeetings/openmeetings_conference.php
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,35 @@
+<?
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"></head>
+<body bgcolor="#5a5152" text="#333333" link="#FF3366" LEFTMARGIN="0"
TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
+<?
+
+
+$swfurl = $_POST["swfurl"];
+
+?>
+<iframe src="<?=$swfurl?>" width="100%" height="100%">
+<p align="center"><strong>This content requires the Adobe Flash Player:
+ <a href="http://www.macromedia.com/go/getflash/">Get
Flash</a></strong>!</p>
+</iframe>
+<?
=======================================
--- /dev/null
+++ /trunk/dist/sites/all/modules/openmeetings/openmeetings_gateway.php Thu
Oct 11 02:28:28 2012
@@ -0,0 +1,449 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+require_once('lib/openmeetings_rest_service.php');
+
+class openmeetings_gateway {
+
+ var $session_id = "";
+ var $url_server;
+ var $url_port;
+ var $webapp_name;
+ var $moduleKey;
+ var $username;
+ var $password;
+
+ function getUrl() {
+ $this->url_server = variable_get("openmeetings_url", "localhost");
+ $this->url_port = variable_get("openmeetings_port", "5080");
+ $this->username = variable_get('openmeetings_username', 'admin');
+ $this->password = variable_get('openmeetings_password', 'red5test');
+ $this->webapp_name = "openmeetings";
+ $this->moduleKey = "drupal";
+ //FIXME protocol should be added
+ $port = $this->url_port == 80 ? "" : ":" . $this->url_port;
+ return "http://" . $this->url_server . $port . "/" . $this->webapp_name;
+ }
+
+ function var_to_str($in)
+ {
+ if(is_bool($in))
+ {
+ if($in)
+ return "true";
+ else
+ return "false";
+ }
+ else
+ return $in;
+ }
+
+
+ /**
+ * TODO: Get Error Service and show detailed Error Message
+ */
+
+ function openmeetings_loginuser() {
+ global $CFG;
+
+ $restService = new openmeetings_rest_service();
+
+ $response =
$restService->call($this->getUrl()."/services/UserService/getSession","session_id");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Error</h2><pre>' . $err . '</pre>';
+ } else {
+ $this->session_id = $response;
+
+ $result =
$restService->call($this->getUrl()."/services/UserService/loginUser?"
+ . "SID=".$this->session_id
+ . "&username=" . urlencode($this->username)
+ . "&userpass=" . urlencode($this->password)
+ );
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($result); echo '</pre>';
+ } else {
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Error</h2><pre>' . $err . '</pre>';
+ } else {
+ $returnValue = $result;
+ }
+ }
+ }
+ }
+
+ if ($returnValue>0){
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+ function openmeetings_updateRoomWithModeration($openmeetings) {
+
+ $restService = new openmeetings_rest_service();
+ //echo $restService."<br/>";
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+ $course_name
= 'MOODLE_COURSE_ID_'.$openmeetings->course.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = false;
+ if ($openmeetings->isModeratedRoom == 1) {
+ $isModeratedRoom = true;
+ }
+
+ $result =
$restService->call($this->getUrl()."/services/RoomService/updateRoomWithModeration?" .
+ "SID=".$this->session_id.
+ "&room_id=".$openmeetings->room_id.
+ "&name=".urlencode($course_name).
+ "&roomtypes_id=".urlencode($openmeetings->type).
+ "&comment=".urlencode("Created by SOAP-Gateway for Moodle
Platform").
+ "&numberOfPartizipants=".$openmeetings->max_user.
+ "&ispublic=false".
+ "&appointment=false".
+ "&isDemoRoom=false".
+ "&demoTime=0".
+ "&isModeratedRoom=".$this->var_to_str($isModeratedRoom));
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function openmeetings_updateRoomWithModerationAndQuestions($openmeetings)
{
+
+ $restService = new openmeetings_rest_service();
+ //echo $restService."<br/>";
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = ($openmeetings->isModeratedRoom ==
1) ? 'true' : 'false';
+ $allowUserQuestions = ($openmeetings->allowUserQuestions ==
1) ? 'true' : 'false';
+ $isAudioOnly = ($openmeetings->isAudioOnly == 1) ? 'true' : 'false';
+
+ $url =
$this->getUrl()."/services/RoomService/updateRoomWithModerationAndQuestions?" .
+ "SID=".$this->session_id.
+ "&room_id=".$openmeetings->room_id.
+ "&name=".urlencode($room_name).
+ "&roomtypes_id=".urlencode($openmeetings->roomtypes_id).
+ "&comment=".urlencode("Created by SOAP-Gateway for Moodle
Platform").
+ "&numberOfPartizipants=".$openmeetings->numberOfPartizipants.
+ "&ispublic=false".
+ "&appointment=false".
+ "&isDemoRoom=false".
+ "&demoTime=0".
+ "&isModeratedRoom=".$isModeratedRoom .
+ "&allowUserQuestions=".$allowUserQuestions;
+
+ $result = $restService->call($url);
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ /*
+ * public String setUserObjectAndGenerateRecordingHashByURL(String SID,
String username, String firstname, String lastname,
+ Long externalUserId, String externalUserType, Long recording_id)
+ */
+ function
openmeetings_setUserObjectAndGenerateRecordingHashByURL($username,
$firstname, $lastname,
+ $userId, $systemType, $recording_id) {
+ $restService = new openmeetings_rest_service();
+ $result =
$restService->call($this->getUrl().'/services/UserService/setUserObjectAndGenerateRecordingHashByURL?'.
+ 'SID='.$this->session_id .
+ '&username='.urlencode($username) .
+ '&firstname='.urlencode($firstname) .
+ '&lastname='.urlencode($lastname) .
+ '&externalUserId='.$userId .
+ '&externalUserType='.urlencode($systemType) .
+ '&recording_id='.$recording_id,
+ 'return'
+ );
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function
openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($username,
$firstname, $lastname,
+ $profilePictureUrl, $email, $userId, $systemType, $room_id,
$becomeModerator, $allowRecording) {
+
+ $restService = new openmeetings_rest_service();
+ //echo $restService."<br/>";
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+
+ $result =
$restService->call($this->getUrl()."/services/UserService/setUserObjectAndGenerateRoomHashByURLAndRecFlag?" .
+ "SID=".$this->session_id.
+ "&username=".urlencode($username).
+ "&firstname=".urlencode($firstname).
+ "&lastname=".urlencode($lastname).
+ "&profilePictureUrl=".urlencode($profilePictureUrl).
+ "&email=".urlencode($email).
+ "&externalUserId=".urlencode($userId).
+ "&externalUserType=".urlencode($systemType).
+ "&room_id=".urlencode($room_id).
+ "&becomeModeratorAsInt=".$becomeModerator.
+ "&showAudioVideoTestAsInt=1".
+ "&allowRecording=".$this->var_to_str($allowRecording));
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function deleteRoom($openmeetings) {
+
+ //echo $client_roomService."<br/>";
+ $restService = new openmeetings_rest_service();
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+
+ $url = $this->getUrl()."/services/RoomService/deleteRoom?" .
+ "SID=".$this->session_id.
+ "&rooms_id=".$openmeetings->room_id;
+
+ $result = $restService->call($url);
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ //echo '<h2>Result</h2><pre>'; print_r($result["return"]);
echo '</pre>';
+ return $result;
+ }
+ return -1;
+ }
+
+
+ /**
+ * Generate a new room hash for entering a conference room
+ */
+ function openmeetings_setUserObjectAndGenerateRoomHash($username,
+ $firstname,
+ $lastname,
+ $profilePictureUrl,
+ $email,
+ $externalUserId,
+ $externalUserType,
+ $room_id,
+ $becomeModeratorAsInt,
+ $showAudioVideoTestAsInt) {
+
+ $restService = new openmeetings_rest_service();
+
+ $url =
$this->getUrl()."/services/UserService/setUserObjectAndGenerateRoomHash?" .
+ "SID=".$this->session_id.
+ "&username=".urlencode($username).
+ "&firstname=".urlencode($firstname).
+ "&lastname=".urlencode($lastname).
+ "&profilePictureUrl=".urlencode($profilePictureUrl).
+ "&email=".urlencode($email).
+ "&externalUserId=".urlencode($externalUserId).
+ "&externalUserType=".urlencode($externalUserType).
+ "&room_id=".$room_id.
+ "&becomeModeratorAsInt=".$becomeModeratorAsInt.
+ "&showAudioVideoTestAsInt=".$showAudioVideoTestAsInt;
+
+ $result = $restService->call($url);
+
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($result); echo '</pre>';
+ } else {
+ //echo '<h2>Result</h2><pre>'; print_r($result["return"]);
echo '</pre>';
+ return $result;
+ }
+ return -1;
+ }
+
+ /**
+ * Create a new conference room
+ */
+ function openmeetings_createRoomWithModAndType($openmeetings) {
+
+ $restService = new openmeetings_rest_service();
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $url =
$this->getUrl().'/services/RoomService/addRoomWithModerationAndExternalType?' .
+ 'SID='.$this->session_id .
+ '&name='.urlencode($room_name).
+ '&roomtypes_id='.$openmeetings->roomtypes_id .
+ '&comment='.urlencode('Created by SOAP/REST-Gateway for Drupal
Platform') .
+ '&numberOfPartizipants='.$openmeetings->numberOfPartizipants .
+ '&ispublic='.$openmeetings->ispublic .
+ '&appointment=false'.
+ '&isDemoRoom=false'.
+ '&demoTime=0' .
+ '&isModeratedRoom='. $openmeetings->isModeratedRoom .
+ '&externalRoomType='.urlencode($this->moduleKey)
+ ;
+
+ $result = $restService->call($url, "return");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ /**
+ * Create a new conference room
+ */
+ function
openmeetings_createRoomWithModAndTypeAndAudioOption($openmeetings) {
+
+ $restService = new openmeetings_rest_service();
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = ($openmeetings->isModeratedRoom ==
1) ? 'true' : 'false';
+ $allowUserQuestions = ($openmeetings->allowUserQuestions ==
1) ? 'true' : 'false';
+ $isAudioOnly = ($openmeetings->isAudioOnly == 1) ? 'true' : 'false';
+
+ $url =
$this->getUrl().'/services/RoomService/addRoomWithModerationExternalTypeAndAudioType?' .
+ 'SID='.$this->session_id .
+ '&name='.urlencode($room_name).
+ '&roomtypes_id='.$openmeetings->roomtypes_id .
+ '&comment='.urlencode('Created by SOAP/REST-Gateway for Drupal
Platform') .
+ '&numberOfPartizipants='.$openmeetings->numberOfPartizipants .
+ '&ispublic='.$openmeetings->ispublic .
+ '&appointment=false'.
+ '&isDemoRoom=false'.
+ '&demoTime=0' .
+ '&isModeratedRoom='. $isModeratedRoom .
+ '&externalRoomType='.urlencode($this->moduleKey) .
+ '&allowUserQuestions='. $allowUserQuestions .
+ '&isAudioOnly='. $isAudioOnly
+ ;
+
+ $result = $restService->call($url, "return");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function
openmeetings_updateRoomWithModerationQuestionsAudioTypeAndHideOptions($openmeetings)
{
+
+ $restService = new openmeetings_rest_service();
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = ($openmeetings->isModeratedRoom ==
1) ? 'true' : 'false';
+ $allowUserQuestions = ($openmeetings->allowUserQuestions ==
1) ? 'true' : 'false';
+ $isAudioOnly = ($openmeetings->isAudioOnly == 1) ? 'true' : 'false';
+
+ $url =
$this->getUrl().'/services/RoomService/updateRoomWithModerationQuestionsAudioTypeAndHideOptions?' .
+ 'SID='.$this->session_id .
+ '&room_id='.$openmeetings->room_id .
+ '&name='.urlencode($room_name).
+ '&roomtypes_id='.$openmeetings->roomtypes_id .
+ '&comment='.urlencode('Created by SOAP/REST-Gateway for Drupal
Platform') .
+ '&numberOfPartizipants='.$openmeetings->numberOfPartizipants .
+ '&ispublic='.$openmeetings->ispublic .
+ '&appointment=false'.
+ '&isDemoRoom=false'.
+ '&demoTime=0' .
+ '&isModeratedRoom='. $isModeratedRoom .
+ '&allowUserQuestions='. $allowUserQuestions .
+ '&isAudioOnly='. $isAudioOnly .
+ '&hideTopBar=false' .
+ '&hideChat=false' .
+ '&hideActivitiesAndActions=false' .
+ '&hideFilesExplorer=false' .
+ '&hideActionsMenu=false' .
+ '&hideScreenSharing=false' .
+ '&hideWhiteboard=false'
+ ;
+
+ $result = $restService->call($url, "return");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ /**
+ * Get list of available recordings made by this Moodle instance
+ */
+ function openmeetings_getRecordingsByExternalRooms() {
+
+ $restService = new openmeetings_rest_service();
+
+ $url =
$this->getUrl()."/services/RoomService/getFlvRecordingByExternalRoomType?" .
+ "SID=".$this->session_id .
+
"&externalRoomType=".urlencode($CFG->openmeetings_openmeetingsModuleKey);
+
+ $result = $restService->call($url,"");
+
+ return $result;
+
+ }
+
+}
+
+?>
=======================================
--- /dev/null
+++ /trunk/ivy.xml Thu Oct 11 02:28:28 2012
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<ivy-module version="2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+ <info organisation="apache" module="openmeetings" />
+ <configurations defaultconfmapping="default">
+ <conf name="default" />
+ </configurations>
+ <dependencies>
+ <dependency org="org.apache.rat" name="apache-rat-core" rev="0.8"
transitive="false">
+ <include type="jar" />
+ </dependency>
+ <dependency org="org.apache.rat" name="apache-rat-tasks" rev="0.8"
transitive="false">
+ <include type="jar" />
+ </dependency>
+ <dependency org="commons-cli" name="commons-cli" rev="1.2"
transitive="false">
+ <include type="jar" />
+ </dependency>
+ <dependency org="commons-io" name="commons-io" rev="2.1"
transitive="false">
+ <include type="jar" />
+ </dependency>
+ <dependency org="org.apache.commons" name="commons-collections"
rev="3.2.1">
+ <include type="jar" />
+ </dependency>
+ <dependency org="commons-lang" name="commons-lang" rev="2.6"
transitive="false">
+ <include type="jar" />
+ </dependency>
+ </dependencies>
+</ivy-module>
+
=======================================
--- /dev/null
+++ /trunk/ivysettings.xml Thu Oct 11 02:28:28 2012
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<ivysettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="ivysettings.xsd">
+ <settings defaultResolver="chain"/>
+ <resolvers>
+ <chain name="chain">
+ <ibiblio name="central" m2compatible="true"/>
+ </chain>
+ </resolvers>
+</ivysettings>
+
=======================================
--- /dev/null
+++ /trunk/ivysettings.xsd Thu Oct 11 02:28:28 2012
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
+ <xs:element name="ivysettings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="settings"/>
+ <xs:element ref="resolvers"/>
+ <xs:element ref="triggers"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="settings">
+ <xs:complexType>
+ <xs:attribute name="defaultResolver" use="required"
type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="resolvers">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="chain"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="chain">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="ibiblio"/>
+ <xs:element maxOccurs="unbounded" ref="url"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ibiblio">
+ <xs:complexType>
+ <xs:attribute name="m2compatible" use="required" type="xs:boolean"/>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:attribute name="root" type="xs:anyURI"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="url">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="artifact"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="artifact">
+ <xs:complexType>
+ <xs:attribute name="pattern" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="triggers">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="ant-call"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ant-call">
+ <xs:complexType>
+ <xs:attribute name="event" use="required" type="xs:NCName"/>
+ <xs:attribute name="filter" use="required"/>
+ <xs:attribute name="prefix" use="required" type="xs:NCName"/>
+ <xs:attribute name="target" use="required" type="xs:NMTOKEN"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
=======================================
--- /dev/null
+++ /trunk/sites/all/modules/openmeetings/lib/openmeetings_rest_service.php
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,127 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+class openmeetings_rest_service {
+
+ var $current_call;
+
+ function call($request,$returnAttribute="return"){
+ // This will allow you to view errors in the browser
+ // Note: set "display_errors" to 0 in production
+ //ini_set('display_errors',1);
+
+ // Report all PHP errors (notices, errors, warnings, etc.)
+ //error_reporting(E_ALL);
+
+ // URI used for making REST call. Each Web Service uses a unique URL.
+ //$request
+
+ // Initialize the session by passing the request as a parameter
+ $session = curl_init($request);
+
+ $this->current_call = $request;
+
+
+ // Set curl options by passing session and flags
+ // CURLOPT_HEADER allows us to receive the HTTP header
+ curl_setopt($session, CURLOPT_HEADER, true);
+
+ // CURLOPT_RETURNTRANSFER will return the response
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ // Make the request
+ $response = curl_exec($session);
+
+ // Close the curl session
+ curl_close($session);
+
+ // Confirm that the request was transmitted to the OpenMeetings! Image
Search Service
+ if(!$response) {
+ die("Request OpenMeetings! OpenMeetings Service failed and no
response was returned.");
+ }
+
+ // Create an array to store the HTTP response codes
+ $status_code = array();
+
+ // Use regular expressions to extract the code from the header
+ preg_match('/\d\d\d/', $response, $status_code);
+
+ // Check the HTTP Response code and display message if status code is
not 200 (OK)
+ switch( $status_code[0] ) {
+ case 200:
+ // Success
+ break;
+ case 503:
+ die('Your call to OpenMeetings Web Services failed and
returned an HTTP status of 503.
+ That means: Service unavailable. An internal
problem prevented us from returning'.
+ ' data to you.');
+ break;
+ case 403:
+ die('Your call to OpenMeetings Web Services failed and
returned an HTTP status of 403.
+ That means: Forbidden. You do not have permission
to access this resource, or are over'.
+ ' your rate limit.');
+ break;
+ case 400:
+ // You may want to fall through here and read the
specific XML error
+ die('Your call to OpenMeetings Web Services failed and
returned an HTTP status of 400.
+ That means: Bad request. The parameters passed to
the service did not match as expected.
+ The exact error is returned in the XML response.');
+ break;
+ default:
+ die('Your call to OpenMeetings Web Services returned an
unexpected HTTP status of: ' . $status_code[0]." Request ".$request);
+ }
+
+ // Get the XML from the response, bypassing the header
+ if (!($xml = strstr($response, '<ns'))) {
+ $xml = null;
+ }
+
+ $dom = new DOMDocument();
+ $dom->loadXML($xml);
+
+ if ($returnAttribute == "") {
+ //echo "XML".$xml."<br/>";
+ return $dom;
+ } else {
+ $returnNodeList = $dom->getElementsByTagName($returnAttribute);
+ foreach ($returnNodeList as $returnNode) {
+ return $returnNode->nodeValue;
+ }
+ }
+
+ }
+
+
+
+ function getError(){
+ return false;
+
+ }
+
+ function getErrorMessage(){
+ return "Error invokeing call ".$this->current_call;
+
+ }
+
+ function fault(){
+ return false;
+ }
+}
+
+?>
=======================================
--- /dev/null
+++ /trunk/sites/all/modules/openmeetings/openmeetings.info Thu Oct 11
02:28:28 2012
@@ -0,0 +1,30 @@
+;
+; Licensed to the Apache Software Foundation (ASF) under one
+; or more contributor license agreements. See the NOTICE file
+; distributed with this work for additional information
+; regarding copyright ownership. The ASF licenses this file
+; to you under the Apache License, Version 2.0 (the
+; "License") + you may not use this file except in compliance
+; with the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing,
+; software distributed under the License is distributed on an
+; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+; KIND, either express or implied. See the License for the
+; specific language governing permissions and limitations
+; under the License.
+;
+; $Id$
+name = OpenMeetings
+description = OpenMeetings integration module. OpenMeetings is a video
conference system.<BR>More information on <a
href="http://incubator.apache.org/openmeetings/" target="_blank">Apache
OpenMeetings [Incubating]</a>.
+core = 7.x
+
+configure = admin/config/system/openmeetings
+
+files[] = openmeetings.module
+
+package = "OpenMeetings"
+
+version = "7.x-7.7"
=======================================
--- /dev/null
+++ /trunk/sites/all/modules/openmeetings/openmeetings.install Thu Oct 11
02:28:28 2012
@@ -0,0 +1,264 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+/**
+ * @file
+ * OpenMeetings Integration Module : Installation
+ */
+
+/**
+ * Implementation of hook_install()
+ */
+function openmeetings_install() {
+
+ if (!db_table_exists('openmeetings_rooms')) {
+ drupal_install_schema('openmeetings');
+ }
+
+ node_types_rebuild();
+ $types = node_type_get_types();
+ node_add_body_field($types['openmeetings']);
+
+}
+
+/**
+ * Implementation of hook_uninstall()
+ */
+function openmeetings_uninstall() {
+ //drupal_uninstall_schema('openmeetings');
+ //db_query("DROP TABLE {openmeetings_rooms};");
+
+ if (db_table_exists('openmeetings_rooms')) {
+ db_drop_table('openmeetings_rooms');
+ }
+}
+
+/**
+ * Implementation of hook_schema()
+ *
+ * @return array of Schema API table definitions.
+ */
+function openmeetings_schema() {
+ $schema['openmeetings_rooms'] = array(
+ 'fields' => array(
+ 'rid' => array('type' => 'serial',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'description' => "Room ID",
+ ),
+ 'nid' => array('type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'description' => "Node ID",
+ ),
+ 'room_id' => array('type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'description' => "openmeetings room ID",
+ ),
+ 'roomtype_id' => array('type' => 'int',
+ 'not null' => TRUE,
+ 'description' => "openmeetings room type ID",
+ ),
+ 'room_name' => array('type' => 'text', 'not null' => FALSE,
+ // NOTE: On MySQL, text fields cannot have default values.
+ 'description' => "Room name.",
+ ),
+ 'room_comment' => array('type' => 'text', 'not null' => FALSE,
+ // NOTE: On MySQL, text fields cannot have default values.
+ 'description' => "Room comment.",
+ ),
+ 'owner_id' => array('type' => 'int',
+ 'not null' => TRUE,
+ 'description' => "openmeetings number of partizipants in this
room",
+ ),
+ 'number_of_partizipants' => array('type' => 'int',
+ 'not null' => TRUE,
+ 'description' => "openmeetings number of partizipants in this
room",
+ ),
+ 'timecreated' => array('type' => 'int', 'not null' =>
TRUE, 'default' => 0,
+ 'description' => "Created Timestamp (Unix Timestamp, which is
limited to values above Jan 1, 1970)",
+ ),
+ 'timelastaccess' => array('type' => 'int', 'not null' =>
TRUE, 'default' => 0,
+ 'description' => "Last Access Timestamp (Unix Timestamp, which is
limited to values above Jan 1, 1970)",
+ ),
+ 'timeexpire' => array('type' => 'int', 'not null' => TRUE, 'default'
=> 0,
+ 'description' => "Expiration Timestamp (Unix Timestamp, which is
limited to values above Jan 1, 1970)",
+ ),
+ 'credits' => array('type' => 'int', 'not null' => TRUE, 'default' =>
0,
+ 'description' => "Available time in minutes",
+ ),
+ 'timeused' => array('type' => 'int', 'size' => 'big', 'not null' =>
TRUE, 'default' => 0,
+ 'description' => "How long was this used for",
+ ),
+ 'file_delete' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'is_public' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'appointment' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'is_moderated_room' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'demo' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'allowUserQuestions' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'isAudioOnly' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'allowRecording' => array(
+ 'description' => 'Setting parameters',
+ 'type' => 'int',
+ 'size' => "tiny",
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'indexes' => array(
+ 'timelastaccess' => array('timelastaccess'),
+ 'room_id' => array('room_id'),
+ 'rid' => array('rid'),
+ ),
+ 'primary key' => array('rid'),
+ );
+
+ return $schema;
+}
+
+/**
+ * Implementation of hook_requirements().
+ */
+function openmeetings_requirements($phase) {
+ $requirements = array();
+
+
+ return $requirements;
+}
+
+/**
+ * Implementation of hook_enable().
+ */
+function openmeetings_enable() {
+
+ // Set default role_permissions.
+ /*
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', access
openmeetings room') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', access
openmeetings room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', create
openmeetings room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
openmeetings room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', delete
openmeetings room') WHERE rid = '2';");
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
room_comment') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
roomtype_id') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
number_of_partizipants') WHERE rid = '2';");
+
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
is_public') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
appointment') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
is_moderated_room') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', edit
room_id') WHERE rid = '2';");
+
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use room')
WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
room_comment') WHERE rid = '2';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
roomtype_id') WHERE rid = '2';");
+
+
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
number_of_partizipants') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
is_public') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
appointment') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
is_moderated_room') WHERE rid = '1';");
+ db_query("UPDATE {role_permission} SET perm = concat(perm, ', use
room_id') WHERE rid = '1';");
+ */
+ /*
+ db_update('role_permission')
+ ->fields(array('permission' => 'access openmeetings room'))
+ ->condition('rid', 1)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'access openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'create openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'edit openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+
+ db_update('role_permission')
+ ->fields(array('permission' => 'delete openmeetings room'))
+ ->condition('rid', 2)
+ ->execute();
+ */
+
+ //drupal_flush_all_caches();
+ node_types_rebuild();
+ // node_menu() defines menu items based on node types so it needs to come
+ // after node types are rebuilt.
+ menu_rebuild();
+}
=======================================
--- /dev/null
+++ /trunk/sites/all/modules/openmeetings/openmeetings.module Thu Oct 11
02:28:28 2012
@@ -0,0 +1,1051 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+/**
+ * @file
+ * OpenMeetins Integration Module
+ */
+
+/*******************************************************************************
+ * Hook Functions (Drupal)
+
******************************************************************************/
+
+/**
+ * Display help and module information
+ *
+ * @param path which path of the site we're displaying help
+ * @param arg array that holds the current path as would be returned from
arg() function
+ *
+ * @return help text for the path
+ */
+function openmeetings_help($path, $arg) {
+
+ switch ($path) {
+ case 'admin/settings/admin_menu' :
+ return t('The administration menu module provides a dropdown menu
arranged for one- or two-click access to most administrative tasks and
other common destinations (to users with the proper permissions). Use the
settings below to customize the appearance of the menu.');
+
+ case 'admin/help#openmeetings' :
+ $output = '<p>' . t("Video Conference Script integration module
details, installation instructions, updates") . ': <a
href="http://incubator.apache.org/openmeetings/">http://incubator.apache.org/openmeetings/</a></p>';
+
+ return $output;
+ }
+
+ //return $output;
+}
+
+/**
+ * Valid permissions for this module
+ *
+ * @return array An array of valid permissions for the openmeetings_module
module
+ */
+function openmeetings_permission() {
+
+ return array (
+ 'administer openmeetings' => array (
+ 'title' => t('administer openmeetings'),
+ 'description' => t('administer openmeetings.'),
+
+ ),
+ 'create openmeetings room' => array (
+ 'title' => t('create openmeetings room'),
+ 'description' => t('create openmeetings room.'),
+
+ ),
+ 'edit openmeetings room' => array (
+ 'title' => t('edit openmeetings room'),
+ 'description' => t('edit openmeetings room.'),
+
+ ),
+ 'edit any openmeetings room' => array (
+ 'title' => t('edit any openmeetings room'),
+ 'description' => t('edit any openmeetings room.'),
+
+ ),
+ 'edit any openmeetings room' => array (
+ 'title' => t('Flush caches'),
+ 'description' => t('Access links to flush caches in the administration
menu.'),
+
+ ),
+ 'delete any openmeetings room' => array (
+ 'title' => t('delete any openmeetings room'),
+ 'description' => t('delete any openmeetings room.'),
+
+ ),
+ 'access openmeetings room' => array (
+ 'title' => t('access openmeetings room'),
+ 'description' => t('access openmeetings room.'),
+
+ ),
+ 'edit openmeetings_url' => array (
+ 'title' => t('edit openmeetings_url'),
+ 'description' => t('edit openmeetings_url.'),
+
+ ),
+ 'edit openmeetings_port' => array (
+ 'title' => t('edit openmeetings_port'),
+ 'description' => t('edit openmeetings_port.'),
+
+ ),
+ 'access openmeetings room' => array (
+ 'title' => t('access openmeetings room'),
+ 'description' => t('access openmeetings room.'),
+
+ ),
+
+ 'edit openmeetings_username' => array (
+ 'title' => t('edit openmeetings_username'),
+ 'description' => t('edit openmeetings_username.'),
+
+ ),
+ 'edit openmeetings_password' => array (
+ 'title' => t('edit openmeetings_port'),
+ 'description' => t('edit openmeetings_password.'),
+
+ ),
+
+ 'edit room' => array (
+ 'title' => t('edit room'),
+ 'description' => t('edit room.'),
+
+ ),
+ 'edit room_comment' => array (
+ 'title' => t('edit room_comment'),
+ 'description' => t('edit room_comment.'),
+
+ ),
+ 'edit roomtype_id' => array (
+ 'title' => t('edit roomtype_id'),
+ 'description' => t('edit roomtype_id.'),
+
+ ),
+ 'edit number_of_partizipants' => array (
+ 'title' => t('edit number_of_partizipants'),
+ 'description' => t('edit number_of_partizipants.'),
+
+ ),
+ 'edit allowUserQuestions' => array (
+ 'title' => t('edit allowUserQuestions'),
+ 'description' => t('edit allowUserQuestions.'),
+
+ ),
+
+
+ );
+}
+
+/**
+ * Menu for this module
+ *
+ * @return array An array with this module's menus.
+ */
+function openmeetings_menu() {
+
+ $items = array ();
+
+ $items['admin/config/system/openmeetings'] = array (
+ 'title' => 'OpenMeetings',
+ 'description' => 'OpenMeetings admin interface.',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array (
+ 'openmeetings_admin'
+ ),
+ 'access arguments' => array (
+ 'administer openmeetings'
+ ),
+ 'type' => MENU_NORMAL_ITEM,
+
+ );
+
+ $items['myopenmeetings'] = array (
+ 'title' => 'OpenMeetings Rooms',
+ 'description' => 'My openmeetings rooms.',
+ 'page callback' => 'openmeetings_roomlist',
+ 'access arguments' => array (
+ 'edit openmeetings room'
+ ),
+ 'type' => MENU_NORMAL_ITEM,
+
+ );
+
+ return $items;
+
+}
+
+/**
+ * Room list page
+ *
+ * @return page contents.
+ */
+function openmeetings_roomlist() {
+ global $user;
+
+ $page_content = "";
+
+ $options = array (
+ "attributes" => array (
+ "title" => "",
+ 'target' => '_blank'
+ )
+ );
+
+ $myrooms = db_query("SELECT room.room_id, node.title, node.nid FROM
{openmeetings_rooms} as room, " .
+ "{node} as node WHERE node.uid=:uid AND room.nid = node.nid ORDER BY
room.timelastaccess DESC", array (
+ ':uid' => $user->uid
+ ));
+
+ if ($myrooms !== FALSE) {
+ $page_content .= "<UL>";
+ foreach ($myrooms as $row) {
+ //print_r($row);
+ // $link = l("$row[title] ($row[room])", "node/$row[nid]", $options);
+ $link = l("$row->title", "node/$row->nid", $options);
+ $page_content .= "<LI>$link</LI>";
+ }
+ $page_content .= "</UL>";
+ }
+
+ $link = l(t('Add New Room'), "node/add/openmeetings", $options);
+ $page_content .= "<BR><h3>$link</h3>";
+ return $page_content;
+}
+
+/**
+ * Room login form
+ *
+ * @return form an array of form data.
+ */
+function openmeetings_start_form($form_state, $node) {
+ global $base_url, $user, $language;
+ require_once 'openmeetings_gateway.php';
+
+ $path = drupal_get_path('module', 'openmeetings');
+
+ $url = $base_url . "/" . $path . "/openmeetings_conference.php";
+
+ $url_server = variable_get('openmeetings_url', 'localhost');
+ $url_port = variable_get('openmeetings_port', '5080');
+ $webapp_name = variable_get('openmeetings_webapp_name', 'openmeetings');
+ $room_id = $node['build_info']['args'][0]->room->room_id;
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ //room creator is moderator
+ if ($node['build_info']['args'][0]->uid == $user->uid) {
+ $becomemoderator = 1;
+ } else {
+ $becomemoderator = 0;
+ }
+
+ $allowRecording = $node['build_info']['args'][0]->room->allowRecording;
+
+ //test if user is logined
+ if (!in_array("anonymous user", $user->roles)) {
+ $roomhash =
$openmeetings_gateway->openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($user->name,
$user->name, '', $user->picture, $user->mail, $user->uid, $user->roles[2],
$room_id, $becomemoderator, $allowRecording);
+ } else {
+ $roomhash =
$openmeetings_gateway->openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag('anonymous
user', 'anonymous user', '', 'anonymous user', 'anonymous user',
$user->uid, $user->roles[1], $room_id, $becomemoderator, $allowRecording);
+ }
+
+ if ($language->language == 'en') {
+ $om_laguage_id = 1;
+ } else if ($language->language == 'de') {
+ $om_laguage_id = 2;
+ } else if ($language->language == 'fr') {
+ $om_laguage_id = 4;
+ } else if ($language->language == 'it') {
+ $om_laguage_id = 5;
+ } else if ($language->language == 'pt') {
+ $om_laguage_id = 6;
+ } else if ($language->language == 'es') {
+ $om_laguage_id = 8;
+ } else if ($language->language == 'ru') {
+ $om_laguage_id = 9;
+ } else if ($language->language == 'swedish') {
+ $om_laguage_id = 10;
+ } else if ($language->language == 'default') {
+ $om_laguage_id = 1;
+ } else if ($language->language == 'ko-KR') {
+ $om_laguage_id = 13;
+ } else if ($language->language == 'ar-AA') {
+ $om_laguage_id = 13;
+ } else if ($language->language == 'ua-UA') {
+ $om_laguage_id = 18;
+ } else if ($language->language == 'persian') {
+ $om_laguage_id = 20;
+ } else if ($language->language == 'nl-NL') {
+ $om_laguage_id = 26;
+ } else if ($language->language == 'ca-ES') {
+ $om_laguage_id = 28;
+ } else if ($language->language == 'da-DK') {
+ $om_laguage_id = 30;
+ } else {
+ $om_laguage_id = 1;
+ }
+
+
+
+ if (!empty ($roomhash)) {
+
+ $swfurl = "http://" . $url_server . ":" . $url_port . "/" .
$webapp_name . "/?" .
+ "scopeRoomId=" . $room_id .
+ "&secureHash=" . $roomhash .
+ "&language=" . $om_laguage_id;
+
+ }
+ }
+
+ $form['swfurl'] = array (
+ '#type' => 'hidden',
+ '#value' => check_plain($swfurl)
+ );
+ $form['#action'] = $url;
+ $form['#attributes'] = array (
+ 'enctype' => "multipart/form-data"
+ );
+ $form['submit'] = array (
+ '#type' => 'submit',
+ '#value' => t('Enter Conference Room'),
+
+ );
+ return $form;
+}
+
+/**
+ * Rooms cleanup
+ */
+function openmeetings_cleanup() {
+ //cleanup
+ $ztime = time();
+ db_query("DELETE FROM {openmeetings_rooms} WHERE ((timeexpire>0) AND
(timeexpire<$ztime))");
+}
+
+/**
+ * Admin page
+ *
+ * @return page contents.
+ */
+function openmeetings_admin() {
+ $form = array ();
+
+ $form['openmeetings_url'] = array (
+ '#type' => 'textfield',
+ '#title' => t('OpenMeetings URL'),
+ '#default_value' => variable_get('openmeetings_url', "localhost"),
+ '#size' => 48,
+ '#maxlength' => 255,
+ '#description' => t('OpenMeetings URL'),
+ '#required' => TRUE,
+
+ );
+
+ $form['openmeetings_port'] = array (
+ '#type' => 'textfield',
+ '#title' => t('OpenMeetings Port'),
+ '#default_value' => variable_get('openmeetings_port', "5080"),
+ '#size' => 48,
+ '#maxlength' => 10,
+ '#description' => t("OpenMeetigs Port"),
+ '#required' => TRUE,
+
+ );
+
+ $form['openmeetings_username'] = array (
+ '#type' => 'textfield',
+ '#title' => t('Username'),
+ '#default_value' => variable_get('openmeetings_username', "admin"),
+ '#size' => 24,
+ '#maxlength' => 48,
+ '#description' => t("OpenMeetings admin username."),
+ '#required' => TRUE,
+
+ );
+
+ $form['openmeetings_password'] = array (
+ '#type' => 'password',
+ '#title' => t('Password'),
+ '#default_value' => variable_get('openmeetings_password', "admin"),
+ '#size' => 48,
+ '#maxlength' => 48,
+ '#description' => t("Admin Password."),
+ '#required' => TRUE,
+
+ );
+
+ return system_settings_form($form);
+}
+
+function openmeetings_node_info() {
+ return array (
+ 'openmeetings' => array (
+ 'name' => t('OpenMeetings Room'),
+ 'base' => 'openmeetings',
+ 'description' => t("A <i>room</i> that can be used for customized video
conference."),
+ 'has_title' => TRUE,
+ 'title_label' => t('Video Conference'),
+ 'has_body' => TRUE,
+ 'body_label' => t('Room Description'),
+
+ ),
+
+ );
+}
+
+function openmeetings_node_access($op, $node, $account) {
+
+ if ($op == 'access') {
+ return user_access('access openmeetings room', $account);
+ }
+
+ if ($op == 'create') {
+ return user_access('create openmeetings room', $account);
+ }
+
+ if ($op == 'update') {
+ if (user_access('edit any openmeetings room', $account) ||
(user_access('edit openmeetings room', $account) && ($account->uid ==
$node->uid))) {
+ return TRUE;
+ }
+ }
+
+ if ($op == 'delete') {
+ if (user_access('delete any openmeetings room', $account) ||
(user_access('delete openmeetings room', $account) && ($account->uid ==
$node->uid))) {
+ return TRUE;
+ }
+ }
+}
+
+/**
+ * Implementation of hook_form().
+ */
+function openmeetings_form(& $node) {
+ // The site admin can decide if this node type has a title and body, and
how
+ // the fields should be labeled. We need to load these settings so we can
+ // build the node form correctly.
+ global $user;
+ // $type = node_get_types('type', $node);
+
+ $node->room = null;
+
+ if (isset($node->vid)) {
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $node->vid
+ ));
+
+ foreach($additions as $room) {
+ $node->room = $room;
+ }
+ }
+
+
+ $type = _node_types_build()->types;
+
+ $form['title'] = array (
+ '#type' => 'textfield',
+ '#title' => check_plain($type['openmeetings']->title_label),
+ '#required' => TRUE,
+ '#default_value' => $node->title,
+ '#weight' => -5,
+
+ );
+ //}
+
+ //if ($type->has_body) {
+ // In Drupal 6, we can use node_body_field() to get the body and filter
+ // elements. This replaces the old textarea + filter_form() method of
+ // setting this up. It will also ensure the teaser splitter gets set up
+ // properly.
+ //$form['body_field'] = node_body_field($node, $type->body_label,
$type->min_word_count);
+
+ // add the body field to the content type
+ //node_add_body_field($type, 'body');
+
+ //}
+
+ $form['room_name'] = array (
+ '#type' => 'textfield',
+ '#title' => t('New room name'),
+ '#default_value' => isset ($node->room->room_name) ?
$node->room->room_name :
variable_get('openmeetings_room_prefix2', 'NewRoom'),
+ '#size' => 32,
+ '#maxlength' => 64,
+ '#description' => t("Label that will be used to access the room. Leave
as it is to generate one."),
+
+ );
+
+ if (user_access('edit room_comment', $user)) {
+ $form['room_comment'] = array (
+ '#type' => 'textarea',
+ '#title' => t('Room comments'),
+ '#default_value' => isset ($node->room->room_comment) ?
$node->room->room_comment : '',
+ '#cols' => 32,
+ '#rows' => 2,
+ '#description' => t("Room comments."),
+
+ );
+ } else {
+ $form['room_comment'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->room_comment) ?
$node->room->room_comment : '',
+
+ );
+ }
+
+ if (user_access('edit roomtype_id', $user)) {
+ $options = array (
+ "1" => "Conference (max 20 Users recommended, Democratic)",
+ "3" => "Webinar (max 150 Users recommended, Moderated)",
+ "4" => "Interview (Only 2 Users, no Whiteboard, Record Audio/Video,
Moderated)"
+ );
+ $form['roomtype_id'] = array (
+ '#type' => 'select',
+ '#title' => t('Roomtype'),
+ '#default_value' => isset ($node->room->roomtype_id) ?
$node->room->roomtype_id : 1,
+ '#options' => $options,
+ '#description' => t('Roomtype'),
+
+ );
+ } else {
+ $form['roomtype_id'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->roomtype_id) ?
$node->room->roomtype_id : 1,
+
+ );
+ }
+
+ if (user_access('edit number_of_partizipants', $user)) {
+ $form['number_of_partizipants'] = array (
+ '#type' => 'textfield',
+ '#title' => t('Number of partizipants'),
+ '#default_value' => isset ($node->room->number_of_partizipants) ?
$node->room->number_of_partizipants : 12,
+ '#size' => 2,
+ '#maxlength' => 3,
+ '#description' => t("The maximum users allowed in this room."),
+
+ );
+ } else {
+ $form['number_of_partizipants'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->number_of_partizipants) ?
$node->room->number_of_partizipants : 12,
+
+ );
+ }
+
+ if (user_access('edit is_public', $user)) {
+
+ //the "ispublic" flag has no effect to the drupal integration,
+ //integrated rooms should always have the flag set to false/0
+
+// $options = array (
+// "1" => t('Yes'),
+// "0" => t('No')
+// );
+// $form['is_public'] = array (
+// '#type' => 'select',
+// '#title' => t('Public Room'),
+// '#default_value' => isset ($node->room->is_public) ?
$node->room->is_public : "1",
+// '#options' => $options,
+// '#description' => t('If this room is public, it will appear in the
frontend for everybody.'),
+//
+// );
+
+ $form['is_public'] = array (
+ '#type' => 'hidden',
+ '#default_value' => 0,
+
+ );
+
+ } else {
+ $form['is_public'] = array (
+ '#type' => 'hidden',
+ '#default_value' => 0,
+
+ );
+ }
+
+ if (user_access('edit appointment', $user)) {
+ $form['appointment'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->appointment) ?
$node->room->appointment : "0",
+
+ );
+ } else {
+ $form['appointment'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->appointment) ?
$node->room->appointment : "0",
+
+ );
+ }
+
+ if (user_access('edit is_moderated_room', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['is_moderated_room'] = array (
+ '#type' => 'select',
+ '#title' => t('Moderated Room'),
+ '#default_value' => isset ($node->room->is_moderated_room) ?
$node->room->is_moderated_room : "1",
+ '#options' => $options,
+ '#description' => t('Users have to wait untill a Moderator arrives.'),
+
+ );
+ } else {
+ $form['is_moderated_room'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->is_moderated_room) ?
$node->room->is_moderated_room : "1",
+
+ );
+ }
+
+ if (user_access('edit isAudioOnly', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['isAudioOnly'] = array (
+ '#type' => 'select',
+ '#title' => t('Is Audio Only'),
+ '#default_value' => isset ($node->room->isAudioOnly) ?
$node->room->isAudioOnly : "0",
+ '#options' => $options,
+ '#description' => t('Is Audio Only.'),
+
+ );
+ } else {
+ $form['isAudioOnly'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->isAudioOnly) ?
$node->room->isAudioOnly : "1",
+
+ );
+ }
+
+ if (user_access('edit allowUserQuestions', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['allowUserQuestions'] = array (
+ '#type' => 'select',
+ '#title' => t('Allow User Questions'),
+ '#default_value' => isset ($node->room->allowUserQuestions) ?
$node->room->allowUserQuestions : "1",
+ '#options' => $options,
+ '#description' => t('Allow users to ask questions.'),
+
+ );
+ } else {
+ $form['allowUserQuestions'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->allowUserQuestions) ?
$node->room->allowUserQuestions : "1",
+
+ );
+ }
+
+ if (user_access('edit allowRecording', $user)) {
+ $options = array (
+ "1" => t('Yes'),
+ "0" => t('No')
+ );
+ $form['allowRecording'] = array (
+ '#type' => 'select',
+ '#title' => t('Allow Recording'),
+ '#default_value' => isset ($node->room->allowRecording) ?
$node->room->allowRecording : "1",
+ '#options' => $options,
+ '#description' => t('Allow Recording.'),
+
+ );
+ } else {
+ $form['allowRecording'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room->allowRecording) ?
$node->room->allowRecording : "1",
+
+ );
+ }
+
+ if (user_access('edit room_id', $user)) {
+ $form['room_id'] = array (
+ '#type' => 'hidden',
+ '#title' => t('room_id'),
+ '#default_value' => isset ($node->room_id) ? $node->room_id : "0",
+ '#size' => 6,
+ '#maxlength' => 6,
+ '#description' => t("Room id."),
+
+ );
+ } else {
+ $form['room_id'] = array (
+ '#type' => 'hidden',
+ '#default_value' => isset ($node->room_id) ? $node->room_id : "0",
+
+ );
+ }
+
+ return $form;
+}
+
+/**
+ * Implementation of hook_form_FORM_ID_alter().
+ *
+ */
+function openmeetings_form_openmeetings_node_form_alter(& $form,
$form_state) {
+
+ //$form['options']['promote']['#disabled'] = FALSE;
+ //$form['options']['promote']['#default_value'] = 0;
+ //$form['options']['promote']['#value'] = 1;
+}
+
+/**
+ * Implementation of hook_delete().
+ */
+function openmeetings_delete($node) {
+ global $user;
+ $path = drupal_get_path('module', 'openmeetings');
+ require_once ("./$path/openmeetingsRoomManagament.php");
+ // Notice that we're matching all revision, by using the node's nid.
+ if (user_access('delete openmeetings room', $user)) {
+
+ //$data['room_id'] = $node->room->room_id;
+
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $node->nid
+ ));
+
+ $data['room_id'] = -1;
+
+ foreach ($additions as $record) {
+ $data['room_id'] = $record->room_id;
+ }
+
+ $omRoomManagament = new openmeetingsRoomManagament();
+ $room_id = $omRoomManagament->deleteRoom($data);
+
+
+ //Currently the openmeetings API does not return a positive value
+ //if the SOAP/REST user that invokes the call "deleteRecording"
+ //if ($room_id > 0) {
+ if (true) {
+ //db_query('DELETE FROM {openmeetings_rooms} WHERE nid = %d',
$node->nid);
+
+ db_delete('openmeetings_rooms')->condition('nid',
$node->nid)->execute();
+ } else {
+
+ drupal_set_message(t('Could not login User to OpenMeetings, check your
OpenMeetings Module Configuration [1] '), 'error');
+ }
+ }
+}
+
+/**
+ * Implementation of hook_insert().
+ */
+function openmeetings_insert($node) {
+
+ global $user;
+ $path = drupal_get_path('module', 'openmeetings');
+ require_once ("./$path/openmeetingsRoomManagament.php");
+
+ $room_name = check_plain($node->room_name);
+ if ($room_name == variable_get('openmeetings_room_prefix2', 'NewRoom')) {
+ $room_name =
variable_get('openmeetings_room_prefix2', 'NewRoom') . "_" .
base_convert((time() - 1225500000) . rand(0, 10), 10, 36);
+ }
+
+ $ztime = time();
+
+ $data['name'] = $node->room_name;
+ $data['roomtype_id'] = $node->roomtype_id;
+ $data['comment'] = $node->room_comment;
+ $data['number_of_partizipants'] = $node->number_of_partizipants;
+ $data['is_public'] = $node->is_public;
+ $data['isDemoRoom'] = 0;
+ $data['isAudioOnly'] = $node->isAudioOnly;
+ $data['allowUserQuestions'] = $node->allowUserQuestions;
+ $data['demoTime'] = "";
+ $data['is_moderated_room'] = $node->is_moderated_room;
+
+ $omRoomManagament = new openmeetingsRoomManagament();
+ $room_id = $omRoomManagament->createMyRoomWithMod($data);
+
+ //Make sure the Openmeetings Room was succsefully created
+
+ if ($room_id > 0) {
+ $expiration = 0;
+
+ db_insert('openmeetings_rooms')->fields(array (
+ 'nid' => $node->nid,
+ 'room_id' => $room_id,
+ 'roomtype_id' => $node->roomtype_id,
+ 'room_name' => $node->room_name,
+ 'room_comment' => $node->room_comment,
+ 'owner_id' => $user->uid,
+ 'number_of_partizipants' => $node->number_of_partizipants,
+ 'timecreated' => $ztime,
+ 'timelastaccess' => $ztime,
+ 'timeexpire' => $expiration,
+ 'credits' => 0,
+ 'timeused' => 0,
+ 'file_delete' => 0,
+ 'is_public' => $node->is_public,
+ 'appointment' => 0,
+ 'is_moderated_room' => $node->is_moderated_room,
+ 'allowRecording' => $node->allowRecording,
+ 'isAudioOnly' => $node->isAudioOnly,
+ 'allowUserQuestions' => $node->allowUserQuestions,
+ 'demo' => 0,
+
+ ))->execute();
+
+ $options = array (
+ "attributes" => array (
+ "title" => $node->room_name,
+ 'target' => '_blank'
+ )
+ );
+ $link = l($room_name, "node/" . $node->nid, $options);
+ //drupal_set_message(t('Use this link to access this Video Conference
room and invite the other participant: ') . "<BR>" . $link);
+ } else {
+
+ drupal_set_message(t('Could not login User to OpenMeetings, check your
OpenMeetings Module Configuration [2] '), 'error');
+ }
+
+}
+
+/**
+ * Implementation of hook_update().
+ */
+function openmeetings_update($node) {
+ global $user;
+ $path = drupal_get_path('module', 'openmeetings');
+ require_once ("./$path/openmeetingsRoomManagament.php");
+ // if this is a new node or we're adding a new revision,
+ if ($node->revision) {
+ openmeetings_insert($node);
+ } else {
+
+ //print_r($node);
+ //die("UDPATE");
+
+ $room_name = check_plain($node->room_name);
+ if ($room_name == variable_get('openmeetings_room_prefix2', 'NewRoom')) {
+ $room_name =
variable_get('openmeetings_room_prefix2', 'NewRoom') . "_" .
base_convert((time() - 1225500000) . rand(0, 10), 10, 36);
+ }
+
+ $data = array();
+
+ $data['room_id'] = $node->room->room_id;
+ $data['name'] = $node->room_name;
+ $data['roomtype_id'] = $node->roomtype_id;
+ $data['comment'] = $node->room_comment;
+ $data['number_of_partizipants'] = $node->number_of_partizipants;
+ $data['is_public'] = $node->is_public;
+ $data['appointment'] = $node->appointment;
+ $data['isDemoRoom'] = 0;
+ $data['demoTime'] = "";
+ $data['isAudioOnly'] = $node->isAudioOnly;
+ $data['is_moderated_room'] = $node->is_moderated_room;
+ $data['allowUserQuestions'] = $node->allowUserQuestions;
+
+ $omRoomManagament = new openmeetingsRoomManagament();
+ $room_id =
$omRoomManagament->updateRoomWithModerationAndQuestions($data);
+
+ if ($room_id > 0) {
+
+ db_update('openmeetings_rooms')->fields(array (
+ 'nid' => $node->nid,
+ 'room_id' => $room_id,
+ 'roomtype_id' => $node->roomtype_id,
+ 'room_name' => $node->room_name,
+ 'room_comment' => $node->room_comment,
+ 'owner_id' => $user->uid,
+ 'number_of_partizipants' => $node->number_of_partizipants,
+ //'timecreated' => $ztime,
+ //'timelastaccess' => $ztime,
+ //'timeexpire' => $expiration,
+ 'credits' => 0,
+ 'timeused' => 0,
+ 'file_delete' => 0,
+ 'is_public' => 0,
+ 'appointment' => 0,
+ 'is_moderated_room' => $node->is_moderated_room,
+ 'allowRecording' => $node->allowRecording,
+ 'isAudioOnly' => $node->isAudioOnly,
+ 'allowUserQuestions' => $node->allowUserQuestions,
+ 'demo' => 0,
+
+ ))->condition('nid', $node->nid)->execute();
+
+ } else {
+
+ drupal_set_message(t('Could not login User to OpenMeetings, check your
OpenMeetings Module Configuration [3] '), 'error');
+ }
+
+ }
+}
+
+/**
+ * Implementation of hook_load().
+ */
+function openmeetings_load($node) {
+
+ foreach ($node as $nod) {
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $nod->nid
+ ));
+ }
+
+// foreach ($node as $record) {
+//
+// $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+// ':nid' => $record->nid
+// ));
+//
+// print_r($record->nid);
+// echo "<br/>";
+// print_r($record);
+// echo "<br/>";
+// print_r($additions);
+// echo "<br/>";
+//
+// foreach($additions as $room){
+// print_r($room);
+// }
+//
+//
+// foreach($additions as $room){
+// $node[$room->nid]->room = $room;
+// }
+//
+// }
+//
+// //die ("<h2> Room ? </h2>");
+
+ return $additions;
+}
+
+/**
+ * Implementation of hook_view().
+ */
+function openmeetings_view($node, $view_mode) {
+ global $user;
+
+ if ($view_mode != "teaser") {
+
+ $additions = db_query('SELECT * FROM {openmeetings_rooms} WHERE nid
= :nid', array (
+ ':nid' => $node->vid
+ ));
+
+ $node->room = null;
+
+ foreach($additions as $room) {
+ $node->room = $room;
+ }
+
+ $disabled_content = "";
+ $room_access = 1;
+ $myrooms = false;
+ if ($node->room != null) {
+
+ $myrooms = db_query("SELECT * FROM {openmeetings_rooms} WHERE
room_id=:room_id", array (
+ ':room_id' => $node->room->room_id
+ ));
+
+ if ($myrooms !== FALSE) {
+
+ if (USER_REGISTER_VISITORS && empty ($user->name)) {
+ $room_access = 0;
+
+ }
+ } else {
+ $disabled_content = t('Room not found ');
+ }
+
+ if (!$room_access && !$disabled_content) {
+ $disabled_content .= t('Instant access to visitors is disabled. You
need to be registered and logged into this website to access conference
rooms.');
+ }
+
+ //$options = array("attributes" => array("title" =>
$node->room_id, 'target' => '_blank'));
+ //$link = l($node->room_name, "node/". $node->nid, $options);
+ // $access_content = "<BR>". t('Use this link to access this Video
Conference room and invite the other participant: ') ."<BR>". $link;
+
+ if ($node->room->roomtype_id == 1) {
+ $room_type_name = t('Conference');
+ } else if ($node->room->roomtype_id == 2) {
+ $room_type_name = t('Audience');
+ } else if ($node->room->roomtype_id == 3) {
+ $room_type_name = t('Restricted');
+ } else if ($node->room->roomtype_id == 4) {
+ $room_type_name = t('Interview');
+ } else if ($node->room->roomtype_id == 5) {
+ $room_type_name = t('Custom');
+ }
+
+ $stats_content = "";
+
+ $stats_content .= t('Room name') . ": " .
$node->room->room_name . "<BR>" . t('Room comments') . ": " .
$node->room->room_comment . "<BR>" . t('Room type') . ": " .
$room_type_name . "<BR>" . t('Number of partizipants') . ": " .
$node->room->number_of_partizipants;
+
+ }
+ //$body_text = "<BR>" .
$stats_content."<BR><BR>".drupal_render($my_temp_variable =
drupal_get_form('openmeetings_start_form', $node));
+
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /trunk/sites/all/modules/openmeetings/openmeetingsRoomManagament.php
Thu Oct 11 02:28:28 2012
@@ -0,0 +1,112 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+require_once("openmeetings_gateway.php");
+
+
+class openmeetingsRoomManagament {
+
+
+ function createMyRoomWithMod($data) {
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ $openmeetings = new stdClass;
+
+ $openmeetings->name = $data['name'];
+ $openmeetings->roomtypes_id = $data['roomtype_id'];
+ $openmeetings->comment = $data['comment'];
+ $openmeetings->numberOfPartizipants = $data['number_of_partizipants'];
+ $openmeetings->ispublic = $data['is_public'];
+ $openmeetings->isAudioOnly = $data['isAudioOnly'];
+ $openmeetings->allowUserQuestions = $data['allowUserQuestions'];
+ $openmeetings->isDemoRoom = 0;
+ $openmeetings->demoTime = "";
+ $openmeetings->isModeratedRoom = $data['is_moderated_room'];
+
+ $roomid =
$openmeetings_gateway->openmeetings_createRoomWithModAndTypeAndAudioOption($openmeetings);
+
+ return $roomid;
+
+ } else {
+ echo "Could not login User to OpenMeetings, check your OpenMeetings
Module Configuration [4]";
+ }
+ }
+
+ function updateRoomWithModerationAndQuestions($data) {
+
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ $openmeetings = new stdClass;
+
+ $openmeetings->name = $data['name'];
+ $openmeetings->room_id = $data['room_id'];
+ $openmeetings->roomtypes_id = $data['roomtype_id'];
+ $openmeetings->comment = $data['comment'];
+ $openmeetings->numberOfPartizipants = $data['number_of_partizipants'];
+ $openmeetings->ispublic = $data['is_public'];
+ $openmeetings->appointment = $data['appointment'];
+ $openmeetings->isDemoRoom = 0;
+ $openmeetings->demoTime = "";
+ $openmeetings->isModeratedRoom = $data['is_moderated_room'];
+ $openmeetings->isAudioOnly = $data['isAudioOnly'];
+ $openmeetings->allowUserQuestions = $data['allowUserQuestions'];
+
+ $roomid =
$openmeetings_gateway->openmeetings_updateRoomWithModerationAndQuestions($openmeetings);
+
+ return $roomid;
+
+ } else {
+ echo "Could not login User to OpenMeetings, check your OpenMeetings
Module Configuration [7]";
+
+ }
+ }
+
+ function deleteRoom ($data){
+
+ $openmeetings_gateway = new openmeetings_gateway();
+ if ($openmeetings_gateway->openmeetings_loginuser()) {
+
+ $openmeetings = new stdClass;
+
+ $openmeetings->room_id = $data['room_id'];
+ if ($openmeetings->room_id > 0) {
+ $roomid = $openmeetings_gateway->deleteRoom($openmeetings);
+ return $roomid;
+ } else {
+ return -1;
+ }
+
+ } else {
+ echo "Could not login User to OpenMeetings, check your OpenMeetings
Module Configuration [8]";
+
+ }
+
+
+ }
+
+
+}
+
+
+?>
=======================================
--- /dev/null
+++ /trunk/sites/all/modules/openmeetings/openmeetings_conference.php Thu
Oct 11 02:28:28 2012
@@ -0,0 +1,35 @@
+<?
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"></head>
+<body bgcolor="#5a5152" text="#333333" link="#FF3366" LEFTMARGIN="0"
TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
+<?
+
+
+$swfurl = $_POST["swfurl"];
+
+?>
+<iframe src="<?=$swfurl?>" width="100%" height="100%">
+<p align="center"><strong>This content requires the Adobe Flash Player:
+ <a href="http://www.macromedia.com/go/getflash/">Get
Flash</a></strong>!</p>
+</iframe>
+<?
=======================================
--- /dev/null
+++ /trunk/sites/all/modules/openmeetings/openmeetings_gateway.php Thu Oct
11 02:28:28 2012
@@ -0,0 +1,449 @@
+<?php
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") + you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+require_once('lib/openmeetings_rest_service.php');
+
+class openmeetings_gateway {
+
+ var $session_id = "";
+ var $url_server;
+ var $url_port;
+ var $webapp_name;
+ var $moduleKey;
+ var $username;
+ var $password;
+
+ function getUrl() {
+ $this->url_server = variable_get("openmeetings_url", "localhost");
+ $this->url_port = variable_get("openmeetings_port", "5080");
+ $this->username = variable_get('openmeetings_username', 'admin');
+ $this->password = variable_get('openmeetings_password', 'red5test');
+ $this->webapp_name = "openmeetings";
+ $this->moduleKey = "drupal";
+ //FIXME protocol should be added
+ $port = $this->url_port == 80 ? "" : ":" . $this->url_port;
+ return "http://" . $this->url_server . $port . "/" . $this->webapp_name;
+ }
+
+ function var_to_str($in)
+ {
+ if(is_bool($in))
+ {
+ if($in)
+ return "true";
+ else
+ return "false";
+ }
+ else
+ return $in;
+ }
+
+
+ /**
+ * TODO: Get Error Service and show detailed Error Message
+ */
+
+ function openmeetings_loginuser() {
+ global $CFG;
+
+ $restService = new openmeetings_rest_service();
+
+ $response =
$restService->call($this->getUrl()."/services/UserService/getSession","session_id");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Error</h2><pre>' . $err . '</pre>';
+ } else {
+ $this->session_id = $response;
+
+ $result =
$restService->call($this->getUrl()."/services/UserService/loginUser?"
+ . "SID=".$this->session_id
+ . "&username=" . urlencode($this->username)
+ . "&userpass=" . urlencode($this->password)
+ );
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($result); echo '</pre>';
+ } else {
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Error</h2><pre>' . $err . '</pre>';
+ } else {
+ $returnValue = $result;
+ }
+ }
+ }
+ }
+
+ if ($returnValue>0){
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+ function openmeetings_updateRoomWithModeration($openmeetings) {
+
+ $restService = new openmeetings_rest_service();
+ //echo $restService."<br/>";
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+ $course_name
= 'MOODLE_COURSE_ID_'.$openmeetings->course.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = false;
+ if ($openmeetings->isModeratedRoom == 1) {
+ $isModeratedRoom = true;
+ }
+
+ $result =
$restService->call($this->getUrl()."/services/RoomService/updateRoomWithModeration?" .
+ "SID=".$this->session_id.
+ "&room_id=".$openmeetings->room_id.
+ "&name=".urlencode($course_name).
+ "&roomtypes_id=".urlencode($openmeetings->type).
+ "&comment=".urlencode("Created by SOAP-Gateway for Moodle
Platform").
+ "&numberOfPartizipants=".$openmeetings->max_user.
+ "&ispublic=false".
+ "&appointment=false".
+ "&isDemoRoom=false".
+ "&demoTime=0".
+ "&isModeratedRoom=".$this->var_to_str($isModeratedRoom));
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function openmeetings_updateRoomWithModerationAndQuestions($openmeetings)
{
+
+ $restService = new openmeetings_rest_service();
+ //echo $restService."<br/>";
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = ($openmeetings->isModeratedRoom ==
1) ? 'true' : 'false';
+ $allowUserQuestions = ($openmeetings->allowUserQuestions ==
1) ? 'true' : 'false';
+ $isAudioOnly = ($openmeetings->isAudioOnly == 1) ? 'true' : 'false';
+
+ $url =
$this->getUrl()."/services/RoomService/updateRoomWithModerationAndQuestions?" .
+ "SID=".$this->session_id.
+ "&room_id=".$openmeetings->room_id.
+ "&name=".urlencode($room_name).
+ "&roomtypes_id=".urlencode($openmeetings->roomtypes_id).
+ "&comment=".urlencode("Created by SOAP-Gateway for Moodle
Platform").
+ "&numberOfPartizipants=".$openmeetings->numberOfPartizipants.
+ "&ispublic=false".
+ "&appointment=false".
+ "&isDemoRoom=false".
+ "&demoTime=0".
+ "&isModeratedRoom=".$isModeratedRoom .
+ "&allowUserQuestions=".$allowUserQuestions;
+
+ $result = $restService->call($url);
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ /*
+ * public String setUserObjectAndGenerateRecordingHashByURL(String SID,
String username, String firstname, String lastname,
+ Long externalUserId, String externalUserType, Long recording_id)
+ */
+ function
openmeetings_setUserObjectAndGenerateRecordingHashByURL($username,
$firstname, $lastname,
+ $userId, $systemType, $recording_id) {
+ $restService = new openmeetings_rest_service();
+ $result =
$restService->call($this->getUrl().'/services/UserService/setUserObjectAndGenerateRecordingHashByURL?'.
+ 'SID='.$this->session_id .
+ '&username='.urlencode($username) .
+ '&firstname='.urlencode($firstname) .
+ '&lastname='.urlencode($lastname) .
+ '&externalUserId='.$userId .
+ '&externalUserType='.urlencode($systemType) .
+ '&recording_id='.$recording_id,
+ 'return'
+ );
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function
openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($username,
$firstname, $lastname,
+ $profilePictureUrl, $email, $userId, $systemType, $room_id,
$becomeModerator, $allowRecording) {
+
+ $restService = new openmeetings_rest_service();
+ //echo $restService."<br/>";
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+
+ $result =
$restService->call($this->getUrl()."/services/UserService/setUserObjectAndGenerateRoomHashByURLAndRecFlag?" .
+ "SID=".$this->session_id.
+ "&username=".urlencode($username).
+ "&firstname=".urlencode($firstname).
+ "&lastname=".urlencode($lastname).
+ "&profilePictureUrl=".urlencode($profilePictureUrl).
+ "&email=".urlencode($email).
+ "&externalUserId=".urlencode($userId).
+ "&externalUserType=".urlencode($systemType).
+ "&room_id=".urlencode($room_id).
+ "&becomeModeratorAsInt=".$becomeModerator.
+ "&showAudioVideoTestAsInt=1".
+ "&allowRecording=".$this->var_to_str($allowRecording));
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function deleteRoom($openmeetings) {
+
+ //echo $client_roomService."<br/>";
+ $restService = new openmeetings_rest_service();
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+
+ $url = $this->getUrl()."/services/RoomService/deleteRoom?" .
+ "SID=".$this->session_id.
+ "&rooms_id=".$openmeetings->room_id;
+
+ $result = $restService->call($url);
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ //echo '<h2>Result</h2><pre>'; print_r($result["return"]);
echo '</pre>';
+ return $result;
+ }
+ return -1;
+ }
+
+
+ /**
+ * Generate a new room hash for entering a conference room
+ */
+ function openmeetings_setUserObjectAndGenerateRoomHash($username,
+ $firstname,
+ $lastname,
+ $profilePictureUrl,
+ $email,
+ $externalUserId,
+ $externalUserType,
+ $room_id,
+ $becomeModeratorAsInt,
+ $showAudioVideoTestAsInt) {
+
+ $restService = new openmeetings_rest_service();
+
+ $url =
$this->getUrl()."/services/UserService/setUserObjectAndGenerateRoomHash?" .
+ "SID=".$this->session_id.
+ "&username=".urlencode($username).
+ "&firstname=".urlencode($firstname).
+ "&lastname=".urlencode($lastname).
+ "&profilePictureUrl=".urlencode($profilePictureUrl).
+ "&email=".urlencode($email).
+ "&externalUserId=".urlencode($externalUserId).
+ "&externalUserType=".urlencode($externalUserType).
+ "&room_id=".$room_id.
+ "&becomeModeratorAsInt=".$becomeModeratorAsInt.
+ "&showAudioVideoTestAsInt=".$showAudioVideoTestAsInt;
+
+ $result = $restService->call($url);
+
+ $err = $restService->getError();
+ if ($err) {
+ echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+ echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(),
ENT_QUOTES) . '</pre>';
+ exit();
+ }
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($result); echo '</pre>';
+ } else {
+ //echo '<h2>Result</h2><pre>'; print_r($result["return"]);
echo '</pre>';
+ return $result;
+ }
+ return -1;
+ }
+
+ /**
+ * Create a new conference room
+ */
+ function openmeetings_createRoomWithModAndType($openmeetings) {
+
+ $restService = new openmeetings_rest_service();
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $url =
$this->getUrl().'/services/RoomService/addRoomWithModerationAndExternalType?' .
+ 'SID='.$this->session_id .
+ '&name='.urlencode($room_name).
+ '&roomtypes_id='.$openmeetings->roomtypes_id .
+ '&comment='.urlencode('Created by SOAP/REST-Gateway for Drupal
Platform') .
+ '&numberOfPartizipants='.$openmeetings->numberOfPartizipants .
+ '&ispublic='.$openmeetings->ispublic .
+ '&appointment=false'.
+ '&isDemoRoom=false'.
+ '&demoTime=0' .
+ '&isModeratedRoom='. $openmeetings->isModeratedRoom .
+ '&externalRoomType='.urlencode($this->moduleKey)
+ ;
+
+ $result = $restService->call($url, "return");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ /**
+ * Create a new conference room
+ */
+ function
openmeetings_createRoomWithModAndTypeAndAudioOption($openmeetings) {
+
+ $restService = new openmeetings_rest_service();
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = ($openmeetings->isModeratedRoom ==
1) ? 'true' : 'false';
+ $allowUserQuestions = ($openmeetings->allowUserQuestions ==
1) ? 'true' : 'false';
+ $isAudioOnly = ($openmeetings->isAudioOnly == 1) ? 'true' : 'false';
+
+ $url =
$this->getUrl().'/services/RoomService/addRoomWithModerationExternalTypeAndAudioType?' .
+ 'SID='.$this->session_id .
+ '&name='.urlencode($room_name).
+ '&roomtypes_id='.$openmeetings->roomtypes_id .
+ '&comment='.urlencode('Created by SOAP/REST-Gateway for Drupal
Platform') .
+ '&numberOfPartizipants='.$openmeetings->numberOfPartizipants .
+ '&ispublic='.$openmeetings->ispublic .
+ '&appointment=false'.
+ '&isDemoRoom=false'.
+ '&demoTime=0' .
+ '&isModeratedRoom='. $isModeratedRoom .
+ '&externalRoomType='.urlencode($this->moduleKey) .
+ '&allowUserQuestions='. $allowUserQuestions .
+ '&isAudioOnly='. $isAudioOnly
+ ;
+
+ $result = $restService->call($url, "return");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ function
openmeetings_updateRoomWithModerationQuestionsAudioTypeAndHideOptions($openmeetings)
{
+
+ $restService = new openmeetings_rest_service();
+ $room_name
= 'DRUPAL_ModeleKey:_'.$this->moduleKey.'_NAME_'.$openmeetings->name;
+
+ $isModeratedRoom = ($openmeetings->isModeratedRoom ==
1) ? 'true' : 'false';
+ $allowUserQuestions = ($openmeetings->allowUserQuestions ==
1) ? 'true' : 'false';
+ $isAudioOnly = ($openmeetings->isAudioOnly == 1) ? 'true' : 'false';
+
+ $url =
$this->getUrl().'/services/RoomService/updateRoomWithModerationQuestionsAudioTypeAndHideOptions?' .
+ 'SID='.$this->session_id .
+ '&room_id='.$openmeetings->room_id .
+ '&name='.urlencode($room_name).
+ '&roomtypes_id='.$openmeetings->roomtypes_id .
+ '&comment='.urlencode('Created by SOAP/REST-Gateway for Drupal
Platform') .
+ '&numberOfPartizipants='.$openmeetings->numberOfPartizipants .
+ '&ispublic='.$openmeetings->ispublic .
+ '&appointment=false'.
+ '&isDemoRoom=false'.
+ '&demoTime=0' .
+ '&isModeratedRoom='. $isModeratedRoom .
+ '&allowUserQuestions='. $allowUserQuestions .
+ '&isAudioOnly='. $isAudioOnly .
+ '&hideTopBar=false' .
+ '&hideChat=false' .
+ '&hideActivitiesAndActions=false' .
+ '&hideFilesExplorer=false' .
+ '&hideActionsMenu=false' .
+ '&hideScreenSharing=false' .
+ '&hideWhiteboard=false'
+ ;
+
+ $result = $restService->call($url, "return");
+
+ if ($restService->getError()) {
+ echo '<h2>Fault (Expect - The request contains an invalid SOAP
body)</h2><pre>'; print_r($restService->getErrorMessage()); echo '</pre>';
+ } else {
+ return $result;
+ }
+ return -1;
+ }
+
+ /**
+ * Get list of available recordings made by this Moodle instance
+ */
+ function openmeetings_getRecordingsByExternalRooms() {
+
+ $restService = new openmeetings_rest_service();
+
+ $url =
$this->getUrl()."/services/RoomService/getFlvRecordingByExternalRoomType?" .
+ "SID=".$this->session_id .
+
"&externalRoomType=".urlencode($CFG->openmeetings_openmeetingsModuleKey);
+
+ $result = $restService->call($url,"");
+
+ return $result;
+
+ }
+
+}
+
+?>