setting different layout for different users

2,315 views
Skip to first unread message

Roger

unread,
Jul 25, 2017, 12:32:20 AM7/25/17
to BigBlueButton-dev
Could you please tell me, is it possible to set a different layout for a different group of users?  Presently, I would like to let the teacher and students to choose whatever layout they want, but I also want to give access to this teaching session to other teachers who want to observe and learn how to teach in bigbluebutton.  For these other teachers observing how an experienced teacher is instructing students, I would like to have BBB open for them into the lecture layout.  Is this possible?  If so, how would I go about that?  So far I have found these links but they don't answer my question:  https://groups.google.com/forum/#!topic/bigbluebutton-setup/InFldLlJpQE  and  https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/resources/config.xml.template#L12  

TIA.

HostBBB.com

unread,
Jul 25, 2017, 9:52:43 AM7/25/17
to BigBlueButton-dev
look at this in layouts.xml    role= allows a layout to look different based on roles, moderator, attendee, presenter.

You also can use dynamic configs and specify this by referencing a series of different layout files.

see snippets below.


<layout name="bbb.layout.name.lecture">
<window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/>
<window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/>
<window name="UsersWindow" hidden="true"/>
<window name="VideoDock" width="0.2923611111111111" height="0.4640957446808511" x="0.7048611111111112" y="0.535904255319149"/>
<window name="PresentationWindow" width="0.7027777777777777" height="0.9986702127659575" x="0" y="0"/>
<window name="ChatWindow" width="0.2923611111111111" height="0.5305851063829787" x="0.7048611111111112" y="0"/>
<window name="CaptionWindow" hidden="true" width="0.513" height="0.308" x="0.180" y="0.692"/>
</layout>
<layout name="bbb.layout.name.lecture" role="presenter">
<window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/>
<window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/>
<window name="ChatWindow" hidden="true"/>
<window name="UsersWindow" hidden="true"/>
<window name="PresentationWindow" maximized="true"/>
<window name="VideoDock" hidden="true"/>
<window name="CaptionWindow" hidden="true" width="0.513" height="0.308" x="0.180" y="0.692"/>
</layout>

references the layout

regards,
Stephen

Roger Moore

unread,
Jul 26, 2017, 9:10:34 AM7/26/17
to bigblueb...@googlegroups.com
Do you have any example of how I could get this dynamic configs idea to work?  How could I allow the student and teacher to basically view whatever they want in whatever layout they want but these other observer teachers only to be able to see the WhiteboardModule and receive only audio?  Basically, I want to have 2 different types of attendees.

--
You received this message because you are subscribed to a topic in the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bigbluebutton-dev/kNgnh7wLWV4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bigbluebutton-dev+unsubscribe@googlegroups.com.
To post to this group, send email to bigbluebutton-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.

Fred Dixon

unread,
Jul 26, 2017, 9:24:16 AM7/26/17
to BigBlueButton-dev
Hi Roger,

For an example of how dynamic config.xml works, see


The source code for the example is linked at the bottom of the page.


Regards,... Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-dev+unsubscribe@googlegroups.com.

To post to this group, send email to bigbluebutton-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.



--
BigBlueButton Developer
@bigbluebutton

Roger Moore

unread,
Jul 29, 2017, 2:47:04 PM7/29/17
to bigblueb...@googlegroups.com
Great, thank you!  So I am trying to figure out what kind of URL is generated to start a BBB session with these dynamic configs, and I added the following two System and config lines, but I don't see any logs in either the web console or in /var/logs.  Could you please tell me, where so I look for the logs to be generated?  TIA.

                //
                // This is the URL for to join the meeting as moderator
                //
                String url = BigBlueButtonURL.replace("bigbluebutton/","demo/");
                String joinURL = getJoinURLwithDynamicConfigXML(username, confname, configXML);
                System.out.println ("Join moderator demo12:" + joinURL);
                console.log ("Join moderator demo12:" + joinURL);
                if (joinURL.startsWith("http://") || joinURL.startsWith("https://")) {

When I search this way, it doesn't find anything, so what am I missing?  TIA.

/var/log $ sudo find . -type f -exec grep -H -i -n "Join moderator demo12:" '{}' \;
[sudo] password for rmoore:
./auth.log:501844:Jul 29 12:40:58 Annapurna sudo:   rmoore : TTY=pts/9 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/find . -type f -exec grep -H -i -n Join moderator demo12: {} ;
/var/log $


Roger Moore

unread,
Jul 30, 2017, 1:50:33 AM7/30/17
to bigblueb...@googlegroups.com
OK, now I found I was using the wrong demo12.jsp--I need to use the one in the tomcat7 folder:

/var/log # locate demo12.jsp
/home/rmoore/dev/bigbluebutton/bbb-api-demo/src/main/webapp/demo12.jsp
/var/lib/tomcat7/webapps/demo/demo12.jsp

Roger Moore

unread,
Jul 31, 2017, 12:25:13 AM7/31/17
to bigblueb...@googlegroups.com
Thank you again so much for your help!  Could you please help me determine why this is being returned from a call attempting to use the dynamic config feature of BBB?

<response><returncode>FAILED</returncode><messageKey>configXMLChecksumError</messageKey><message>configXMLChecksumError: request did not pass the checksum security check.</message></response>.0*

Here is the URL that is being used:


Below is the code where both CreateMeeting and JoinMeeting work but GetMeetingConfigToken returns the above FAILED xml message.  Also, please find the BBB debug here: https://pastebin.com/JBRztxTw and bbb-web.log here: https://pastebin.com/eFkDR57t 

using System;
using System.Collections.Specialized;
using System.Linq;
using System.Data;
using System.Net;
using System.IO;
using System.Text;
using System.Web;

namespace TuberEdu.Web.Helper.VirtualRoom
{
    public class TestBbb
    {
        public string StrServerIPAddress = "https://xxxx.xxxxxxx.org";
        public string StrSalt = "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn";

        public string CreateMeeting(string meetingName, string meetingId, string attendeePW, string moderatorPW)
        {
                string strParameters = "name=" + meetingName + "&meetingID=" + meetingId + "&attendeePW=" + attendeePW + "&moderatorPW=" + moderatorPW
                    + "&allowStartStopRecording=false&autoStartRecording=true&record=true";
                string strSha1CheckSum = ClsData.GetSha1("create" + strParameters + StrSalt);
                string url = StrServerIPAddress + "/bigbluebutton/api/create?" + strParameters + "&checksum=" + strSha1CheckSum;
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                StreamReader sr = new StreamReader(response.GetResponseStream());
                string strResponse = sr.ReadToEnd();
                return strResponse;
        }

        public string JoinMeeting(string userName, string meetingId, string password, string userID)
        {
                string strParameters = "fullName=" + userName + "&meetingID=" + meetingId + "&password=" + password + "&userID=" + userID;
                string strSha1CheckSum = ClsData.GetSha1("join" + strParameters + StrSalt);
                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerIPAddress + "/bigbluebutton/api/join?" + strParameters + "&checksum=" + strSha1CheckSum);
                    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                    StreamReader sr = new StreamReader(response.GetResponseStream());
                    return sr.ReadToEnd();
        }

        //string meetingId = "6d63303f-539d-48db-b58f-4aeda4c0cdc0";
        //string configXML = "<config><modules><localeversion supressWarning=\"false\">0.9.0</localeversion></modules></config>";
        public string GetMeetingConfigToken(string meetingId, string configXml)
        {
                configXml = HttpUtility.UrlEncode(configXml, Encoding.UTF8);
                string strParameters = "configXML=" + configXml + "&meetingID=" + meetingId;
                string strSha1CheckSum = ClsData.GetSha1("setConfigXML" + strParameters + StrSalt);

                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(StrServerIPAddress + "/bigbluebutton/api/setConfigXML");
                string postData = strParameters + "&checksum=" + strSha1CheckSum;
                byte[] data = Encoding.UTF8.GetBytes(postData);
                request.Method = "POST";
                request.ContentType = "application/x-www-form-urlencoded";
                request.ContentLength = data.Length;
                using (var stream = request.GetRequestStream())
                {
                    stream.Write(data, 0, data.Length);
                }
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                StreamReader sr = new StreamReader(response.GetResponseStream());

                string strResponse = sr.ReadToEnd();
                return strResponse;
        }
    }

    public class ClsData
    {
        public static string GetSha1(string StrValue)
        {
            HashFx md = new HashFx();
            return md.EncryptString1(StrValue, 1);
        }
    }
}
Reply all
Reply to author
Forward
0 new messages