Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
moodle-assignfeedback_editpdfplus
Commits
e902e2f5
Commit
e902e2f5
authored
Nov 03, 2017
by
M. Chardon
Browse files
correction bugs
parent
6df97449
Changes
4
Hide whitespace changes
Inline
Side-by-side
amd/build/annotationcommentplus.min.js
View file @
e902e2f5
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
),
this
.
x
=
30
,
this
.
y
=
90
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'><i class='fa fa-commenting' aria-hidden='true' style='color:black;'></i></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
padding
"
,
"
0 2px
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_commentplus
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltype
.
getToolTypeCartX
(),
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltype
.
getToolTypeCartY
(),
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
20
),
b
.
css
(
"
top
"
,
this
.
y
-
20
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
),
this
.
x
=
30
,
this
.
y
=
90
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'><i class='fa fa-commenting' aria-hidden='true' style='color:black;'></i></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
padding
"
,
"
0 2px
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_commentplus
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltype
.
getToolTypeCartX
(),
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltype
.
getToolTypeCartY
(),
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
20
+
this
.
cartridgex
),
b
.
css
(
"
top
"
,
this
.
y
-
20
+
this
.
cartridgey
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
amd/src/annotationcommentplus.js
View file @
e902e2f5
...
...
@@ -114,8 +114,8 @@ define(['jquery', './annotation'],
if
(
!
this
.
cartridgey
||
this
.
cartridgey
===
0
)
{
this
.
cartridgey
=
parseInt
(
this
.
tooltype
.
getToolTypeCartY
(),
10
);
}
divdisplay
.
css
(
'
left
'
,
this
.
x
+
20
);
divdisplay
.
css
(
'
top
'
,
this
.
y
-
20
);
divdisplay
.
css
(
'
left
'
,
this
.
x
+
20
+
this
.
cartridgex
);
divdisplay
.
css
(
'
top
'
,
this
.
y
-
20
+
this
.
cartridgey
);
this
.
apply_visibility_annot
();
}
else
{
...
...
classes/page_editor.php
View file @
e902e2f5
...
...
@@ -552,9 +552,9 @@ class page_editor {
$newToolType->configurable = 0;
}
}*/
if
(
isset
(
$CFG
->
stampcomment_color
)
&&
$CFG
->
stampcomment_color
!=
null
&&
strlen
(
$CFG
->
stampcomment_color
)
>
4
)
{
/*
if (isset($CFG->stampcomment_color) && $CFG->stampcomment_color != null && strlen($CFG->stampcomment_color) > 4) {
$newToolType->color = $CFG->stampcomment_color;
}
}
*/
if
(
isset
(
$CFG
->
stampcomment_cartridge_color
)
&&
$CFG
->
stampcomment_cartridge_color
!=
null
&&
strlen
(
$CFG
->
stampcomment_cartridge_color
)
>
4
)
{
$newToolType
->
cartridge_color
=
$CFG
->
stampcomment_cartridge_color
;
}
...
...
@@ -575,7 +575,7 @@ class page_editor {
}
}*/
if
(
isset
(
$CFG
->
commentplus_cartridge_color
)
&&
$CFG
->
commentplus_cartridge_color
!=
null
&&
strlen
(
$CFG
->
commentplus_cartridge_color
)
>
4
)
{
$newToolType
->
cartridge_color
=
intval
(
$CFG
->
commentplus_cartridge_color
)
;
$newToolType
->
cartridge_color
=
$CFG
->
commentplus_cartridge_color
;
}
if
(
isset
(
$CFG
->
commentplus_cartridge_x
)
&&
(
intval
(
$CFG
->
commentplus_cartridge_x
)
||
$CFG
->
commentplus_cartridge_x
==
'0'
))
{
$newToolType
->
cartridge_x
=
intval
(
$CFG
->
commentplus_cartridge_x
);
...
...
settings.php
View file @
e902e2f5
...
...
@@ -60,7 +60,7 @@ $settings->add(new admin_setting_configtext('verticalline_cartridge_y',get_strin
$settings
->
add
(
new
admin_setting_heading
(
'stampcomment'
,
get_string
(
'typetool_stampcomment'
,
'assignfeedback_editpdfplus'
),
get_string
(
'typetool_stampcomment_desc'
,
'assignfeedback_editpdfplus'
)));
//$settings->add(new admin_setting_configcheckbox('stampcomment_configurable',get_string('is_not_configurable','assignfeedback_editpdfplus'),get_string('is_not_configurable_desc','assignfeedback_editpdfplus'),0));
$settings
->
add
(
new
admin_setting_configcolourpicker
(
'stampcomment_color'
,
get_string
(
'adminplugin_color'
,
'assignfeedback_editpdfplus'
),
get_string
(
'adminplugin_color_desc'
,
'assignfeedback_editpdfplus'
),
'#000099'
));
//
$settings->add(new admin_setting_configcolourpicker('stampcomment_color',get_string('adminplugin_color','assignfeedback_editpdfplus'),get_string('adminplugin_color_desc','assignfeedback_editpdfplus'),'#000099'));
$settings
->
add
(
new
admin_setting_configcolourpicker
(
'stampcomment_cartridge_color'
,
get_string
(
'adminplugin_cartridge_color'
,
'assignfeedback_editpdfplus'
),
get_string
(
'adminplugin_cartridge_color_desc'
,
'assignfeedback_editpdfplus'
),
'#000099'
));
$settings
->
add
(
new
admin_setting_configtext
(
'stampcomment_cartridge_x'
,
get_string
(
'adminplugin_cartridge_x'
,
'assignfeedback_editpdfplus'
),
get_string
(
'adminplugin_cartridge_x_desc'
,
'assignfeedback_editpdfplus'
),
35
));
$settings
->
add
(
new
admin_setting_configtext
(
'stampcomment_cartridge_y'
,
get_string
(
'adminplugin_cartridge_y'
,
'assignfeedback_editpdfplus'
),
get_string
(
'adminplugin_cartridge_y_desc'
,
'assignfeedback_editpdfplus'
),
6
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment