Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 76

Sigo con los grupos

Ver diferencias:

MainLoop.py
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with ControlAula. If not, see <http://www.gnu.org/licenses/>.
# along with ControlIES. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
......
classrooms = request.args['multiselect_classrooms']
except:
pass
u = Users(l,request.args['type'][0],request.args['name'][0],request.args['surname'][0],request.args['nif'][0],request.args['user'][0],request.args['password'][0],request.args['password2'][0],departments,classrooms)
response = u.process(request.args['action'][0])
return json.dumps({"response" : response})
......
from Plugins.Groups import Groups
if request.args['action'][0] == "list":
g = Groups(l,"","")
g = Groups(l,"","","")
response = g.list(request.args)
return json.dumps(response)
elif request.args['action'][0] == "getAllGroups":
g = Groups(l,"","")
g = Groups(l,"","","")
response = g.getAllGroups()
return json.dumps(response)
elif request.args['action'][0] == "delete":
g = Groups(l,"",request.args['name'][0])
g = Groups(l,"",request.args['name'][0],"")
response = g.delete()
return json.dumps({"response" : response})
else:
g = Groups(l,request.args['type'][0],request.args['name'][0])
g = Groups(l,request.args['type'][0], request.args['name'][0], request.args['users'][0])
response = g.process(request.args['action'][0])
return json.dumps({"response" : response})

Exportar a: Unified diff