|
2:
Re: Advice on how to communicate with an external tool
|
In response to 1
|
10/30/08 03:58 PM |
|
Hi Daniel,
Skype within LAMS would be really cool! But can you give us more info on how this tool would work?
Do you want the learners to start skype and join a particular skypecast or ...?
The tool would know the users as well as the sessions for each group, so you should have everything in the tool. But if you can elaborate in the use case we would be able to give you a better response.
Thanks,
Ernie
Posted by Ernie Ghiglione
|
|
|
3:
Re: Advice on how to communicate with an external tool
|
In response to 1
|
10/31/08 12:57 PM |
|
Well, im not sure what you mean with skypecast.... but the idea is to have a tool that the teacher can use as any other tool, to create video or audio conferences between the learners (the teacher would also be able to participate). It would work, for the learners, very much like the chat tool.
I dont think this can be done by making a webapp, or just using a tool for lams, cause the skype client is installed on the users pc... so ill be using an external app, thats installed on the learners computer, to communicate with the skype client. The learner, as part of the activity, would download a file (e.g. a xml) and the app would get the info for the conference session from that file.
So my problem now is how to get the info for that file, and how can i make it available for the app...If the case was, that when the teacher starts a lesson the server writes a file with the info on what the users and groups are, then i could just put it for download and have the app interpret it. But of course, thats not the case, its not that easy, and thats why im thinking of going straigth to the DB (wich i rather not).
So, any advice will be apreciated..thanks a lot!
Posted by Daniel Romero
|
|
|
4:
Re: Re: Advice on how to communicate with an external tool
|
In response to 3
|
10/31/08 03:20 PM |
|
Hi Daniel,
Skypecast used to be a service from the Skype guys that allowed people to get together (using skype) with just a link. Unfortunately, I just found out that skypecast are not longer available
However, have you seen Dimdim? It's a video, audio, share desktop and presentation application that doesn't require anything but a browser. It's quite good and we've been working on a new LAMS tool for it with their help. You can have a look at the following animation. Here you have more info. It has an open source version as well which you can use with less than 20 simultaneous users.
For Skype, do you have the format of the file that the learners need to download and that info needs to be included in that? for what you are saying what we need is user data and I guess the skype username for the learners? anything else?
Ernie
Posted by Ernie Ghiglione
|
|
|
5:
Re: Re: Re: Advice on how to communicate with an external tool
|
In response to 4
|
11/03/08 03:21 PM |
|
Hi Ernie,
AS for the format of the file, it can be a txt or a xml...it makes no diference cause the app im building is gonna read it and take the info from there...but i guess xml would be fine.
The info that would be on the file is about the users, what are their user names, their groups, who will be talking to whom. For starters, ive thought of having the learners using the same username both in Skype and lams.
You said that the tool would know the users as well as the sessions for each group...could you elaborate on that? How can i get the info from the tool? any tip would be highly apreciated...if you know of any kind of diagram it would be great too...
Posted by Daniel Romero
|
|
|
6:
Re: Advice on how to communicate with an external tool
|
In response to 1
|
11/03/08 07:27 PM |
|
Hi Daniel,
you don't need a direct DB access to get user list from a tool.
If you want a list of learners and teachers that will participate in a lesson, you'll need the LessonService. Most of the tools didn't need access to its functionality, but if you take a look at SubmitFiles tool from HEAD, you'll see that LessonService was injected into tool's service in order to get a list of monitoring teachers. I guess there is no method that allows you to get a list of learners, but if it's really needed, we can implement it and add it to the service.
A tool itself knows only about the learners that actually reached it. The moment a lesson is started, a new instance of tool content is created. If there is no grouping, a tool session that will hold the whole class is created. But if there is grouping like Choose in Monitor, learners will be divided into several sessions. There is no way to learn to what session a learner will be assigned to before he/she will reach the tool. In fact, sometimes sessions are created the moment a learner reaches the tool.
In order to get user info from a tool service, usually there are methods like (based on SubmitFiles tool service):
getUsersBySession(Long sessionID)
getSessionsByContentID(Long toolContentID)
getSessionUser(Long sessionID, Integer userID)
Parameters are provided by the progress engine, so just check the code for examples how to use those methods. Then you can add your own method that will create a XML file that can be read by your external application.
So, when you write: "when the teacher starts a lesson the server writes a file with the info on what the users and groups" - when a lesson is started, you can get a list of learners that MIGHT (but might not, if there is branching) get to your tool. There is no way you can tell what groups they will be in at this moment.
Once a learner gets to the tool, you can get the data using tool's service.
If you have any questions, just let us know.
Posted by Marcin Cieslak
|
|
|
7:
Re: Re: Advice on how to communicate with an external tool
|
In response to 6
|
11/28/08 03:21 PM |
|
Hi Marcin,
thanks for the info, theres just a few things im not so clear about....
If i understand it correctly, what i should do is to get the users in each session to interact via skype. the groups that the teacher has created will actually be the sessions. So, everytime an user is assigned to a session, the tool should update the file with the info about the users.
In order to do this, i have to use the method getSessionsByContentID(Long toolContentID) to get the sessions and then getUsersBySession(Long sessionID) to get the users for each session. But the first method needs the toolcontentid of the tool...where can i get that? that would have to be outside the tool right?
Im basing my new tool on the shareresources one...does that mean id have to implement the methods mentioned earlier on my new tool?
Theres a method called getSkypeForLamsItemsBySessionId()...
what is an "item"?
thanks a lot.
Posted by Daniel Romero
|
|
|
8:
Advice on how to communicate with an external tool
|
In response to 7
|
12/03/08 11:31 PM |
|
Hi Daniel,
I'm sorry for replying so late.
"If i understand it correctly..." - yes, that's pretty much it. Just remember that it's not always the teacher that creates the groups. In LAMS 2.2 users are able to choose a group they want to participate in.
When a user enteres an activity, the Tool Content ID is provided from LAMS progress engine. If you take a look at start() method in LearningAction in Shared Resources Tool, you will see that that Tool Session ID is extracted from HTTP request and put back as an attribute. Having Tool Session ID you can get Tool Content ID using for example getResourceBySessionId() method in ResourceService.
In your case it might be a good idea to add some code in that start() method that will export the ID to some file that would be later read by your external program. Having this value you can call tool service or database itself to get user data for particular group.
I'm not sure what do you mean when you ask for "item". What does your method do? I'm guessing, though, that "item" is a term used in Shared Resources Tool - it means a single URL or file that is shared among learners. In Q&A tool it would be questions, in Forum it would be topics. I hope I'm guessing right what do you have in mind...
Let us know how it goes.
Thanks
Posted by Marcin Cieslak
|
|
|
9:
Re: Advice on how to communicate with an external tool
|
In response to 8
|
12/09/08 02:54 PM |
|
Hi Marcin,
Thank you very much for the tips, they`ve been really helpfull. The thing is, that i cant find the method getResourceBySessionId() anywhere in the workspace...maybe its cause im using ver 2.1...
Do you know another way to get the toolcontentid ??
thanks a lot
Posted by Daniel Romero
|
|
|
10:
Re: Re: Advice on how to communicate with an external tool
|
In response to 9
|
12/09/08 06:24 PM |
|
The method you mention for Shared Resources Tool is in it's service class org.lamsfoundation.lams.tool.rsrc.service.IResourceService and its implementation in org.lamsfoundation.lams.tool.rsrc.service.ResourceServiceImpl. If you were using our ToolBuilder, the name "Resource" most probably has been changed to something else (for example "Skype", if your tool is named so). Still, this method should be available even in version 2.1 - I've checked.
You may also get Tool Content ID when a lesson is created. The original Learning Design is copied and tools get new ID.
You can observe it LamsCoreToolService where the method notifyToolToCopyContent() is called which then calls newInstance() method in Resource class (or any other tool's main class). You could get the Content ID then, but there is a catch: this method newInstance() is called in several other occasions like importing and exporting the tool. It might be tricky to detect which situation occurs at the particular moment. So I think it's better to extract this parameter when coping with LearningAction - it's always somewhere there (as a request parameter or in session map).
Good luck!
Posted by Marcin Cieslak
|
|
|