Skip to content

Commit

Permalink
Merge branch 'MDL-52290_editpdf_pagecount' of git://github.com/davosm…
Browse files Browse the repository at this point in the history
…ith/moodle
  • Loading branch information
andrewnicols authored and danpoltawski committed Jan 12, 2016
2 parents 6009fa5 + 0d5a260 commit 7b9b861
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Feature: In an assignment, teacher can annotate PDF files during grading
And I click on "Grade" "link" in the "Submitted for grading" "table_row"
And I follow "Launch PDF editor..."
And I change window size to "large"
And I should see "Page 1 of 3"
And I click on ".navigate-next-button" "css_element"
And I should see "Page 2 of 3"
And I click on ".stampbutton" "css_element"
And I click on ".linebutton" "css_element"
And I click on ".commentcolourbutton" "css_element"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4090,6 +4090,7 @@ EDITOR.prototype = {
setup_navigation : function() {
var pageselect,
i,
strinfo,
option,
previousbutton,
nextbutton;
Expand All @@ -4101,7 +4102,8 @@ EDITOR.prototype = {
for (i = 0; i < this.pages.length; i++) {
option = Y.Node.create('<option/>');
option.setAttribute('value', i);
option.setHTML(M.util.get_string('pagenumber', 'assignfeedback_editpdf', i+1));
strinfo = {page: i+1, total: this.pages.length};
option.setHTML(M.util.get_string('pagexofy', 'assignfeedback_editpdf', strinfo));
pageselect.append(option);
}
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4090,6 +4090,7 @@ EDITOR.prototype = {
setup_navigation : function() {
var pageselect,
i,
strinfo,
option,
previousbutton,
nextbutton;
Expand All @@ -4101,7 +4102,8 @@ EDITOR.prototype = {
for (i = 0; i < this.pages.length; i++) {
option = Y.Node.create('<option/>');
option.setAttribute('value', i);
option.setHTML(M.util.get_string('pagenumber', 'assignfeedback_editpdf', i+1));
strinfo = {page: i+1, total: this.pages.length};
option.setHTML(M.util.get_string('pagexofy', 'assignfeedback_editpdf', strinfo));
pageselect.append(option);
}
}
Expand Down
4 changes: 3 additions & 1 deletion mod/assign/feedback/editpdf/yui/src/editor/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ EDITOR.prototype = {
setup_navigation : function() {
var pageselect,
i,
strinfo,
option,
previousbutton,
nextbutton;
Expand All @@ -1046,7 +1047,8 @@ EDITOR.prototype = {
for (i = 0; i < this.pages.length; i++) {
option = Y.Node.create('<option/>');
option.setAttribute('value', i);
option.setHTML(M.util.get_string('pagenumber', 'assignfeedback_editpdf', i+1));
strinfo = {page: i+1, total: this.pages.length};
option.setHTML(M.util.get_string('pagexofy', 'assignfeedback_editpdf', strinfo));
pageselect.append(option);
}
}
Expand Down

0 comments on commit 7b9b861

Please sign in to comment.