• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MarkUsProject / Markus / 27919845468

21 Jun 2026 10:43PM UTC coverage: 90.291% (+0.03%) from 90.266%
27919845468

Pull #8008

github

web-flow
Merge 7325913a3 into 8705e4b48
Pull Request #8008: WIP: feat: grades upload flow

1101 of 2313 branches covered (47.6%)

Branch coverage included in aggregate %.

172 of 177 new or added lines in 8 files covered. (97.18%)

56 existing lines in 3 files now uncovered.

46688 of 50615 relevant lines covered (92.24%)

127.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/app/javascript/Components/Modals/assignment_grades_upload_modal.jsx
1
import React from "react";
2
import Modal from "react-modal";
3

4
class AssignmentGradesUploadModal extends React.Component {
5
  componentDidMount() {
6
    Modal.setAppElement("body");
12✔
7
  }
8

9
  authenticityToken() {
10
    return document.querySelector("meta[name='csrf-token']")?.content || "";
37✔
11
  }
12

13
  render() {
14
    return (
37✔
15
      <Modal
16
        className="react-modal markus-dialog"
17
        isOpen={this.props.isOpen}
18
        onRequestClose={this.props.onRequestClose}
19
      >
20
        <h2>
21
          {I18n.t("upload_the", {
22
            item: I18n.t("assignments.grades"),
23
          })}
24
        </h2>
25
        <form
26
          action={Routes.upload_grades_course_assignment_path(
27
            this.props.course_id,
28
            this.props.assignment_id
29
          )}
30
          encType="multipart/form-data"
31
          method="post"
32
        >
33
          <div className="modal-container-vertical">
34
            <input type="hidden" name="authenticity_token" value={this.authenticityToken()} />
35
            <p>
36
              <input type="file" name="upload_file" required={true} accept=".csv" />
37
            </p>
38
            <p>
39
              <label htmlFor="encoding">{I18n.t("encoding")}</label>
40
              <select id="encoding" name="encoding" defaultValue="UTF-8">
41
                {this.props.encodings.map(([label, value]) => (
NEW
42
                  <option key={value} value={value}>
×
43
                    {label}
44
                  </option>
45
                ))}
46
              </select>
47
            </p>
48
            <p>
49
              <label htmlFor="overwrite">
50
                <input type="checkbox" id="overwrite" name="overwrite" />{" "}
51
                {I18n.t("assignments.upload_grades.overwrite")}
52
              </label>
53
            </p>
54
            <section className="dialog-actions">
55
              <input
56
                type="submit"
57
                value={I18n.t("upload")}
58
                data-disable-with={I18n.t("uploading_please_wait")}
59
              />
60
              <input onClick={this.props.onRequestClose} type="reset" value={I18n.t("cancel")} />
61
            </section>
62
          </div>
63
        </form>
64
      </Modal>
65
    );
66
  }
67
}
68

69
export default AssignmentGradesUploadModal;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc