eddyc Posted May 25, 2016 Posted May 25, 2016 Hello all, Really love Home Access Plus+ - Installed it yesterday and looking to launch it after half term. Everything works really well, except I am having difficulty with the timetable aspect and wondered if anyone had any pointers? If I run the SIMS report and drop it into the APP_Data folder, when I click on "Convert SIMS.net Export" I get the following error message. Any pointers would be greatfully received. Kind regards, Eddyc Server Error in '/' Application. Index and count must refer to a location within the string. Parameter name: count Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Index and count must refer to a location within the string. Parameter name: count Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [ArgumentOutOfRangeException: Index and count must refer to a location within the string. Parameter name: count] System.String.Remove(Int32 startIndex, Int32 count) +14418724 HAP.Timetable.Timetable.convert_Click(Object sender, EventArgs e) +751 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34209
eddyc Posted May 25, 2016 Author Posted May 25, 2016 And from the application logs; An error occurred in Home Access Plus+ Page: /timetable.aspx Message Exception of type 'System.Web.HttpUnhandledException' was thrown. Source System.Web Target site Boolean HandleError(System.Exception) Stack trace at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.timetable_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\2ed0c491\10dc706f\App_Web_12a0hgkb.3.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ToString() System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: Index and count must refer to a location within the string. Parameter name: count at System.String.Remove(Int32 startIndex, Int32 count) at HAP.Timetable.Timetable.convert_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.timetable_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\2ed0c491\10dc706f\App_Web_12a0hgkb.3.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Stuajnht Posted June 7, 2016 Posted June 7, 2016 Hi, Not sure if you're still having problems with this, and it's a little after the start of the term, but it may be due to the format of the report that SIMS generates compared to what the timetable conversion tool expects. Here's a snippet of the report that is generated from our SIMS: 0000000000 Y10 8P1/En4 English Mon:6 15:00 16:00 Mr Hart 03 The HAP+ plugin expects the following format for the following fields: YearGroup - This value should have the year number in the 6th character position with anything before it, i.e. "Y10" should instead be "Year 10" (2 spaces, or even just "banana10") Name - This needs to be in the format :, i.e. "Mon:6" should be "1Mon:6" Looking at the event viewer log, it's most likely the first option that's causing the problem (emphasis mine): [color=#333333]System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: [i][b]Index and count must refer to a location within the string[/b][/i].[/color] [color=#333333]Parameter name: [i][b]count[/b][/i][/color] [color=#333333]at System.String.[i][b]Remove(Int32 startIndex, Int32 count)[/b][/i][/color] [color=#333333]at HAP.Timetable.Timetable.convert_Click(Object sender, EventArgs e)[/color] If you need to convert this for a large number of SIMS records, and don't fancy find + replace, I have a PHP script somewhere that generates a formatted file for HAP+, which is a bit more lenient with the format of the SIMS export (YMMV). Hope this helps somehow. 1
eddyc Posted June 7, 2016 Author Posted June 7, 2016 I would love to see your php script and give that a whirl. I did think that it might be relating to the day mapping being incorrect but the find and replace made a bit of a mess of the report! Ed Hi, Not sure if you're still having problems with this, and it's a little after the start of the term, but it may be due to the format of the report that SIMS generates compared to what the timetable conversion tool expects. Here's a snippet of the report that is generated from our SIMS: 0000000000 Y10 8P1/En4 English Mon:6 15:00 16:00 Mr Hart 03 The HAP+ plugin expects the following format for the following fields: YearGroup - This value should have the year number in the 6th character position with anything before it, i.e. "Y10" should instead be "Year 10" (2 spaces, or even just "banana10") Name - This needs to be in the format :, i.e. "Mon:6" should be "1Mon:6" Looking at the event viewer log, it's most likely the first option that's causing the problem (emphasis mine): [color=#333333]System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: [i][b]Index and count must refer to a location within the string[/b][/i].[/color] [color=#333333]Parameter name: [i][b]count[/b][/i][/color] [color=#333333]at System.String.[i][b]Remove(Int32 startIndex, Int32 count)[/b][/i][/color] [color=#333333]at HAP.Timetable.Timetable.convert_Click(Object sender, EventArgs e)[/color] If you need to convert this for a large number of SIMS records, and don't fancy find + replace, I have a PHP script somewhere that generates a formatted file for HAP+, which is a bit more lenient with the format of the SIMS export (YMMV). Hope this helps somehow.
Stuajnht Posted June 7, 2016 Posted June 7, 2016 I would love to see your php script and give that a whirl. I did think that it might be relating to the day mapping being incorrect but the find and replace made a bit of a mess of the report! Ed OK, I'll have a look for it tomorrow and try to tidy it up a little before I post it.
Stuajnht Posted June 8, 2016 Posted June 8, 2016 Hi, I've uploaded the script here: https://gist.github.com/stuajnht/91d40f8610c2ec2665947f7edfb4d85c Just upload it to a PHP server somewhere (or run one locally) and browse to the page. There's some simple instructions, but it's basically paste in SIMS output, save parsed output, remove any duplicate lines (mainly for multiple teachers per class). It's not the prettiest thing in the world, but it should get the job done. Let me know if you need any help with it. 1
eddyc Posted June 9, 2016 Author Posted June 9, 2016 Thanks will give this a whirl and report back :-)
eddyc Posted June 9, 2016 Author Posted June 9, 2016 Ok cool, the import now runs with thanks. However if I go admin options > impersonate student > provide UPN and click UPN the screen remains blank. I'm sure I can't be that far away now!
Stuajnht Posted June 9, 2016 Posted June 9, 2016 Ok cool, the import now runs with thanks. However if I go admin options > impersonate student > provide UPN and click UPN the screen remains blank. I'm sure I can't be that far away now! Hi, I'm assuming that you've mapped the student UPNs to their AD Employee IDs. Have you also tried applying the first UPN to your own AD Employee ID value and seeing if it loads when you browse to the calendar (for testing, you can remove it later). Can you try browsing to the following URLs on your HAP+ server: https:///hap/api/timetable/LoadUser https:///hap/api/timetable/LoadUser/ The first link will most likely just return [], but the second link should return the timetable in a JSON format. If it does, have a look at the steps shown here: http://www.edugeek.net/forums/home-access-plus/167663-importing-timetable-sims-not-working.html#post1444905 If you're still having problems, could you post a screenshot, possible page load errors, any relevant looking items from event viewer and a anonymised snippet of your timetable.xml file?
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