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
10db78d5
Commit
10db78d5
authored
Aug 13, 2017
by
M. Chardon
Browse files
correction affichage axe dans le workspace général
parent
1b900505
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
classes/renderer.php
View file @
10db78d5
...
...
@@ -266,23 +266,23 @@ class assignfeedback_editpdfplus_renderer extends plugin_renderer_base {
$toolbarCostum
=
array
();
$axis
=
array
();
foreach
(
$widget
->
toolbars
as
$toolbar
)
{
$axis
[]
=
$toolbar
[
'label'
];
$axis
[
$toolbar
[
'axeid'
]
]
=
$toolbar
[
'label'
];
$toolbartmp
=
''
;
foreach
(
$toolbar
[
'tool'
]
as
$tool
)
{
if
(
$tool
->
enabled
)
{
$toolbartmp
.
=
$this
->
render_toolbar_button
(
''
,
''
,
$tool
);
}
}
$toolbarCostum
[]
=
html_writer
::
div
(
$toolbartmp
,
'toolbar customtoolbar'
,
array
(
'role'
=>
'toolbar'
,
'id'
=>
'toolbaraxis'
.
$tool
->
axis
,
'style'
=>
'display:none;'
));
$toolbarCostum
[]
=
html_writer
::
div
(
$toolbartmp
,
'toolbar customtoolbar'
,
array
(
'role'
=>
'toolbar'
,
'id'
=>
'toolbaraxis'
.
$tool
bar
[
'axeid'
]
,
'style'
=>
'display:none;'
));
}
usort
(
$axis
,
function
(
$a
,
$b
)
{
$al
=
substr
(
$a
,
4
,
5
);
$bl
=
substr
(
$b
,
4
,
5
);
if
(
$al
==
$bl
)
{
return
0
;
}
return
(
$al
>
$bl
)
?
+
1
:
-
1
;
});
/*
usort($axis, function($a, $b) {
$al = substr($a, 4, 5);
$bl = substr($b, 4, 5);
if ($al == $bl) {
return 0;
}
return ($al > $bl) ? +1 : -1;
});
*/
$axischoice
=
html_writer
::
div
(
html_writer
::
select
(
$axis
,
'axisselection'
,
0
,
FALSE
),
'toolbar '
,
array
(
'role'
=>
'toolbar'
));
foreach
(
$toolbarCostum
as
$toolbarCostumUnit
)
{
$toolbarCostumdiv
.
=
$toolbarCostumUnit
;
...
...
@@ -383,19 +383,19 @@ class assignfeedback_editpdfplus_renderer extends plugin_renderer_base {
public
function
render_assignfeedback_editpdfplus_widget_admin
(
assignfeedback_editpdfplus
\
widget_admin
$widget
)
{
return
$this
->
render_from_template
(
'assignfeedback_editpdfplus/admin'
,
$widget
);
}
public
function
render_assignfeedback_editpdfplus_widget_admin_axisform
(
moodleform
$form
){
public
function
render_assignfeedback_editpdfplus_widget_admin_axisform
(
moodleform
$form
)
{
return
$this
->
render_from_template
(
'assignfeedback_editpdfplus/axis_form'
,
$form
);
}
public
function
render_assignfeedback_editpdfplus_widget_admin_axisdelform
(
moodleform
$form
){
public
function
render_assignfeedback_editpdfplus_widget_admin_axisdelform
(
moodleform
$form
)
{
return
$this
->
render_from_template
(
'assignfeedback_editpdfplus/axis_del_form'
,
$form
);
}
public
function
render_assignfeedback_editpdfplus_widget_admin_toolform
(
$data
){
$data
->
map01
=
$this
->
pix_url
(
'map01'
,
'assignfeedback_editpdfplus'
);
$data
->
map02
=
$this
->
pix_url
(
'map02'
,
'assignfeedback_editpdfplus'
);
$data
->
map03
=
$this
->
pix_url
(
'map03'
,
'assignfeedback_editpdfplus'
);
public
function
render_assignfeedback_editpdfplus_widget_admin_toolform
(
$data
)
{
$data
->
map01
=
$this
->
pix_url
(
'map01'
,
'assignfeedback_editpdfplus'
);
$data
->
map02
=
$this
->
pix_url
(
'map02'
,
'assignfeedback_editpdfplus'
);
$data
->
map03
=
$this
->
pix_url
(
'map03'
,
'assignfeedback_editpdfplus'
);
return
$this
->
render_from_template
(
'assignfeedback_editpdfplus/tool_form'
,
$data
);
}
...
...
locallib.php
View file @
10db78d5
...
...
@@ -74,9 +74,17 @@ class assign_feedback_editpdfplus extends assign_feedback_plugin {
$toolbars
=
array
();
$coursecontext
=
context
::
instance_by_id
(
$this
->
assignment
->
get_context
()
->
id
);
$coursecontexts
=
array_filter
(
explode
(
'/'
,
$coursecontext
->
path
),
'strlen'
);
$axis
=
array
();
foreach
(
$coursecontexts
as
$value
)
{
$axistmp
=
page_editor
::
get_axis
(
array
(
$value
));
if
(
$axistmp
&&
sizeof
(
$axistmp
)
>
0
)
{
$axis
=
$axistmp
;
}
}
//$axis = page_editor::get_axis($coursecontexts);
$tools
=
page_editor
::
get_tools
(
$coursecontexts
);
$axis
=
page_editor
::
get_axis
(
$coursecontexts
);
foreach
(
$axis
as
$ax
)
{
$toolbars
[
$ax
->
id
][
'axeid'
]
=
$ax
->
id
;
$toolbars
[
$ax
->
id
][
'label'
]
=
$ax
->
label
;
foreach
(
$tools
as
$tool
)
{
if
(
$tool
->
axis
==
$ax
->
id
)
{
...
...
@@ -243,7 +251,7 @@ class assign_feedback_editpdfplus extends assign_feedback_plugin {
*/
public
function
view
(
stdClass
$grade
)
{
global
$PAGE
;
$html
=
''
;
// Show a link to download the pdf.
if
(
page_editor
::
has_annotations_or_comments
(
$grade
->
id
,
false
))
{
...
...
yui/build/moodle-assignfeedback_editpdfplus-editor/moodle-assignfeedback_editpdfplus-editor-debug.js
View file @
10db78d5
...
...
@@ -5594,7 +5594,7 @@ EDITOR.prototype = {
toolbar
.
hide
();
},
this
);
var
axisselector
=
this
.
get_dialogue_element
(
SELECTOR
.
AXISCUSTOMTOOLBAR
+
'
option:checked
'
);
var
axisid
=
parseInt
(
axisselector
.
get
(
'
value
'
),
10
)
+
1
;
var
axisid
=
parseInt
(
axisselector
.
get
(
'
value
'
),
10
);
var
customtoolbar
=
this
.
get_dialogue_element
(
SELECTOR
.
CUSTOMTOOLBARID
+
''
+
axisid
);
customtoolbar
.
show
();
},
...
...
yui/build/moodle-assignfeedback_editpdfplus-editor/moodle-assignfeedback_editpdfplus-editor-min.js
View file @
10db78d5
This diff is collapsed.
Click to expand it.
yui/build/moodle-assignfeedback_editpdfplus-editor/moodle-assignfeedback_editpdfplus-editor.js
View file @
10db78d5
...
...
@@ -5594,7 +5594,7 @@ EDITOR.prototype = {
toolbar
.
hide
();
},
this
);
var
axisselector
=
this
.
get_dialogue_element
(
SELECTOR
.
AXISCUSTOMTOOLBAR
+
'
option:checked
'
);
var
axisid
=
parseInt
(
axisselector
.
get
(
'
value
'
),
10
)
+
1
;
var
axisid
=
parseInt
(
axisselector
.
get
(
'
value
'
),
10
);
var
customtoolbar
=
this
.
get_dialogue_element
(
SELECTOR
.
CUSTOMTOOLBARID
+
''
+
axisid
);
customtoolbar
.
show
();
},
...
...
yui/src/editor/js/editor.js
View file @
10db78d5
...
...
@@ -840,7 +840,7 @@ EDITOR.prototype = {
toolbar
.
hide
();
},
this
);
var
axisselector
=
this
.
get_dialogue_element
(
SELECTOR
.
AXISCUSTOMTOOLBAR
+
'
option:checked
'
);
var
axisid
=
parseInt
(
axisselector
.
get
(
'
value
'
),
10
)
+
1
;
var
axisid
=
parseInt
(
axisselector
.
get
(
'
value
'
),
10
);
var
customtoolbar
=
this
.
get_dialogue_element
(
SELECTOR
.
CUSTOMTOOLBARID
+
''
+
axisid
);
customtoolbar
.
show
();
},
...
...
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