Archive for November, 2015
1. For the new item of creating individual groups, i got the portion of code that creates the individual groups done. The issue I would have this week is figuring out how to make it a background process, or have a progress bar. I finished suggested changes for creating csv groups and delete individual groups.
2, Main road blocks is figuring out how to run a background process from a controller. I looked at add ons that run background processes, but they seem to be running as tasks. I wonder if you have any insight on what i should look for exactly or is there another example in the code that i can look through? Also, for one of the pull requests i have open, the hound comments are giving inconsistent feed back. When I use single quotes, it tells me to use double quotes and when I use double quotes it tells me to use single quotes.
3. This week i plan to figure out how to do the background process. If i cant figure something out tomorrow, and @reid if you have time, I would like some help on it
1. This week I fixed up the place where dangerouslySetInnerHTML was used for searching and filtering the submissions table. I also started documenting places where Prototype exists in the automated test code, which is slowly getting done.
2. I had to do some research about Rails and React when it came to escaping HTML strings to prevent security issues, so this took a bit of time.
3. I’m hoping to finish up the Prototype documentation and removal related to the automated test code by the end of the week. If I have time I’d like to work on one more issue before the end of the semester.
Last week I got the nested file selector displaying files correctly, tweaked the visuals a bit (such as by adding scrollbars), and cleaned up my code for adding the subdirectories to the seed data. I still want to make the layout a bit nicer (it doesn’t highlight the selected file, and there is a lot of wasted white space to side), so I’ll do that this week before I submit the pull request.
Related to the seed data, I found that when I was trying to delete the data in the assignment repositories, “bundle exec rake db:drop” doesn’t do that? I ended up deleting all my files in data/dev/repos, is this the expected way to do it?
Also, I’ve been looking over a couple of my previous pull requests that need fixing. I made the changes David suggested to the marking states (#2337) and will be testing it this week. Also reviewed the code for the late penalties (#2282) since I haven’t looked at it in a couple months but haven’t made any progress there yet. Not sure what’s wrong with #1109 but I’ll check that this week as well.
1.T his week I added markdown support in both marker and student submission/result viewing. I found we needed a server-side library (Redcarpet) when rendering the annotation summary list as the contents are rendered in the view so I created a View Helper that can be called on contents as they are rendered in a view (similar to the simple_format that is used). On the other hand, I used a client-side library (Marked) for the glowing code highlighter and “Preview annotation” functionalities. I initially aimed to have it all using the client side library but was running into weird edge cases (i.e. first line turning into a code block) when I tried to dynamically replace the contents that were rendered in the annotation summary. I felt that using the Redcarpet rendered views and Marked on dynamic areas (e.g. preview) led to a more consistent display of Markdown annotations.
Most of my troubleshooting involved trying to use the client-side library to replace rendered content, but as mentioned I chose to use a combination of both a server-side and client-side library, using them where applicable given the context/design of the annotations components. I could see the markdown view helper that I’ve added may be simple enough to use in future areas of development as well that will need server-side rendering of markdown text. Also ran into some conflicts with markdown and mathjax, but ended up fixing by disabling some settings in the Markdown renders that attempted to interpret tex-based math expressions . The only question I have regarding my changes before I submit a PR is if it is OK to use marked and redcarpet together given the fact that some areas of the annotation feature require dynamic display and others render the annotation in the view? Compare view available here: https://github.com/MarkUsProject/Markus/compare/master…finnergizer:issue-2305 .
This week, I will respond to feedback/suggestions for this feature, and possibly take on another issue that can be done within the remaining time for the project.
1. Worked on checking tokens for running a test, re-doing the student interface for launching a test and viewing test results and grades
2. Make any changes to the student interface view based on the PR I have up. And since term is coming to an end, I wonder if we want to try merging the work we’ve done so far into master and then gate/disable the feature? Or if not, then consider merging master into test-framework again to keep it up to date.
3. Not 100% sure what to prioritize next.
1. Responded to David’s comments in my PR from last week. Also did a fair bit of code cleanup to make the code less confusing and easier to understand for anyone working on it in the future. Still trying to get the editing feature working and spent most of my week on attempting to debug that. Fixed a small bug with the support file upload as well (now working correctly)
2. Still not entirely sure why editing isn’t working as I have replicated the logic used previously. It is trying to create a new file instead of modifying the existing one. Also some issues with the upload form generating incorrect values such as seq_num starting at 1.0 when there are files already uploaded (seq_nums must be unique). This breaks the ability to upload files once one is already uploaded.
3. Will continue working on getting editing uploaded test scripts working and hopefully resolve the seq_num issue.
1. This week I made some changes to my branch for issue #2050. This is done now and awaiting further review. I also worked on getting search and filtering working in the submissions table. I submitted this but David suggested a few more changes to make so that we no longer have to use the “dangerouslyUseInnerHTML” component. Finally I worked on investigating the lingering Prototype in the automated tests code.
2. It turns out the automated tests file that had lingering Prototype called has some other files that are pretty dependent on it, so I don’t think it would be a good idea to delete it. Had a bit of a hard time figuring out how to test my changes for the Prototype code related this, but now I believe I know how to do this.
3. I’ll work on making the changes for my submissions table issue and then continue to remove Prototype code from the automated tests files, now that I know how I can test it.
1. I created a pull request for the delete group function for students when they click create group. The delete group method delete the entire grouping as long as there are no submissions. And its currently only available to the “inviter” of the group. I dont know if that should be changed and made available to everyone?
2. No roadblocks this week.
3. I did look in to creating the create group button for instructor interface for individual assignments. It seems pretty straightforward, but it also comes with a performance issue when the class size gets fairly large. So it would be nice to get some ideas/input on that.
So last week I figured out how to add folders to the seed data in the assignment submissions to test the nested file selector.
I was hoping to do more but unfortunately this took me a few hours. I found the location of the seed files (db/data), created some folders there and then located the code that adds those files to the repos when bundle exec take db:setup is called. I then tried to add the folders to the repos by calling an existing function, which worked, but when I tried to add the files inside the folders, I would get an SVN error saying the parent folder is not a directory. Eventually got it working by changing the name of the folder in the generated repo (e.g. A1/something) so that it’s different from the name of the folder I made inside db/data. For some reason this fixed it and the files show up in the Submission page.
Next week I’ll hook it up to the UI I made previously.
1. Rewrote methods for running tests to execute them locally – removed server choosing/rotation functionality. Scrapped XML parsing functionality to instead store the results as JSON. David merged the PR in yesterday (thanks!).
2. Remove SSH from test run commands and run them on the local server directly. David was having an issue with the test results not being produced, so investingating that further. I think it might be due to some issue with the form uploading but I’m not 100% sure. So syncing those changes with Wilson’s too. Ideally going from there to start returning the test results to students – I don’t think this UI existed previously.
2. No troubles. As tough as the rubocop/hound comments can be, it is nice to be forced to learn some of the idioms of the Ruby language to ensure the code that we commit is readable and concise.
3. I hope to finish the markdown support in annotations and get a PR in for it this week.
1. Worked on the upload form again this week. Rewrote a large part of the automated_test_helpers file so that the file name for test scripts are now properly being accepted and uploaded. Multiple file uploads should also be supported again. It no longer lets you upload files with the same filename as well as they must be unique. Support files for tests should be added supported again soon once I add them back to the form as they were removed during our earlier work. I’m currently working on getting the ability to edit files working.
2. Running into issues with getting the ability to edit files working. It seems like it’s trying to create a new test script instead of editing the old one still, so I’m still looking into that.
3. Will continue working on editing files that are uploaded, as well as some general code cleanup involved with renaming confusing variable names from the existing code (such as script_name, which is actually test_script)
This past week I implemented a expandable nested list that will replace the flat list for selecting a file to view. I hard-coded the values for this list, so next week I will be hooking it up to the actual files. I was planning to do this the other way around (first get the existing flat list working with an arbitrary number of subdirectories, and then implement the expanding list), but then I realized that students can’t upload folders through the web UI so I wasn’t sure how to test the subdirectories. Is there a way I can directly add folders to the database, or do I need to use SVN?
1. Put up a pull request for running tests remotely, documented things which are oustanding. Looked more closely into the file upload. Files aren’t currently being created upon upload due to some confusion with attributes
2. Work on test script uploading. I think rewriting the code makes sense for the backend.
1. Spent this week working again on the upload form. I feel I am at a spot where i know exactly what’s not working and why, am just working on a solution. Currently, the filename is not properly being passed in which results in the filename being stored incorrectly, and unable to be downloaded. Tried a few solutions but was unsuccessful. This is a result of it being passed through the headers now which I cannot seem to access. The other issue is that a check is done against the test file id, which is not being passed in. I spent some time trying to pass this in, but am unsure of how to retrieve it from the form.
2. The main problem is with the wrong parameters being passed in by the form, and not being able to access the filename via the headers. Going to talk to David about how I can access this as I was unable to find help on this topic through Google. I was also unable to figure out how to access the test script ID through the form, and am still looking into that.
3. Will continue working on the test upload form. I think once I figure out the issues I’m working on I will be able to quickly fix the other issues with the form as I now have a good understanding of how its supposed to work and whats not working.
1. This week I worked a lot on style changes and refactoring requested for the TA Activity PR. There were quite a few things that I had to troubleshoot for a long time and it slowed me down(i.e. some controller methods being placed after private declarations), but overall I am happier with the state that its in. I will continue to respond to requests for this PR as fast as possible. I have left notes on the three remaining comments with some justification as to why it has been coded that way.
2. Small problems when refactoring be more concise that I attribute to simply not knowing all the ins and outs of Ruby and Rails. So although this had slowed me down a bit, it was pretty good to find the solutions and get to know the intricacies a bit better.
3. I will look at some outstanding issues and continue to respond to TA activity PR comments. Is there a high priority issue that you would prefer me to work on?
1. This week I worked on finishing issue #2050 for helping instructors see any submissions that have no files in them, and provide the option of not assigning graders to groups with empty submissions. I started to investigate the submissions table like David asked me to last week.
2. I had some job interviews and assignments this week, so it was another hard week for time management. Everything has settled down this week so I’d like to get two issues done.
3. Next week I will continue to look into the submissions table, I’ll also work on #2351 reported by @arkon, looks like I missed a bit of Prototype code in the automated testing files.
1. Last week I spent on the delete group function for students. For now I assumed that only the inviter can delete the group and that the whole grouping is deleted rather than a single member being deleted from the grouping. I don’t know if we could reuse the remove group method that is already in the groups controller but the code i’m writting follows the exact same flow.
2. I am having trouble with routing the front end to the backend. I think im just missing rails understanding so i have to look more in to that.
1. Started work on #2050, flagging submissions with no files attached. I’ve got it mostly working, I just need to account for the option of not allowing professors to assign graders to empty groups when they choose to randomly submit. (Right now it works only for submitting a grader to specific groups)
2. No roadblocks this week, other than an assignment/midterm heavy week. After this week I’ll be able to put a lot more focus into this course!
3. Next week I’ll finish up #2050 and talk to Karen and David for something else to do. I may pick up some issues I find in the list if I run out of things.
1.This week I created a pull request for the csv group creation and started looking in to why removing a member from the group fails. I think it might be because of the way the groupings are handled when a student is removed, but i did not get to look too deeply in to it.
2.The main road block for me was code formatting
3. This week i’m planning to fix the issue with removing a member from the group and doing suggested code changes for the pull request
1) Worked on the test execution functionality, digging into Resque. Figuring out how Redis and Resque worked together. Now able to run test locally.
2) Test runner doesn’t seem to be outputting (essentially) blank XML. Need to dig deeper into that. Determine if it is due to a bad merge or just isolated to a few languages
Last week I turned the checkbox for releasing marks into a button. This is mainly for consistency as I changed the dropdown for marking status into a button the week before. Also I briefly looked for potential bugs in the code for downloading submissions, which I think is good. I can’t think of a corner case where downloading the submissions would trigger a collection, which the user reported.
Next week I could implement some more additions to the grader UI.
3. Will continue working on a fix if Karen or David have any suggestions for changing the implementation. Otherwise, will be back on the test upload form this week.
Made revision to TA pull request as recommended by david and others
Added short form x/y marked presentation in dashboard view
Designed a separate dashboard page that displays all the graders and their distrubtions/information. This page can be accessed by clicking an “All Graders” link near the grader distribution from the dashboard when you are viewing a specific assignment.
Full screen with many graders (I repeated each grader multiple times to simulate a large amount of graders) :
Mobile sized screen with many graders:
Added an overflow option to scroll when there are many TAs (i.e. 40) so as to prevent a very long list expanding the dashboard view down too much.
Had trouble committing because rubocop-git (in the script that I made) fails on certain characters (i.e. those added in the internationalized string files). Just an FYI if anyone runs into an error using the pre-commit script and have added some of these characters to the internationalized strings.
I will be prompt to respond to any suggestions/fixes for the PR as it is getting quite large.
If there aren’t any more requirements for TA activity, I am going to work on a new issue this week (#2344 possibly).
1. Had a bit of a busy week with all my midterms this week but mostly worked on investigating some of the issues Jeremy outlined in his PR. I looked into being able to upload multiple test files but didn’t have a lot of luck as i’m a bit confused at how some of the stuff currently works so will have to do some more research into it. I also tackled some of the hound issues and currently have a PR for Jeremy’s branch.
2. Was unable to test my PR for the hound complaints because I had to do a PR to Jeremy’s branch and not the PR hound was complaining about. I couldn’t quite figure out how it was originally intenteded for the multiple test file upload to work. Maybe it would be better to focus on other things for now?
3. Will talk to Jeremy a bit after this meeting on how we want to proceed with things and get caught up with where he is on the project. I’m going to probably continue to try to support multiple test file uploads unless there is something else that is more urgent. I might cleanup all the code in a separate PR for hound so that we don’t have to deal with these hound complaints in the future as it is really cluttering up our PRs.
Last week I finished up the “Set to Complete”, “Revert to Incomplete” button and merged the marking states “unmarked”, “partial” to “incomplete”. Was relatively straightforward, but had a hiccup when I couldn’t figure out why I was getting a “Missing template” error for my new route that was defined for this toggling button. The solution was that I needed to use “render” instead of “render: template”. Next week I’ll add the new text field that shows the fraction of submissions that have been fully marked.
1) Worked to get a PR up with the changes around having a file uploaded. Ended up have to make some modifications to existing associations and the code to get it to a semi-working state.
2) Working with Wilson to get the file upload working completely. There are a lot of complaints from Hound and some comments from David to address.
3) A lot of the Hound comments relate to code that existed previously. I’m not sure if the best bet is to modify them in the current PR or create new PRs to clean that up later?
This week I finished the csv group creation (branch https://github.com/binuri/Markus/tree/issue-2338). I haven’t tested it yet, so I should be able to create a pull request on Thursday. I also picked up an issue for creating a column in the detailed csv report. I added the feature but I am currently tackling the hound >.<
No road blocks this week
Added grade distributions per TA for each assignment in the assignment dashboard. Example views provided below.
From the assignment dashboard, each grader has a hyperlink, which when clicked refreshes the distribution graph for the selected TA.
I ran into troubles when creating a remote controller action, which when called would return the new distribution for the selected TA. Initially, the action would render the JS before it actually computed and returned the distribution (causing an error). So I added a :before_action to workaround this, but am curious if anyone knows why this had to be done (and why in Rails it does not render the JS once the previous statements have been executed). Either way, this approach worked, but if anyone has insight, that would be great.
I plan to add the annotation per TA to the dashboard.
I will look at any outstanding issues that I can tackle.
I will think about more TA analytics that could add value to the dashboard view (and if I am recommended any, I will work on those as well)
1) This week I finished up with Prototype. I thought it was done earlier in the week, but I forgot to restart the Rails server when I was testing. As a result I found a lot more errors I missed later in the week, which have now been fixed. Annotations suffered the most, I think they are back to where they should be now.
2) No roadblocks.
3) I’ll be working on Issue 2050 for flagging empty submissions. If I finish that I may try to fix a bug I reported today.
1. Fixed the polymorphic_url errors caused by the target_controller selection. Fixed lots of hound syntax errors, and began working on understanding the process_test_form function. Tinkered with it a bit, and made a few changes that got it mostly working with the exception of an error involving the test_files relation.
2. Mainly the issue I had running into the test_files relation, but I believe jeremy solved that.
3. Will continue to work on getting the upload form functioning and documenting and fixing anything else I run into during the process.
1) Working on process_form method, looking at uploading of test file. Able to get this working locally
2) Submit a pr for the work i’ve done so far, base it off of wilson’s pr. Start looking at multiple test file upload (form currently doesn’t render once a test file is uplodaded due to some issues with the seq_num field of a test file)
3) Figuring out how to use version control when working off a PR in progress – I think I’ve figured it out now!
Last week I was able get a strict guideline of how the creation of groups to go after discussion with Karen and David. I have the code done with a few questions/exceptions. I was not however able to test out Karen’s feature branch regarding the group permissions (Sorry Karen!)
One main road block was time with everything else that’s going on. Other than that, a few questions I ran in to are
#a. What issue should I create the branch for? There’s a couple relating to groups. #2180 and #2237. Or should I create a brand new one?
#b. For a assignment with individual groups, if the student given by the memberships doesn’t exist, shouldn’t we throw an error? (Same scenario for group assignments)
#c. Maybe this is just me but to me the csv function sort of feels incomplete now because when an instructor wants to create a grouping between a group from an old assignment to a new assignment, they won’t be able to do that because the csv file upload only works for brand new groups.
Last week, I looked at the update_marking_status function that gets called when you change the marking status, and wrote an analogous function + route that just changes the marking status to complete. I then made a button for this in the submission view, but I had some trouble finding the right syntax to hook them together (was trying button_tag, but I believe I should be using button_to). Also, I searched for all the places that referenced the marking status unmarked or partial and changed them all to incomplete. However, I haven’t tested this yet.
Next week, I’ll be finishing up this task and then moving on to the next item to add to the grader view, which is the fraction of submissions completed.
I created a PR for the changes that I have made thus far to report on TA activity. I also did a writeup for my contact here at the University as to what is going well and what is not. Unfortunately, this week I had a lot of midterms and assignments, so I wasn’t able to get much more in the way of adding more analytics. Today, I plan to tackle my initial goal for this week of creating a distribution of marks for each TA for each assignment.
This week I plan to add visualizations in the assignment graph area. I am welcome to any more requests for metrics (I currently have # of assignments completed marking, # of annotations per submission, grade distribution for TAs for each assignment).
2. No code roadblocks. I did manage to break my laptop, so I had to get an old one up and running and re-set up the MarkUs dev environment. This is working now, but it cost some time.
3. Early into the week I’d like to get a pull request in with the changes mentioned above. After that I think I’m done with prototype. I was thinking of looking into the “General Issues” project, which has a few medium sized issues in it. Is that a good direction to be heading in?