DPenfold Posted March 16, 2016 Posted March 16, 2016 Hi having another snagging issue here, this time with timetables; Install the plugin Import the RptDef into SIMS Run the Report from SIMS Save it into the App_Data folder Go to timetable.aspx and click process report Make sure the EmployeeID is the students' UPM Quoye from http://www.edugeek.net/forums/home-access-plus/163095-timetable-addon.html Followed these steps, it states import done. Try searching for student via name/username or UPN and I get nothing. Running a test I've logged in to our test student (applying UPN to 'EmployeeID' in AD) and nothing loads up. I've reinstalled the plugin, re-imported/run/downloaded report from sims, ran it through the converter on the timetable page (and this time I can actually see data appearing in the 'timetables.xml' in app_data) but trying to search for a student or logging in as them and I get nothing. Had quick check in event viewer and I can see this (not 100% if related as I can load pages fine (just not the timetable data) Page: System Invalid URI: The hostname could not be parsed. System.UriFormatException: Invalid URI: The hostname could not be parsed. at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at HAP.Web.LiveTiles.ExchangeConnector.Appointments(DateTime From, DateTime To) at HAP.Timetable.API.LoadFromTo(String From, String To) at SyncInvokeLoadFromTo(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at HAP.Web.LiveTiles.ExchangeConnector.Appointments(DateTime From, DateTime To) at HAP.Timetable.API.LoadFromTo(String From, String To) at SyncInvokeLoadFromTo(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Any input would be great
Stuajnht Posted April 14, 2016 Posted April 14, 2016 Hi, Not sure if you're still having problems with this, but here's how I've got it working at our end (after a bit of backward engineering - YMMV). Change the values as needed to fit your environment and try accessing the URLs (you will be prompted to log in to HAP+ first if you aren't). The HAP+ timetable plugin calls the API URL: https:///hap/api/timetable/LoadUser When accessed manually this only seems to return [], an empty request, so the timetable page doesn't know what to display. If it does the same for you, try using the alternate API URL (below in code), which should return a timetable (prettified here) in the following format: https:///hap/api/timetable/LoadUser/ [ { "Day":1, "Lessons":[ { "Description":"Biology", "EndTime":"09:55", "Name":"10SS1\/Bi", "Period":"1Mon:1", "Room":"BIO", "SortRef":"1Mon:1", "StartTime":"08:55", "Teacher":"[Redacted]", "UPN":"[Redacted]", "YearGroup":"10" }, { "Description":"Mathematics", "EndTime":"10:55", "Name":"10a\/Ma1", "Period":"1Mon:2", "Room":"11", "SortRef":"1Mon:2", "StartTime":"09:55", "Teacher":"[Redacted]", "UPN":"[Redacted]", "YearGroup":"10" }, // Snip... { "Description":"Spanish", "EndTime":"13:10", "Name":"10A2\/Sp1", "Period":"1Fri:4", "Room":"EX2", "SortRef":"1Fri:4", "StartTime":"12:10", "Teacher":"[Redacted]", "UPN":"[Redacted]", "YearGroup":"10" }, { "Description":"Biology", "EndTime":"16:00", "Name":"10SS1\/Bi", "Period":"1Fri:6", "Room":"BIO", "SortRef":"1Fri:6", "StartTime":"15:00", "Teacher":"[Redacted]", "UPN":"[Redacted]", "YearGroup":"10" } ] } ] If it does, then it should just be a case of modifying a line in the Timetable.aspx file, which should be located in the root of the HAP+ server (probably C:\inetpub\wwwroot\hap\Timetable.aspx). The usual warnings apply here, such as taking a backup of the file, use the code at your own risk, this modifies a core file so may break on updates, etc... Open the file in your favourite text editor, and look at line 32. It should read: url: hap.common.formatJSONUrl('~/api/Timetable/LoadUser'), Change it to be: url: hap.common.formatJSONUrl('~/api/Timetable/LoadUser[b]/<%=((HAP.AD.User)Membership.GetUser()).UserName %>[/b]'), Then save the file and reload the timetable page. You should have a timetable showing for the student you've logged in as. Note: Also check that the file generated by HAP+ looks like the following (located at C:\inetpub\wwwroot\hap\App_Data\timetables.xml): // Snip... 1
DPenfold Posted April 15, 2016 Author Posted April 15, 2016 I'll have look through this and implement the changes (hopefully it will work for me) thanks!
DPenfold Posted April 20, 2016 Author Posted April 20, 2016 https:///hap/api/timetable/LoadUser Thanks again, tried implementing the suggestions however I currently only have JS.cs and nothing else, no timetable folder (or obviously sub folders etc.). I've tried quickly downloading the plug in again from the official site https://hap.codeplex.com/releases/view/135112 And that doesn't have an API folder either, so I'm kinda stuck there. That might be the route of my issues (or additional that and needing to make the alterations you suggested.
Stuajnht Posted April 20, 2016 Posted April 20, 2016 Thanks again, tried implementing the suggestions however I currently only have JS.cs and nothing else, no timetable folder (or obviously sub folders etc.). I've tried quickly downloading the plug in again from the official site And that doesn't have an API folder either, so I'm kinda stuck there. That might be the route of my issues (or additional that and needing to make the alterations you suggested. From the timetable plugin file that is downloaded, there's 4 files in it. This folder should be extracted the the main HAP+ root folder, whereby a Timetable.aspx file in the the root; a HAP.Timetable.dll inside the "bin" folder; Timetables.RptDef and timetables.xml files in the "App_Data" folder. The API that is shown in the server URL isn't a folder as such, just a service created when HAP+ runs.
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