peterdwyer Posted October 9, 2012 Posted October 9, 2012 We have a requirement that I don't think can be fulfilled via HAP.... but I'd HAPpy if I could be proved wrong - and so would teachers and students We have a "dropbox" folder structure where students can drop files (completed assignments etc) into a teacher's folder using Windows Explorer but cannot actually open the folder. The students have "write" rights but not "read" rights to each teacher's Dropbox. The structure goes something like this Dropbox (students have read rights) |- Mr Smith (students can only write) |- Mrs Jones (students can only write) -_ etc, etc It'd be good if students could open the top level folder (Dropbox) in HAP, displaying the teachers' folders and then drag their file(s) to the appropriate teacher's folder, just like they do when on the school network. In HAP, they can see the teachers' folders but attempts to drag and drop don't work. Presumably you must have a folder open to drag and drop into it If they try to "Open" a teacher's folder, they get a message similar to the following, which is to be expected: "Access to the path '\\server\dropbox$\Monsieur-Dowling-Yr-7-French\' is denied". Here's the entry from hapconfig.xml: \\server\dropbox$ Is there some way we might to be able achieve this? Thanks (In case you need to know, Our HAP is v8.1)
nickbro Posted October 9, 2012 Posted October 9, 2012 The homework section is what you are after, have a look at /myfiles/homework.aspx
mattgrimley Posted October 9, 2012 Posted October 9, 2012 Morning @nickbro homework.aspx doesnt load for me.. I get: [b]Server Error in '/hap' Application.[/b] Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 112: return false; Line 113: } Line 114: if(this.File.size > <%=maxRequestLength%>) { Line 115: alert(this.File.name + " " + hap.common.getLocal("myfiles/upload/filesizewarning")); Line 116: uploads.pop(this); It's been fairly consistent since homework.aspx first appeared in the builds - i saw it, i just didnt think it was ready hence the lack of a bug report! Regards, Matt
peterdwyer Posted October 9, 2012 Author Posted October 9, 2012 I've looked at the homework.aspx file but I've no idea how to interpret it. Will documentation be available in the future? Thanks
nickbro Posted October 9, 2012 Posted October 9, 2012 I'll try and fix this issue tonight, VS2012 doesn't want to work for me today in work
mattgrimley Posted October 9, 2012 Posted October 9, 2012 thanks @nickbro - sorry @peterdwyer I hadn't intended to hijack this thread, but i'm interested in the same thing you are talking about
nickbro Posted October 9, 2012 Posted October 9, 2012 @mattgrimley here's the fix: Open ~/app_localresources/en-gb/strings.xml Add under Path: Should look like Path: My Files - Homework New Edit Remove Title Description Start End Students Additional Teachers Are you sure you want to remove this homework? Upload Homework
peterdwyer Posted October 9, 2012 Author Posted October 9, 2012 Replaced the two files in the zip and updated ~/app_localresources/en-gb/strings.xml I then ran ~/MyFiles/Homework.aspx. It started up OK and I selected "New". I then added some test and as I chose a few students, up popped the message "Index was out of range...." See attached file homework01.png Logged in as a teacher and ran it (had previously ran with admin account). Didn't chose "additional teacher" and when I clicked on "save", I got "Not Found" (see attached homework02.jpg) Also changed the "path" to match a local path, without any success I was running Firebug but nothing changed as I ran it. Perhaps I've done something wrong
nickbro Posted October 10, 2012 Posted October 10, 2012 Ok, I think I've fixed it, you can download the fix from codeplex: https://hap.codeplex.com/downloads/get/502995
peterdwyer Posted October 11, 2012 Author Posted October 11, 2012 Copied the files and ran it. When I ran MyFiles/Homework.aspx, this is what I got. Thanks [h=1]Server Error in '/hap' Application.[/h] [h=2]Object reference not set to an instance of an object.[/h] 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.NullReferenceException: Object reference not set to an instance of an object. Source Error: [TABLE=width: 100%] [TR] [TD] Line 118: return false; Line 119: } Line 120: if(this.File.size > <%=maxRequestLength%>) { Line 121: alert(this.File.name + " " + hap.common.getLocal("myfiles/upload/filesizewarning")); Line 122: uploads.pop(this); [/TD] [/TR] [/TABLE] Source File: c:\inetpub\wwwroot\hap\MyFiles\Homework.aspx Line: 120 Stack Trace: [TABLE=width: 100%] [TR] [TD] [NullReferenceException: Object reference not set to an instance of an object.] HAP.Web.Controls.LocalResource.Render(HtmlTextWriter writer) +135 [ArgumentOutOfRangeException: The string myfiles/homework/path cannot be found] HAP.Web.Controls.LocalResource.Render(HtmlTextWriter writer) +508 ASP.myfiles_homework_aspx.__Render__control3(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\hap\MyFiles\Homework.aspx:120 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246 System.Web.UI.Page.Render(HtmlTextWriter writer) +40 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5290 [/TD] [/TR] [/TABLE] Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
nickbro Posted October 11, 2012 Posted October 11, 2012 Don't forget to do the steps in http://www.edugeek.net/forums/home-access-plus/102475-drag-files-onto-folder.html#post880438
peterdwyer Posted October 11, 2012 Author Posted October 11, 2012 Sorry, I'd made the change on my test environment and was testing on the production one. Yes it works but I can't work out how to use it. Is there a video? In any case, I'm not sure if this solution might fit our need, which is a procedure that we've had in place for many years. That is, for a student to be able drag files onto a folder that they only have "write" access to Thank you
nickbro Posted October 13, 2012 Posted October 13, 2012 You can try disabling the read/write checks via the config page. This should allow users to upload to the folder but not read to it. However HAP+ does a check on the folder to see if the file exists, so it may throw an error when it tries to do that.
Edu-IT Posted October 13, 2012 Posted October 13, 2012 Will you be updating the release with the fixes as I get that error too.
nickbro Posted October 13, 2012 Posted October 13, 2012 Not for a while, you can download the fixes from this thread
Marshall_IT Posted October 18, 2012 Posted October 18, 2012 When i try to add a new home i get: {"Message":"The given key was not present in the dictionary.","Detail":null,"FaultType":"KeyNotFoundException"} i hate asking so many questions
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