Skip to content

Commit

Permalink
Improves comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrodriguez-dis committed Aug 7, 2018
1 parent 7da32d4 commit 3cbb0ba
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions jscript/grade.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
if (typeof VPL != 'object') {
VPL = {};
}
var commentsHeight = 0;

/**
* resize comments view div to greatest visible size
* Function resizeSView resizes comments view div to greatest visible size
*/
var commentsHeight = 0;

VPL.resizeSView = function() {
var commentsView = window.document.getElementById('vpl_grade_comments');
var textarea = window.document.getElementsByTagName('textarea')[0];
Expand All @@ -48,9 +49,9 @@

VPL.resizeSView();
setInterval(VPL.resizeSView, 1000);

/**
* Recalculate numeric grade from the max sustracting grades found at the
* Recalculates numeric grade from the max sustracting grades found at the
* end of lines. valid grade format: "- text (-grade)"
*/
VPL.calculateGrade = function(maxgrade) {
Expand All @@ -75,7 +76,7 @@
};

/**
* Add new comment to the form comment string to add
* Adds new comment to the form comment string to add
*/
VPL.addComment = function(comment) {
if (comment === '') {
Expand Down Expand Up @@ -117,6 +118,10 @@
field.value += comment;
}
};

/**
* Removes header and footer of the page
*/
VPL.removeHeaderFooter = function() {
var i;
var l = window.document.getElementsByTagName('header');
Expand Down

0 comments on commit 3cbb0ba

Please sign in to comment.