Check if invalid dates and gradeable_ids fail#1021
Conversation
wangj35
left a comment
There was a problem hiding this comment.
- popup message works if I have a space in the name
- popup message works if I have non alpha/numeric characters
- popup message works for all combinations of invalid date entries
- popup message works if no type of gradeable is selected
- popup message works if no config path given for an electronic type
- however, no popup message if I create a duplicate name gradeable, it still takes me to the error page
- consider making the popup message also appear for other invalid submissions that take you to the error page (setting a Numeric entry's max score to 0, for example). That can likely be in another branch though, it is just worth mentioning.
|
|
||
| <div class="modal-body" style="/*padding-bottom:80px;*/ overflow:visible;"> | ||
| What is the unique id of this gradeable? (e.g., <kbd>hw01</kbd>, <kbd>lab_12</kbd>, or <kbd>midterm</kbd>): <input style='width: 200px' type='text' name='gradeable_id' class="required" value="{$gradeable_submission_id}" placeholder="(Required)"/> | ||
| What is the unique id of this gradeable? (e.g., <kbd>hw01</kbd>, <kbd>lab_12</kbd>, or <kbd>midterm</kbd>): <input style='width: 200px' type='text' name='gradeable_id' id="gradeable_id"class="required" value="{$gradeable_submission_id}" placeholder="(Required)"/> |
There was a problem hiding this comment.
Add a space between these two: id="gradeable_id"class="required"
|
|
||
| $(id_of_time).val(createCrossBrowserJSDate(new Date())); | ||
| } | ||
| */ |
There was a problem hiding this comment.
Are you using the function nowButton?
There was a problem hiding this comment.
No that was something from before, I can get rid of it.
| }; | ||
| xmlhttp.open("GET","getuser.php?gradeID="+gradeable_id,true); | ||
| xmlhttp.send(); | ||
| */ |
There was a problem hiding this comment.
Is the code within /* and */ being used?
There was a problem hiding this comment.
No that was something from before, I can get rid of it.
| var date_due = $('#date_due').val(); | ||
| var date_ta_view = $('#date_ta_view').val(); | ||
| var date_grade = $('#date_grade').val(); | ||
| var date_released = $('#date_released').val(); |
There was a problem hiding this comment.
Do Date.parse() on these dates here instead of repeatedly below.
| var date_released = $('#date_released').val(); | ||
| var config_path = $('input[name=config_path]').val(); | ||
| var has_space = gradeable_id.includes(" "); | ||
| var test = /^[a-zA-Z0-9_]*$/.test(gradeable_id); |
There was a problem hiding this comment.
we should allow hyphens and periods maybe? @bmcutler
There was a problem hiding this comment.
yes to hyphens.
no to periods (but I could be convinced otherwise).
| if (!test || has_space || gradeable_id == "" || gradeable_id === null) { | ||
| alert("Gradeable id cannot be blank, null, have a space, contain special characters and must be unique"); | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Change the alert to be "Gradeable ID must not be blank and only contain characters a-z A-Z 0-9 _" (note emphasis).
Update sentence above to include - and . if they're allowed by @bmcutler
|
So I think don't worry about the unique check for now on gradeable_id (I need to add some routes to do this to the code so it's possible to do it efficiently). |
|
Please open a new issue for the unique check on gradeable id to be done later. |
|
Done, made #1036 |
* Added checks for the form for the user * updated with requested changes * updated with requested changes
* Added directories to path in execute.cpp. Added gfx installs and cmake permissions in install_system.sh * added php zip file fix * Added very rough version of window_utils * Added support for screenshotting. Separated window code into window_utils Author: Evan Maicus <emaicus@outlook.com> * Added support for delays and typed commands * Added detection of window name based on child pid * Added click and drag support. Added mouse support. * Added error checking and documentation * Large overhaul of click and drag. * Added comments, added alt button support in click and drag, tested in prep for pull request. * Added support for decimal delays. * add sorting options for labs, default viewing options for labs (#992) * add sorting options for labs, default viewing options for labs * sorting for registration and rotation grading * sort by more than just id * Progress on revising navigation page with submission status (#962) progress on issue #674 * Allow user to specify whether they should stay logged in (past browser closure), defaults to true (#1014) * Ambersands no longer get truncated (#1022) * Gradeable layout with only numerics (#1023) * Looks better when there are zero numeric fields * Looks better when there are zero numeric fields * Electronic grader, changes names of functions and default for if instructor has grading (#1026) * add sorting options for labs, default viewing options for labs * sorting for registration and rotation grading * sort by more than just id * changed function names * now user id not left aligned * remove unneeded code * Creating a new Numeric Gradeable has a total points row (#1025) * Added a row for total points. * total row is functional * is updated when you make a gradeable from a template * made suggested changes and fixed a typo. * all updates made * corrected some unnecessary changes * First draft of check_everything.py -- checks directory owner/group/permissions (#1030) * just starting * progress * a bit more * edits to check_everything script * more checks * change requests * rearrange logic * add to travis after_script * Extra credit colors (#1024) * Penalty, extra, and normal credit look diffirent now * Extra credit and penalty have colors and icons * The icons are now on the left * Create Gradeable: check for invalid dates and gradeable_ids (#1021) * Added checks for the form for the user * updated with requested changes * updated with requested changes * check for hwcron user at the top of grade_students.sh (#1044) * Update sample apache configuration for Ubuntu 16.04 configuration (#1020) * Improved checking of autograding execution of local and system programs (#1050) replace 'assignment' with 'gradeable' in grade_students.sh (improves consistency) better error message for attempted use of system programs that are not on the whitelist now scrapes the config.json for names of compiled_executables to improve the check for local programs if the config.json uses an unacceptable local, now it complains at BUILD time (not delaying to submission debugging as before) fix autograding test failures disabled seccomp because it's broken :( will make a new issue & fix that next, in a new PR #1051. * remove PHP 5.5 (#1054) * Added very rough version of window_utils * Added support for screenshotting. Separated window code into window_utils Author: Evan Maicus <emaicus@outlook.com> * Added support for delays and typed commands * Added detection of window name based on child pid * Added click and drag support. Added mouse support. * Added error checking and documentation * Large overhaul of click and drag. * Added comments, added alt button support in click and drag, tested in prep for pull request. * Added support for decimal delays. * Refactored comments, fixed spelling issues. * Fixed formatting, hacked seccomp * Fixed mislabeled allowed system programs
… in Electronic Gradeable Uploads (#1209) * Added directories to path in execute.cpp. Added gfx installs and cmake permissions in install_system.sh * added php zip file fix * Added very rough version of window_utils * Added support for screenshotting. Separated window code into window_utils Author: Evan Maicus <emaicus@outlook.com> * Added support for delays and typed commands * Added detection of window name based on child pid * Added click and drag support. Added mouse support. * Added error checking and documentation * Large overhaul of click and drag. * Added comments, added alt button support in click and drag, tested in prep for pull request. * Added support for decimal delays. * add sorting options for labs, default viewing options for labs (#992) * add sorting options for labs, default viewing options for labs * sorting for registration and rotation grading * sort by more than just id * Progress on revising navigation page with submission status (#962) progress on issue #674 * Allow user to specify whether they should stay logged in (past browser closure), defaults to true (#1014) * Ambersands no longer get truncated (#1022) * Gradeable layout with only numerics (#1023) * Looks better when there are zero numeric fields * Looks better when there are zero numeric fields * Electronic grader, changes names of functions and default for if instructor has grading (#1026) * add sorting options for labs, default viewing options for labs * sorting for registration and rotation grading * sort by more than just id * changed function names * now user id not left aligned * remove unneeded code * Creating a new Numeric Gradeable has a total points row (#1025) * Added a row for total points. * total row is functional * is updated when you make a gradeable from a template * made suggested changes and fixed a typo. * all updates made * corrected some unnecessary changes * First draft of check_everything.py -- checks directory owner/group/permissions (#1030) * just starting * progress * a bit more * edits to check_everything script * more checks * change requests * rearrange logic * add to travis after_script * Extra credit colors (#1024) * Penalty, extra, and normal credit look diffirent now * Extra credit and penalty have colors and icons * The icons are now on the left * Create Gradeable: check for invalid dates and gradeable_ids (#1021) * Added checks for the form for the user * updated with requested changes * updated with requested changes * check for hwcron user at the top of grade_students.sh (#1044) * Update sample apache configuration for Ubuntu 16.04 configuration (#1020) * Improved checking of autograding execution of local and system programs (#1050) replace 'assignment' with 'gradeable' in grade_students.sh (improves consistency) better error message for attempted use of system programs that are not on the whitelist now scrapes the config.json for names of compiled_executables to improve the check for local programs if the config.json uses an unacceptable local, now it complains at BUILD time (not delaying to submission debugging as before) fix autograding test failures disabled seccomp because it's broken :( will make a new issue & fix that next, in a new PR #1051. * remove PHP 5.5 (#1054) * Added very rough version of window_utils * Added support for screenshotting. Separated window code into window_utils Author: Evan Maicus <emaicus@outlook.com> * Added support for delays and typed commands * Added detection of window name based on child pid * Added click and drag support. Added mouse support. * Added error checking and documentation * Large overhaul of click and drag. * Added comments, added alt button support in click and drag, tested in prep for pull request. * Added support for decimal delays. * Refactored comments, fixed spelling issues. * Fixed formatting, hacked seccomp * Fixed mislabeled allowed system programs * Added support for image diff. * added support to view expected image file. * fixed a regex bug in windowutils, finalized image diff functionality. * fixed a regex bug in windowutils, finalized image diff functionality. * checkpoint * Got text box images working * finished textbox images. finished image diff. fixed ta grading page image issues. fixed ta grading page error display issues. * added borders around images. * Added support for image resizing for textboxes. Resolved local test errors. * formatted. * added blue info messages and per image resizing. * Added new autograding examples for image diffing and textbox images. * updated travis test. * Quick fix. * hotfix
This checks if a date is invalid and if a gradeable_id is invalid. I did not check everything the form considers invalid. Please tell me if there are any errors or if I should add more checks.
closes #924