-
-
Notifications
You must be signed in to change notification settings - Fork 166
Ww3 feature/fix classlist #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I've tested this and have a question or two.
|
|
can you send me the file that you are trying to load? I’m trying to build in some error checking on files, and problem files would be helpful to troubleshoot and include some error checking. #2 and #3 seem reasonable. I’ll work on that. On Apr 25, 2014, at 2:11 PM, Geoff Goehle notifications@github.com wrote:
|
|
I've attached the file. I generated it by using export (and then deleted On Wed, Apr 30, 2014 at 10:30 AM, Peter Staab notifications@github.comwrote:
|
|
Seems like you can't attach things to github replies. The text of the file is below: "Student ID","Last Name","First Name","Status","Comment","Section","Recitation","Email","Login Name","Password","Permission Level" |
|
Couple more issues:
|
|
This doesn't merge cleanly anymore since I merged the previous pull. |
…3-feature/fix-classlist Conflicts: webwork3/public/js/apps/CourseManager/CourseManager.js
|
I was able to load the file that you listed above. I tried in 3 browsers (safari, chrome, firefox) and all worked fine. I did just merge the cleanup branch, try pulling this again and try that again. |
|
About the scrolling table on the import students manually, here's a thought:
Let me know about this flow instead? |
Geoff. On Fri, 2014-05-02 at 05:50 -0700, Peter Staab wrote:
|
|
Still doesn't work for me, although I noticed that when I select the file I get the message TypeError: this.errorPane is undefined AddStudentFileView.js:68 So AddStudentFileView.js is trying to give me an error it seems. |
|
Geoff, Can you send me the file so we’re both using the exact conditions. Also, what browser are you using? Peter On May 5, 2014, at 1:29 PM, Geoff Goehle notifications@github.com wrote:
|
|
The contents of the file are exactly those that I posted before. I tried On Wed, May 7, 2014 at 11:56 AM, Peter Staab notifications@github.comwrote:
|
|
I don't see how this is a permissions issue. The class list is not uploaded to the server. Instead the file is read on the client and the individual users are added via dancer post calls.
|
|
Ah. Well then I don't know. Maybe its because I use the new fcgi way to Geoff. On Wed, May 7, 2014 at 2:17 PM, Peter Staab notifications@github.comwrote:
|
|
I reopened a ww3 branch. |
|
Ok, so I've messed around with it. The message that WW3 is trying to give me (but fails because of the missing error pane) is this.errorPane.setMessage({text: "You must upload a csv file"}); I get this message no matter what the file extension is on my file. This is a little confusing to me for two reasons. First, when you export students the default file name doesn't have a ".csv" attached to it. Also, the WW2 classlist editor looks for .lst files when it is doing from file import. I would stick with the .lst unless there is a good reason to change. |
|
I’ve got some time to play with this today. I’ll strip the .csv off my file and try this. (I thought I tested .lst files as well, but that’s been a while.) On May 14, 2014, at 9:52 AM, Geoff Goehle notifications@github.com wrote:
|
|
More follow up. You are using this.file.type.match(/csv/) to test the file type. However, I think file.type.match is maybe browser specific, or potentially misconfigured. Its testing the mime type which can be browser and system specific. http://w3schools.invisionzone.com/index.php?showtopic=45976 So it could be the fact that I'm using Debian, maybe. |
|
Yes, I see that now. Obviously, I’ll fix the error that it’s not alerting the user. About the line:
this will match the file suffix to “csv” so shouldn’t be browser or operating system specific. I think it is a good idea to check for some appropriate suffix. Maybe “csv” or “lst” Anything else? So I can change this to: this.file.type.match(/csv|lst/) On May 14, 2014, at 9:57 AM, Geoff Goehle notifications@github.com wrote:
|
|
If you do that you should change it so that the exported file either has a csv or lst suffix. I'm not sure that file.type.match does check for the file suffix, though. Everything I'm reading says that it is checking the mime type. I think you would need to do a check on the file name if you wanted to look for a suffix. |
|
I think you’re right. Your reference below seems to talk about the FileReader, but at this point in the code, there’s not a FileReader object yet. I can pull the suffix off the .name field of the File object though. On May 14, 2014, at 10:19 AM, Geoff Goehle notifications@github.com wrote:
|
…or message to the user.
|
I fixed that last one if you can try again. |
|
Great. The file loads now. A couple of issues now:
|
…3-feature/fix-classlist Conflicts: webwork3/public/js/apps/CourseManager/CourseManager.js
|
I pulled ww3 into this branch (again, all the js libraries are now in here), but should merge cleaning now. |
|
Ok. Looking good. I only see one small thing. If you export a classlist it doesn't have the .csv suffix. I think that should be added on and its a small change. Then I'll pull this. |
Ww3 feature/fix classlist The file has a csv extension now.
|
In trying to run this branch I had to manually change the call to perl at the top of webwork3/public/dispatch.fcgi. I am using a non-standard location since I am running off a |
Fixed some errors in the Classlist view.