Skip to content

Commit

Permalink
Merge pull request #165 from aopell/develop
Browse files Browse the repository at this point in the history
Version 5.4
  • Loading branch information
aopell authored May 12, 2019
2 parents ae93aba + 4626cb1 commit 58edc39
Show file tree
Hide file tree
Showing 14 changed files with 981 additions and 328 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,19 @@
- [Custom Themes](#custom-themes)
- [Course Icons](#course-icons)
- [Tooltips](#tooltips)
- [Courses in Common](#courses-in-common)
- [Miscellaneous Improvements](#miscellaneous-interface-improvements)
- [Courses In Common](#courses-in-common)
- [Miscellaneous Interface Improvements](#miscellaneous-interface-improvements)
- [Grades Page Improvements](#grades-page-improvements)
- [Miscellaneous Improvements](#miscellaneous-grades-page-improvements)
- [Simulated Grades](#simulated-grades)
- [Miscellaneous Grades Page Improvements](#miscellaneous-grades-page-improvements)
- [What-If Grades](#what-if-grades)
- [Desktop Notifications](#desktop-notifications)
- [Extension Icon](#extension-icon)
- [Schoology Plus Announcements](#schoology-plus-announcements)
- [Schoology Plus Settings](#schoology-plus-settings)
- [Theme Editor](#theme-editor)
- [Course Options](#course-options)
- [Custom Grading Scales](#custom-grading-scales)
- [Course Nicknames](#course-nicknames)
- [Custom Grading Scales](#custom-grading-scales)
- [Feedback and Support Discord](#feedback-and-support-discord)
- [Contributing](#contributing)
- [Contributors](#contributors)
Expand Down Expand Up @@ -83,12 +84,12 @@

## Grades Page Improvements
### Miscellaneous Grades Page Improvements
![Grades Page](https://i.imgur.com/grwjmL3.png)
![Grades Page](https://i.imgur.com/k6MZRKE.png)
*Image: Example of the grades page showing grades for collapsed courses.*
- Classes are sorted by period*
- Grades are displayed when classes are collapsed

![Point Totals and Letter Grades](https://i.imgur.com/T0hriZt.png)
![Point Totals and Letter Grades](https://i.imgur.com/WBSmgvr.png)

*Image: Example of point totals for categories and unweighted classes. Also features calculated letter grades and point buffers.*

Expand All @@ -111,25 +112,25 @@
*Image: Right click a class to view a context menu*

- Right click a class to quickly jump to a specific page or to edit that [course's settings](#course-settings)
### Simulated Grades
### What-If Grades

![Grade Modification](https://i.imgur.com/59NzSOd.gif)
![What-If Grades](https://i.imgur.com/frX2S3G.gif)

*Image: Example of locally modifying a grade. Notice the change in the category and class grade.*

- Allows you to locally modify the grade of an assignment
- Schoology Plus will recalculate the grades for each category and for the entire class
- Weighted categories are taken into account when recalculating grades

![Add Assignment](https://i.imgur.com/E5qp6jI.gif)
![Add Assignment](https://i.imgur.com/O8vTzOX.gif)

*Image: Example of adding a simulated assignment*

- Allows you to simulate adding an assignment
- Assignments can be added to any category, and can be given any grade
- This allows you to see how an upcoming assignment will affect your grade with different scores

![Calculate Minimum Score](https://i.imgur.com/k8JQiGH.gif)
![Calculate Minimum Score](https://i.imgur.com/553vhqR.gif)

*Image: Example of calculating the minimum score necessary on the final to keep an A in the class. Also demonstrates dropping and un-dropping a grade.*

Expand Down
37 changes: 0 additions & 37 deletions css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -474,41 +474,4 @@ the selector matches inside notifications in the new notifs dropdown

.popups-large {
left: calc(50vw - 300px) !important;
}

/* I believe this is unused, but we might want it in the future for replacing rainbow with proper CSS animations if easily possible */
@keyframes rainbow {
0% {
background-color: hsl(0, 50%, 50%);
}
10% {
background-color: hsl(36, 50%, 50%);
}
20% {
background-color: hsl(72, 50%, 50%);
}
30% {
background-color: hsl(108, 50%, 50%);
}
40% {
background-color: hsl(144, 50%, 50%);
}
50% {
background-color: hsl(180, 50%, 50%);
}
60% {
background-color: hsl(216, 50%, 50%);
}
70% {
background-color: hsl(252, 50%, 50%);
}
80% {
background-color: hsl(288, 50%, 50%);
}
90% {
background-color: hsl(324, 50%, 50%);
}
100% {
background-color: hsl(359, 50%, 50%);
}
}
7 changes: 6 additions & 1 deletion css/grades.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ col.comments-column {
position: relative;
}

.grade-column .student-editable {
.grade-column .student-editable, .editable-assignment-name:focus {
padding: 1px;
border-width: 1px;
border-style: solid;
border-color: #767676;
outline: 0px solid transparent;
}


Expand Down Expand Up @@ -223,4 +224,8 @@ img.splus-coursegradebox-taint {
font-weight: normal;
margin-left: 15px;
color: #ee00ce;
}

.item-row.added-fake-assignment {
background-color: lightyellow !important;
}
46 changes: 37 additions & 9 deletions css/theme-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ body {
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12);
}

#preview-settings-menu:not(:hover) #preview-name-drop-down{
#preview-settings-menu:not(:hover) #preview-name-drop-down {
display: none;
}

Expand Down Expand Up @@ -207,7 +207,7 @@ body {
top: 60px;
left: 0;
color: black;
box-shadow: 0 1px 5px 0 rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.12);
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12);
margin-top: -4px;
}

Expand Down Expand Up @@ -235,13 +235,27 @@ h2.center {
}

#create-button,
#new-icon {
#import-button,
#new-icon,
#new-button {
background-color: var(--primary-color);
}

#themes-header {
position: relative;
}

#new-theme-container {
position: absolute;
display: inline-block;
right: 0;
bottom: -10px;
}

#discard-button:hover,
#create-button:hover,
#new-icon:hover,
#new-button:hover,
.delete-button {
background-color: var(--hover-color);
}
Expand Down Expand Up @@ -285,6 +299,7 @@ h2.center {
.wide-container {
width: 90%;
}

.fixed-on-large-and-up {
position: fixed;
width: 60%;
Expand Down Expand Up @@ -572,12 +587,14 @@ textarea#json-output[readonly] {
box-shadow: inset 0px 0px 4px #666;
}

#theme-hue {
height: 24px;
#theme-hue,
#color-rainbow-hue-value.hue-slider {
height: 24px !important;
background: linear-gradient(to right, hsl(0, 50%, 50%), hsl(36, 50%, 50%), hsl(72, 50%, 50%), hsl(108, 50%, 50%), hsl(144, 50%, 50%), hsl(180, 50%, 50%), hsl(216, 50%, 50%), hsl(252, 50%, 50%), hsl(288, 50%, 50%), hsl(324, 50%, 50%), hsl(359, 50%, 50%));
}

.ui-slider-handle {
#theme-hue .ui-slider-handle,
#color-rainbow-hue-value.hue-slider .ui-slider-handle {
height: 32px !important;
background-color: var(--primary-color) !important;
border: 2px solid black !important;
Expand All @@ -588,7 +605,7 @@ textarea#json-output[readonly] {
padding-bottom: 32px;
}

#theme-color-rainbow-wrapper .ui-slider-handle {
#theme-color-rainbow-wrapper :not(.hue-slider)>.ui-slider-handle {
background-color: #26a69a !important;
border: none !important;
border-radius: 50% !important;
Expand All @@ -597,7 +614,7 @@ textarea#json-output[readonly] {
margin-top: -3px !important;
}

#theme-color-rainbow-wrapper .ui-slider-horizontal {
#theme-color-rainbow-wrapper :not(.hue-slider).ui-slider-horizontal {
height: 3px;
border: none;
background-color: #C2C0C2;
Expand All @@ -608,14 +625,25 @@ textarea#json-output[readonly] {
background-color: #666;
}

#color-rainbow-hue-preview {
width: 100%;
height: 20px;
margin: 5px 0;
}

.help-icon {
color: var(--primary-color);
}

.rs-start, .rs-end {
.rs-start,
.rs-end {
visibility: hidden;
}

.rs-range-color {
background-color: #26a69a;
}

.highlight {
background-color: lightcyan !important;
}
1 change: 1 addition & 0 deletions js/all-idle.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
moreGradesModalObserver.observe(document.body, { childList: true });
})();

// Prevent scrolling when a modal is open
(function () {
new MutationObserver((mutations, observer) => {
if (document.getElementById("body").getAttribute("aria-hidden") == "true") {
Expand Down
34 changes: 29 additions & 5 deletions js/grades.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ var fetchQueue = [];
// FIXME add little plus icon
addAssignmentThing.innerHTML = '<th scope="row" class="title-column clickable"><div class="reportSpacer-3"><div class="td-content-wrapper"><span class="title"><a class="sExtlink-processed">Add Assignment</a></span></div></div></th><td class="grade-column"><div class="td-content-wrapper"><span class="no-grade">—</span><div class="grade-wrapper"></div></div></td><td class="comment-column"><div class="td-content-wrapper"><span class="visually-hidden">No comment</span></div></td>';
addAssignmentThing.getElementsByClassName("title")[0].firstElementChild.addEventListener("click", function () {
addAssignmentThing.querySelector("img.grade-edit-indicator").click();
if (event.target.contentEditable !== "true") {
addAssignmentThing.querySelector("img.grade-edit-indicator").click();
} else {
document.execCommand("selectall", null, false);
}
});

if (assignment.classList.contains("hidden")) {
Expand Down Expand Up @@ -204,7 +208,16 @@ var fetchQueue = [];

assignment.classList.add("added-fake-assignment");

assignment.getElementsByClassName("title")[0].firstElementChild.textContent = "Added Assignment";
let assignmentTitle = assignment.getElementsByClassName("title")[0].firstElementChild;
assignmentTitle.textContent = "Added Assignment (Click to Rename)";
assignmentTitle.classList.add("editable-assignment-name");
assignmentTitle.contentEditable = "true";
assignmentTitle.addEventListener("keydown", event => {
if (event.which === 13) {
event.target.blur();
window.getSelection().removeAllRanges();
}
});

let newAddAssignmentPlaceholder = await createAddAssignmentUi();
newAddAssignmentPlaceholder.style.display = "table-row";
Expand Down Expand Up @@ -414,9 +427,9 @@ var fetchQueue = [];
let timeRowLabel = createElement("label", ["modify-label"], {
htmlFor: "enable-modify"
}, [
createElement("span", [], { textContent: "Enable grade modification" }),
createElement("span", [], { textContent: "Enable what-if grades" }),
createElement("a", ["splus-grade-help-btn"], {
href: "https://github.com/aopell/SchoologyPlus/wiki/Grade-Edit-Simulator",
href: "https://github.com/aopell/SchoologyPlus/wiki/What-If-Grades",
target: "_blank"
}, [createElement("span", ["icon-help"])])
]);
Expand Down Expand Up @@ -619,10 +632,21 @@ var fetchQueue = [];
if (score && maxGrade) {
scoreVal = Number.parseFloat(score.textContent);
maxVal = Number.parseFloat(maxGrade.textContent.substring(3));
} else if (this[0].querySelector(".exception-icon.missing")) {
} else if (this[0].classList.contains("contains-exception")) {
let scoreValues = maxGrade.textContent.split("/");
scoreVal = Number.parseFloat(scoreValues[0]);
maxVal = Number.parseFloat(scoreValues[1]);
if (Number.isNaN(scoreVal)) {
// exception states are 0 or -, always
// this might be NaN because it's parsing a space
scoreVal = 0;
}
if (!this[0].querySelector(".exception-icon.missing")) {
// non-missing exception means uncounted (incomplete or excused)
// set scores to 0 so we make no mathematical change
scoreVal = 0;
maxVal = 0;
}
}

if (!gradeColContentWrap.querySelector(".modified-score-percent-warning")) {
Expand Down
Loading

0 comments on commit 58edc39

Please sign in to comment.