Merge branch 'MDL-74383-master' of https://github.com/mihailges/moodle

This commit is contained in:
Sara Arjona
2022-04-04 15:46:19 +02:00
6 changed files with 17 additions and 28 deletions
@@ -112,16 +112,11 @@ class assignfeedback_editpdf_renderer extends plugin_renderer_base {
$html .= html_writer::div(get_string('jsrequired', 'assignfeedback_editpdf'), 'hiddenifjs');
$linkid = html_writer::random_id();
if ($widget->readonly) {
$launcheditorlink = html_writer::tag('a',
get_string('viewfeedbackonline', 'assignfeedback_editpdf'),
array('id'=>$linkid, 'class'=>'btn', 'href'=>'#'));
} else {
$launcheditorlink = html_writer::tag('a',
get_string('launcheditor', 'assignfeedback_editpdf'),
array('id'=>$linkid, 'class'=>'btn', 'href'=>'#'));
}
$links = $launcheditorlink;
$launcheditorstring = $widget->readonly ? get_string('viewfeedbackonline', 'assignfeedback_editpdf') :
get_string('launcheditor', 'assignfeedback_editpdf');
$links = html_writer::link('#', $launcheditorstring, ['id' => $linkid, 'class' => 'd-block mt-2']);
$html .= '<input type="hidden" name="assignfeedback_editpdf_haschanges" value="false"/>';
$html .= html_writer::div($links, 'visibleifjs');
@@ -2233,7 +2233,7 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
* @method initializer
* @return void
*/
initializer: function(config) {
initializer: function() {
var editor,
container,
placeholder,
@@ -2259,8 +2259,6 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
// Set the body content.
this.set('bodyContent', container);
COMMENTSEARCH.superclass.initializer.call(this, config);
},
/**
@@ -2622,7 +2620,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
* @return bool true if menu is active, else false.
*/
this.is_menu_active = function() {
return this.menu.get('visible');
return this.menu !== null && this.menu.get('visible');
};
/**
File diff suppressed because one or more lines are too long
@@ -2233,7 +2233,7 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
* @method initializer
* @return void
*/
initializer: function(config) {
initializer: function() {
var editor,
container,
placeholder,
@@ -2259,8 +2259,6 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
// Set the body content.
this.set('bodyContent', container);
COMMENTSEARCH.superclass.initializer.call(this, config);
},
/**
@@ -2622,7 +2620,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
* @return bool true if menu is active, else false.
*/
this.is_menu_active = function() {
return this.menu.get('visible');
return this.menu !== null && this.menu.get('visible');
};
/**
+1 -1
View File
@@ -243,7 +243,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
* @return bool true if menu is active, else false.
*/
this.is_menu_active = function() {
return this.menu.get('visible');
return this.menu !== null && this.menu.get('visible');
};
/**
@@ -33,7 +33,7 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
* @method initializer
* @return void
*/
initializer: function(config) {
initializer: function() {
var editor,
container,
placeholder,
@@ -59,8 +59,6 @@ Y.extend(COMMENTSEARCH, M.core.dialogue, {
// Set the body content.
this.set('bodyContent', container);
COMMENTSEARCH.superclass.initializer.call(this, config);
},
/**