Index: controlies/trunk/Server.py
===================================================================
--- controlies/trunk/Server.py	(revision 111)
+++ controlies/trunk/Server.py	(revision 112)
@@ -46,8 +46,8 @@
 
 # Start up the web service.     
 Root = MainLoop.ControlIESProtocol() #Resource object
-#Root.PageDir='/home/manu/proyectos/controlies/trunk/www/'
-Root.PageDir='/home/chisco/Proyectos/controlies/trunk/www'
+Root.PageDir='/home/manu/proyectos/controlies/trunk/www/'
+#Root.PageDir='/home/chisco/Proyectos/controlies/trunk/www'
 site = server.Site(Root)
 
 fileNameServers = '/tmp/controlIES.ltpsSevers'
Index: controlies/trunk/Plugins/Users.py
===================================================================
--- controlies/trunk/Plugins/Users.py	(revision 111)
+++ controlies/trunk/Plugins/Users.py	(revision 112)
@@ -391,6 +391,9 @@
 		self.getUserGroups()
 		result = self.ldap.search("ou=People","uid="+self.user,["uid","cn","sn","employeenumber","homedirectory","jpegPhoto"])
 		
+		if len(result) == 0:
+			return { "user":"", "name":"", "surname":"", "nif":"", "photo":"", "type":"", "groups":[] }
+		
 		type = "student"
 		if result[0][0][1]["homeDirectory"][0][0:14]=="/home/profesor":
 			type = "teacher"
Index: controlies/trunk/www/classroomServers/index.html
===================================================================
--- controlies/trunk/www/classroomServers/index.html	(revision 111)
+++ controlies/trunk/www/classroomServers/index.html	(revision 112)
@@ -92,6 +92,11 @@
 			return false;
 		}else{
 
+			if( $("#selectable-"+selected[0]+" #userName").html()=="" ){
+				modalAlert("No hay datos que mostrar");
+				return false;				
+			}
+
 			$("#messageLoading").show();
 
 			//$("#dialog-details").html("").css("display","none");;
@@ -98,15 +103,26 @@
 
 			$("#dialog-details").load("classroomServers/details.html", function() {
 
-				$.post('hosts','action=getClassroomDetails&classroom='+selected[0], function(data) {
+				$.post('hosts','action=getClassroomDetails&classroom='+selected[0]+'&teacher='+$("#selectable-"+selected[0]+" #userName").html(), function(data) {
 					var result = $.parseJSON(data);
 
+					$("#teacherName").html(result.teacher.name);
+
+					$.each(result.teacher.groups.departments, function(i, l){
+						$("#teacherDepartments").append(l+" ");
+					});
+					
 					if(result.students.length>0){
 						$.each(result.students, function(i, l){
-							$('#selectableStudents').append('<li class="ui-state-default" id="selectableStudents-'+l.username+'"><div id="pcName" style="font-size:11px;">'+l.host+'</div><img class="thumb-image" src="data:image/png;base64+'l.photo'+"/><div id="userName" style="font-size:11px;">'+l.username+'</div></li>');
+							
+							src = "img/nobody.png";
+							if(l.photo.photo!="")
+								src = "data:image/png;base64,"+l.photo.photo;
+							
+							$('#selectableStudents').append('<li class="ui-state-default" id="selectableStudents-'+l.username+'"><div id="pcName" style="font-size:11px;">'+l.host+'</div><img class="thumb-image" src="'+src+'" style="width:64px; height:64px;"/><div id="userName" style="font-size:11px;">'+l.username+'</div></li>');
 						});
 					}else{
-						//$("#dialog-details").html("No hay alumnos detectados").css("text-align","center").css("font-weight","bold");
+						$("#dialog-details #selectableStudents").html("No hay alumnos detectados").css("text-align","center").css("font-weight","bold");
 					}
 
 					x = ($(window).width()-500)/2;
@@ -119,7 +135,7 @@
 						position: top,
 						modal: true,
 						width: 500,
-						title: "Detalles del aula"
+						title: "Detalles del aula: "+result.classroom
 					}).dialog('option', 'position', [x, y]);
 				});
 			});
Index: controlies/trunk/MainLoop.py
===================================================================
--- controlies/trunk/MainLoop.py	(revision 111)
+++ controlies/trunk/MainLoop.py	(revision 112)
@@ -210,7 +210,7 @@
 				f = open('/tmp/controlIES.ltpsTeachers', 'r')
 				teachers = f.read().split(" ")
 				teachers.sort()				
-				
+
 				return json.dumps({ "computers":computers, "teachers":teachers })
 
 
@@ -217,26 +217,32 @@
         	elif request.args['action'][0] == "getClassroomDetails":
 
 				import xmlrpclib
-				from Plugins.Users import Users				
-				
+				from Plugins.Users import Users
+
+				objUser = Users(l,"","","","",request.args['teacher'][0],"","","","")
+				teacherData = objUser.getUserData()
+
 				s = xmlrpclib.Server("http://" + request.args['classroom'][0] + ":8900");
 
 				users = s.Users()
 
-				response = []				
+				response = []
 				for u in users:
 					user = u.split("@")
 
 					objUser = Users(l,"","","","",user[0],"","","","")
 					photo = objUser.getUserPhoto()
+
 					response.append({ 'username': user[0], 'host': user[1], 'photo': photo })
-					
-				return json.dumps({ "classroom" : request.args['classroom'][0], "students" : response })
 
-			elif request.args['action'][0]=="delete":
+				return json.dumps({ "teacher" : teacherData, "classroom" : request.args['classroom'][0], "students" : response })
+
+
+        	elif request.args['action'][0]=="delete":
 				h = Hosts(l,request.args['cn'][0],"","",request.args['group'][0],request.args['type'][0])
 				response = h.process(request.args['action'][0])
 				return json.dumps({"response" : response})
+				
         	else: #add
 				if request.args ['type'][0] == 'thinclient':
 					ip = ""
