vikpaw Posted June 12, 2010 Posted June 12, 2010 I don't think it's been mentioned here yet, but for those of you that don't frequent SupportNet, something of interest... A java based API for SIMS Command Reporter just published. Schools forums --> Technical (67) --> Direct access to SQL database (26375) SourceForge.net: SIMS CommandReporter Java API - Project Web Hosting - Open Source Software 2
rh91uk Posted June 12, 2010 Posted June 12, 2010 I speak to Bill quite a lot (who wrote that) ..... hes a good guy and willing to help out. Got some good ideas. Will point him to this thread! I plan to try this sometime next week (been wanting to for ages but haven't had the time!)
bantonia Posted June 12, 2010 Posted June 12, 2010 Hi, Just joined edugeek, hello all. If you have any questions about the software please do not hesitate to contact me. I know the software has been downloaded but as yet I have had no feedback of any successes or otherwise, all I know it works for me. 1
vikpaw Posted June 12, 2010 Author Posted June 12, 2010 (edited) bill ) good to have you here. i've downloaded it, but having the time to do something with it is something completely different. i think @losojos: may be interested as he has a little tool for making a photo database, that uses commandreporter, so this could fit in nicely to make it more easily shared. Edited June 14, 2010 by vikpaw
bantonia Posted June 12, 2010 Posted June 12, 2010 (edited) Just a thought, obviously CommandReporter.exe only gets data from SIMS, wouldn't it be nice if Capita would write command line tools which would write data to SIMS, at least to "Assessment" and "UDF" anyway, areas which were already set up such as as aspects, resultsets and udf. Should not be too difficult and it would alleviate some dissatisfaction for those wanting to integrate their systems. Also, haven't tried to use my software to download images so that aspect is untested, hmmmmm........ Let me know if it works or otherwise. Edited June 12, 2010 by bantonia Added text
bantonia Posted June 12, 2010 Posted June 12, 2010 Just tested the "Ping" method to Moodle using: https://secure.linuxbox.com/tiki/tiki-index.php?page=moodle_xmlrpc together with Java xml-rpc library from: ws-xmlrpc - Apache XML-RPC So, connecting to commandreporter.exe and using the above I should be able to create Classes and Users in Moodle directly from SIMS. Also, the software I've written could be cut down to be able to execute any .bat or .exe file remotely, in fact that's where it started, so new accounts can be created within the MS Windows domain. I think there is some work to do here.
vikpaw Posted June 13, 2010 Author Posted June 13, 2010 Just tested the "Ping" method to Moodle using: https://secure.linuxbox.com/tiki/tiki-index.php?page=moodle_xmlrpc together with Java xml-rpc library from: ws-xmlrpc - Apache XML-RPC So, connecting to commandreporter.exe and using the above I should be able to create Classes and Users in Moodle directly from SIMS. Also, the software I've written could be cut down to be able to execute any .bat or .exe file remotely, in fact that's where it started, so new accounts can be created within the MS Windows domain. I think there is some work to do here. welcome to the joys of edugeek, you're fitting in nicely
LosOjos Posted June 14, 2010 Posted June 14, 2010 This definitely looks interesting, bit swamped at the minute but I will get around to having a look at it soon
bantonia Posted June 16, 2010 Posted June 16, 2010 Hi, Just an update: In the early stages but have created Java software which reads the SIMS database via the commandreporter tool which transfers data to Moodle. It currently creates courses with the same name as those in SIMS, creates user accounts and adds roles to the users of "student" and "teacher" within those courses. I used: Moodle XMLRPC module | The Linux Box as the basis for the Moodle server end of the xmlrpc calls but have had to edit the code fairly extensively to get it working due to deprecated calls. Still have to add the code to un-enrol users from the courses created from SIMS which are no longer in that class. Overall, the idea is to use these as child courses which can be added to the main courses for enrolment. It may also be possible later, once child courses have been added to the main courses to automatically add populated groups of the same name within the main courses. I hope this makes sense! My only addition to the SIMS database is to create UDF's for both students and staff to contain their username for the network. Gradual progress, but does exercise the brain cells.
bantonia Posted June 25, 2010 Posted June 25, 2010 Changed tack, working on SIMS->Moodle 2 using the REST protocol embedded in Moodle 2. Thought why develop for Moodle 1.9.x
cgilmour Posted June 25, 2010 Posted June 25, 2010 Hi, I've gone through the instructions for installing the SDK and netbeans software then amended and compiled the java code but and ran the CommandReportServer without exceptions ...not sure what parameter to pass in for the simple report I created so I've created in SIms under "My Reports" a report called christest but with the relevant line amended as follows:- cr.setCommandReport("commandreporter /user:myuid /password:mypass /report:christest /quiet"); but when I clean compaile and then run I get the following error - any ideas where I should be looking? Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at net.beaconhillcott.CommandReportServerImpl.executeCommand(CommandReportServerImpl.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132) at $Proxy0.executeCommand(Unknown Source) at net.beaconhillcott.CommandReporter.execute(CommandReporter.java:229) at net.beaconhillcott.CommandReportViewer.(CommandReportViewer.java:30) at net.beaconhillcott.CommandReportViewer$1.run(CommandReportViewer.java:89) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
penfold_99 Posted June 25, 2010 Posted June 25, 2010 You can write databack into SIMS.net if you used SIF. You could have data following between systems using one common API.
bantonia Posted June 25, 2010 Posted June 25, 2010 Hi cgilmour Are you running the server side part of the RMI software and modified the environment paths as in the instructions?
bantonia Posted June 25, 2010 Posted June 25, 2010 You can write databack into SIMS.net if you used SIF. You could have data following between systems using one common API. Could you point me to SIF.
penfold_99 Posted June 25, 2010 Posted June 25, 2010 Could you point me to SIF. The SIF community is here Welcome to the SIF Association there are currently 2 moodle SIF agents for moodle avaliable, one does basic course creation and enrolment and the other does course creation, enrolment, groups management and parental egagement. 1
bantonia Posted June 25, 2010 Posted June 25, 2010 The SIF community is here Welcome to the SIF Association there are currently 2 moodle SIF agents for moodle avaliable, one does basic course creation and enrolment and the other does course creation, enrolment, groups management and parental egagement. Thanks
bantonia Posted June 25, 2010 Posted June 25, 2010 I can only see SIMS->Moodle transfer not the other way around. One quote on http://moodle.org/mod/forum/discuss.php?d=123795 says "Capita are not going to follow the SIF at all", this was about a year ago though and may be just hearsay.
penfold_99 Posted June 25, 2010 Posted June 25, 2010 I can only see SIMS->Moodle transfer not the other way around. One quote on http://moodle.org/mod/forum/discuss.php?d=123795 says "Capita are not going to follow the SIF at all", this was about a year ago though and may be just hearsay. Two way data flow is possible as we are currently developing attendance modult that will sit in moodle and enable teachers to take a register and the data will be sent back using SIF. Capita are comitted to SIF, I am attending a meeting with Capita, Serco, RM and other regarding timetabling in SIF. The best thing to do is to come along to the next SIFA Meeting on the 9th & 10th November (venue TBA). @Grumbledook: attended the last meeting and found it enlighting .
bantonia Posted June 25, 2010 Posted June 25, 2010 (edited) Hi cgilmour, I've uploaded an example to sourceforge (https://sourceforge.net/projects/simscommandrepo/files/) with instructions which views the data from assessment manager. There is an associated .repdef file which has to be imported into sims. I have ran a few tests and have managed to duplicate what you found. If you ran the report from the command line, but in running, an error was produced, then the error you received was produced when that same command line was run in the client software. This happend in my tests when the report name was incorrect or the report required parameters to be chosen. As far as I can see this is a result of the commandreporter.exe producing an error which is not being passed back to the client in a clean manner. I will at some point update the server side code and library to cope with this situation and report back appropriately. You could create a new java application and use the code below to test. Replace the appropriate places to suit your server and SIMS login. I have left out the "package" line, just copy and paste the rest after your generated "package" statement. I have chosen a CES report so you should have it in your system. The commandreporter string doesn't have to have the "commandreporter" within it, it will automatically appended anyway, the same goes for the "/quiet". Parameters "/user:xxxx" and "/password:xxxxxxx" can be in the commandreporter string but they can be left out and set instead using the setUsername and setPassword methods before the execute method. Note: If the report name contains spaces then the report name has to be enclosed in quotes, programatically this means adding escapes within the string \" before and after the report name. Running this report should produce a list of students with some of their details. P.S. don't forget to include the library. Also I have noticed the Level.SEVERE gets mangled on the edugeek site, the space needs to be removed. import java.rmi.RemoteException; import java.util.*; import java.util.logging.*; import net.beaconhillcott.CommandReporter; public class Main { public static void main(String[] args) { CommandReporter cr=new CommandReporter("myserver"); try { cr.execute("commandreporter /user:myuid /password:mypass /report:\"School List: Alphabetical Order\" /quiet"); Iterator i=cr.getFieldNames().iterator(); while (i.hasNext()) { System.out.print(i.next()+" "); } System.out.println(); i=cr.getDataRecords().iterator(); while (i.hasNext()) { ArrayList list=(ArrayList) i.next(); Iterator j=list.iterator(); while (j.hasNext()) { System.out.print(j.next()+" "); } System.out.println(); } } catch (RemoteException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } } } Edited June 26, 2010 by bantonia Added text
bantonia Posted June 26, 2010 Posted June 26, 2010 Two way data flow is possible as we are currently developing attendance modult that will sit in moodle and enable teachers to take a register and the data will be sent back using SIF. Capita are comitted to SIF, I am attending a meeting with Capita, Serco, RM and other regarding timetabling in SIF. The best thing to do is to come along to the next SIFA Meeting on the 9th & 10th November (venue TBA). @Grumbledook: attended the last meeting and found it enlighting . Hi, As I understand it from http://www.edugeek.net/forums/mis-systems/39063-sims-zis-agent-6.html you say there is going to be a cost for SIF Agents, at the moment I'm looking for an opensource no cost method of transferring data from SIMS even if it is only one way, restrictive but better than nothing at all.
bantonia Posted July 2, 2010 Posted July 2, 2010 Updated the RMI server to return more descriptive error messages back to the client.
cgilmour Posted July 2, 2010 Posted July 2, 2010 Thanks Bantonia will give it a try when I get a chance :-)
bantonia Posted July 16, 2010 Posted July 16, 2010 Going my own route, SIF seems expensive when I can write routines to use the REST protocol to transfer data to Moodle 2. I'm currently waiting for updated routines within Moodle 2 to continue writing my Java REST communication class. Whilst waiting, I am writing, for my own brain massaging, an alternative to the parents view of Learning Gateway utilising a JSP running within Glassfish which fetches data via the CommandReporter Java API. Authentication is working and currently just basic information can be viewed. Changing the SIMS report by adding and removing fields, exposes more or less of the data to be viewed by the parent. I'm going to modularise the code so each additional class can show a different view of selected data. One good thing, no provisioning required and when students leave no tidying up to do with parental accounts. This is just for info if anyone is interested.
MattMitchell Posted July 17, 2010 Posted July 17, 2010 Sounds interesting, but I'm not convinced that commandreporter would scale well to a few hundred parents accessing the site during period one registration!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now