Default behavior when hitting enter

Issue #83 new
Daniel Schoepe created an issue

When hitting enter after entering feedback, the submission gets rejected by default. In some cases, that is not the right behavior: For example, in courses where submissions score points instead of requiring resubmissions, it is very uncommon to reject an assignment. I accidentally rejected some assignments because of this, which then results in confusing emails to the student (after accepting the same submission afterwards).

It would be helpful to make this behavior customizable (without a Greasemonkey script on the client side), either for each user or per course.

Comments (2)

  1. Daniel Schoepe reporter

    If someone else also prefers the "accepting-by-default" behavior, here's a Greasemonkey script to fix this:

    // ==UserScript==
    // @name        Fire button behavior
    // @namespace   fire
    // @include     https://xdat09.ce.chalmers.se/*/*/admin/labs/*/submissions/*
    // @version     1
    // @grant       none
    // ==/UserScript==
    
    btns = document.getElementsByClassName("btn btn-danger");
    if (btns.length == 1) {
      btns[0].type = "button";
    }
    
  2. Evgeny Kotelnikov

    I'm not sure that the form should be submitted by hitting enter at all, since there are two submission buttons. How about adding two shortcuts (say, Ctrl+A and Ctrl+R) for accept and reject?

  3. Log in to comment