Revision: 2515
Author: seba.wagner
Date: Mon Oct 26 05:40:41 2009
Log: Fixes:
Do not show *No Moderator Popup* for restricted room type
Fix moderated rooms, to login Moderator and Administrator User-level as  
Moderators automatically
Allow multiple Moderators in initial method for each Room
http://code.google.com/p/openmeetings/source/detail?r=2515

Modified:
  /trunk/singlewebapp/WebContent/openmeetings/base/auth/checkLoginData.lzx
   
/trunk/singlewebapp/WebContent/openmeetings/base/hibernate/hibRtmpConnection.lzx
  /trunk/singlewebapp/WebContent/openmeetings/base/mainAttributes.lzx
  /trunk/singlewebapp/WebContent/openmeetings/base/mainMethods.lzx
   
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserList.lzx
   
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx
   
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleEventRoom.lzx
   
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx
   
/trunk/singlewebapp/WebContent/openmeetings/modules/invitation/autoloaderBarOnly.lzx
   
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/allmeetings.lzx
   
/trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java
   
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java
   
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java

=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/base/auth/checkLoginData.lzx        
 
Sat Oct 17 06:25:57 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/base/auth/checkLoginData.lzx        
 
Mon Oct 26 05:40:41 2009
@@ -317,6 +317,10 @@
                      canvas.setAttribute('language','');
                      canvas.setAttribute('currentuser',value.login);

+                    if (value.level_id >= 2) {
+                       canvas.becomemoderator = true;
+                    }
+
                      hib.userlang = Number(parent.languages.getValue());
                      hib.userobject = value;
                      if (value.organisation_users.length==0){
=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/base/hibernate/hibRtmpConnection.lzx
         
Sat Oct 17 06:25:57 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/base/hibernate/hibRtmpConnection.lzx
         
Mon Oct 26 05:40:41 2009
@@ -507,7 +507,7 @@
                        if ($debug) Debug.write("throw event to  
drawarea: ",canvas.moderatorStreamID,canvas.ismoderator);
                      if (canvas.ismoderator){
                        if (this.parent.modus == "conference"){
-                        if ($debug) Debug.write("##############  
editRecordStream 3");
+                               if ($debug) Debug.write("##############  
editRecordStream 3");
                              new  
lz.editRecordStream(canvas.main_content._content.inner);
                        }
                      } else if (value==null){
@@ -538,17 +538,19 @@
                          }
                      }
                      canvas._drawarea.onopenWhiteBoard.sendEvent();
-
-                    if (canvas.currentRoomObj.isModeratedRoom) {
-                       if (value.length == 0 && !messageAlreadyThrown){
-                            new  
lz.labelerrorPopup(canvas,{errorlabelid:641});
-                        }
-                    } else {
-                       if (value.length == 0 && !messageAlreadyThrown){
-                            new  
lz.errorModeratorPopup(canvas,{error:canvas.getLabelName(498)});
-                        }
-                    }
-
+
+                    if (canvas.currentRoomObject.roomtype.roomtypes_id!=3)  
{
+                       //We do not show this warning when the roomtype is 3  
(restricted)
+                           if (canvas.currentRoomObj.isModeratedRoom) {
+                               if (value.length == 0 && !messageAlreadyThrown){
+                                   new  
lz.labelerrorPopup(canvas,{errorlabelid:641});
+                               }
+                           } else {
+                               if (value.length == 0 && !messageAlreadyThrown){
+                                   new  
lz.errorModeratorPopup(canvas,{error:canvas.getLabelName(498)});
+                               }
+                           }
+                    }
                      parent.checkSharingSession.doCall();
                  ]]>
              </handler>
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/base/mainAttributes.lzx Mon  
Oct 12 07:45:40 2009
+++ /trunk/singlewebapp/WebContent/openmeetings/base/mainAttributes.lzx Mon  
Oct 26 05:40:41 2009
@@ -294,4 +294,6 @@
  <!-- item to focus on after rpcErrorDialog has been shown-->
  <attribute name="focusOnItem" value="null"/>

+<attribute name="currentRoomObject" value="null"/>
+
  </library>
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/base/mainMethods.lzx    Mon  
Oct 12 03:48:00 2009
+++ /trunk/singlewebapp/WebContent/openmeetings/base/mainMethods.lzx    Mon  
Oct 26 05:40:41 2009
@@ -363,11 +363,16 @@
                new  
lz.testSetup(canvas,{isDirectLink:true,roomClassName:this.roomClassName,roomobj:roomObj});
                  //new  
lz[canvas.conferenceRoomModule](canvas.main_content._content.inner,{roomobj:roomObj});

-            } else {
+            } else if (roomTypeId==2){

                new  
lz.testSetup(canvas,{isDirectLink:true,roomClassName:canvas.eventRoomModule,roomobj:roomObj});
                  //new  
lz[canvas.eventRoomModule](canvas.main_content._content.inner,{roomobj:roomObj});

+            } else if (roomTypeId==3){
+
+               new  
lz.testSetup(canvas,{isDirectLink:true,roomClassName:"restrictedConferenceRoom",roomobj:roomObj});
+                //new  
lz[canvas.eventRoomModule](canvas.main_content._content.inner,{roomobj:roomObj});
+
              }
          }
        </method>
=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserList.lzx
   
Mon Oct 26 03:55:01 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/eventuserlist/eventUserList.lzx
   
Mon Oct 26 05:40:41 2009
@@ -38,7 +38,7 @@
        </handler>

      <method name="reconnectSuccess">
-        if ($debug) Debug.write("User Reloged In");
+        if ($debug) Debug.warn("User Reloged In ",canvas.becomemoderator);
          //set default values and get already availible streams
          this.setRoomValues.doCall();
      </method>
=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx
         
Mon Oct 26 05:00:12 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleConferenceRoom.lzx
         
Mon Oct 26 05:40:41 2009
@@ -12,6 +12,8 @@
        _mainScrollBar.setAttribute("visibility","hidden");

                if ($debug) Debug.write("roomobj: ",this.roomobj);
+               canvas.currentRoomObject = this.roomobj;
+
          canvas._mainbgcontentNavi.setAttribute('height',0);
          canvas.setAttribute('naviHeightDelta',28);
          new lz.conferenceMenubar(canvas._conferencemenu);
=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleEventRoom.lzx
      
Mon Oct 26 05:00:12 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/flexibleEventRoom.lzx
      
Mon Oct 26 05:40:41 2009
@@ -12,6 +12,8 @@
        _mainScrollBar.setAttribute("visibility","hidden");

                if ($debug) Debug.write("roomobj: ",this.roomobj);
+               canvas.currentRoomObject = this.roomobj;
+
          canvas._mainbgcontentNavi.setAttribute('height',0);
          canvas.setAttribute('naviHeightDelta',28);
          new lz.conferenceMenubar(canvas._conferencemenu);
=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx
       
Mon Oct 26 05:00:12 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/flexibleConferenceRoom/restrictedConferenceRoom.lzx
       
Mon Oct 26 05:40:41 2009
@@ -12,6 +12,9 @@
        _mainScrollBar.setAttribute("visibility","hidden");

                if ($debug) Debug.write("roomobj: ",this.roomobj);
+
+               canvas.currentRoomObject = this.roomobj;
+
          canvas._mainbgcontentNavi.setAttribute('height',0);
          canvas.setAttribute('naviHeightDelta',28);
          new lz.restrictedConferenceMenubar(canvas._conferencemenu);
=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/modules/invitation/autoloaderBarOnly.lzx
     
Mon Oct 12 03:58:23 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/modules/invitation/autoloaderBarOnly.lzx
     
Mon Oct 26 05:40:41 2009
@@ -101,12 +101,13 @@

                                new  
lz.testSetup(canvas,{isDirectLink:true,roomClassName:canvas.conferenceRoomModule,roomobj:canvas.thishib.currentInvitation.room});

-                               //new  
lz[canvas.conferenceRoomModule](canvas.main_content._content.inner,{roomobj:canvas.thishib.currentInvitation.room});
-                       } else {
+                       } else if  
(canvas.thishib.currentInvitation.room.roomtype.roomtypes_id==2){

                                new  
lz.testSetup(canvas,{isDirectLink:true,roomClassName:canvas.eventRoomModule,roomobj:canvas.thishib.currentInvitation.room});

-                               //new  
lz[canvas.eventRoomModule](canvas.main_content._content.inner,{roomobj:canvas.thishib.currentInvitation.room});
+                       } else if  
(canvas.thishib.currentInvitation.room.roomtype.roomtypes_id==3){
+
+                               new  
lz.testSetup(canvas,{isDirectLink:true,roomClassName:"restrictedConferenceRoom",roomobj:canvas.thishib.currentInvitation.room});
                        }
          </handler>
      </netRemoteCallHib>
=======================================
---  
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/allmeetings.lzx    
 
Sun Oct 25 08:47:11 2009
+++  
/trunk/singlewebapp/WebContent/openmeetings/modules/meetings/allmeetings.lzx    
 
Mon Oct 26 05:40:41 2009
@@ -271,8 +271,10 @@
                                                                                
        });
                                                                }

-                                                               
parent.parent.parent.parent.updateFinishedTabsQuantity();
-                                                       }
+
+                                                       }
+
+                                                       
parent.parent.parent.parent.updateFinishedTabsQuantity();
                                                ]]>
                                        </handler>
                                </netRemoteCallHib>
=======================================
---  
/trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java
     
Sat Oct 24 04:25:40 2009
+++  
/trunk/singlewebapp/src/app/org/openmeetings/app/data/conference/Roommanagement.java
     
Mon Oct 26 05:40:41 2009
@@ -652,7 +652,7 @@
         */
        public List<Rooms_Organisation> 
getRoomsOrganisationByOrganisationId(long  
user_level,long organisation_id){
                try {
-                       if 
(AuthLevelmanagement.getInstance().checkModLevel(user_level)){
+                       if 
(AuthLevelmanagement.getInstance().checkUserLevel(user_level)){
                                Object idf = HibernateUtil.createSession();
                                Session session = HibernateUtil.getSession();
                                Transaction tx = session.beginTransaction();
=======================================
---  
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java  
 
Sat Oct 24 04:25:40 2009
+++  
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/ConferenceService.java  
 
Mon Oct 26 05:40:41 2009
@@ -283,7 +283,7 @@
                        Long users_id = 
Sessionmanagement.getInstance().checkSession(SID);
                        Long user_level =  
Usermanagement.getInstance().getUserLevelByID(users_id);

-                       if 
(AuthLevelmanagement.getInstance().checkModLevel(user_level)) {
+                       if 
(AuthLevelmanagement.getInstance().checkUserLevel(user_level)) {
                                List<Appointment> appointments =  
AppointmentLogic.getInstance().getTodaysAppointmentsForUser(users_id);
                                List<Rooms> result = new ArrayList<Rooms>();

=======================================
---  
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
        
Mon Oct 12 07:54:36 2009
+++  
/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
        
Mon Oct 26 05:40:41 2009
@@ -912,54 +912,37 @@

                                        //If there is no Moderator yet we have 
to check if the current User  
has the Bit set to true to
                                        //become one, otherwise he won't get 
Moderation and has to wait
-                                       if (clientModeratorListRoom.size() == 
0) {
-                                               if (becomeModerator) {
-                                                       
currentClient.setIsMod(true);
-
-                                                       //There is a need to 
send an extra Event here, cause at this moment  
there could be
-                                                       //already somebody in 
the Room waiting
-
-                                                       //Now set it false for 
all other clients of this room
-                                                       for (Iterator<String>  
iter=clientListRoom.keySet().iterator();iter.hasNext();) {
-                                                               String streamId 
= iter.next();
-                                                               RoomClient rcl 
= clientListRoom.get(streamId);
-                                                               //Check if it 
is not the same like we have just declared to be  
moderating this room
-                                                               if( 
!streamid.equals(rcl.getStreamid())){
-                                                                       
log.debug("set to false for client: "+rcl);
-                                                                       
rcl.setIsMod(new Boolean(false));
-                                                                       
this.clientListManager.updateClientByStreamId(streamId, rcl);
-                                                               }
-                                                       }
-
-                                                       //Notify all clients of 
the same scope (room)
-                                                       
Collection<Set<IConnection>> conCollection =  
current.getScope().getConnections();
-                                                       for (Set<IConnection> 
conset : conCollection) {
-                                                               for 
(IConnection conn : conset) {
-                                                                       if 
(conn != null) {
-                                                                               
RoomClient rcl =  
this.clientListManager.getClientByStreamId(conn.getClient().getId());
-                                                                               
if( !streamid.equals(rcl.getStreamid())){
-                                                                               
        //It is not needed to send back that event to the actuall  
Moderator
-                                                                               
        //as it will be already triggered in the result of this Function
-                                                                               
        //in the Client
-                                                                               
        if (conn instanceof IServiceCapableConnection) {
-                                                                               
                ((IServiceCapableConnection)  
conn).invoke("setNewModerator",new Object[] { currentClient }, this);
-                                                                               
                log.debug("sending setNewModerator to " + conn);
-                                                                               
        }
+                                       if (becomeModerator) {
+                                               currentClient.setIsMod(true);
+
+                                               //There is a need to send an 
extra Event here, cause at this moment  
there could be
+                                               //already somebody in the Room 
waiting
+
+                                               //Notify all clients of the 
same scope (room)
+                                               Collection<Set<IConnection>> 
conCollection =  
current.getScope().getConnections();
+                                               for (Set<IConnection> conset : 
conCollection) {
+                                                       for (IConnection conn : 
conset) {
+                                                               if (conn != 
null) {
+                                                                       
RoomClient rcl =  
this.clientListManager.getClientByStreamId(conn.getClient().getId());
+                                                                       if( 
!streamid.equals(rcl.getStreamid())){
+                                                                               
//It is not needed to send back that event to the actuall  
Moderator
+                                                                               
//as it will be already triggered in the result of this Function
+                                                                               
//in the Client
+                                                                               
if (conn instanceof IServiceCapableConnection) {
+                                                                               
        ((IServiceCapableConnection) conn).invoke("setNewModerator",new  
Object[] { currentClient }, this);
+                                                                               
        log.debug("sending setNewModerator to " + conn);
                                                                                
}
                                                                        }
-                                                               }
-                                                       }
-
-                                               } else {
-                                                       //The current User is 
not a Teacher/Admin or whatever Role that  
should get the
-                                                       //Moderation
-                                                       
currentClient.setIsMod(false);
-                                               }
+                                                               }
+                                                       }
+                                               }
+
                                        } else {
-                                               //There is already a Moderator 
so leave it
+                                               //The current User is not a 
Teacher/Admin or whatever Role that  
should get the
+                                               //Moderation
                                                currentClient.setIsMod(false);
                                        }
-
+

                                } else {


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenMeetings developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/openmeetings-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to