Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
7f455052
Commit
7f455052
authored
Oct 09, 2012
by
Marina Glancy
Browse files
MDL-35895 Correctly build return to course link in book module
parent
ecfe814e
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/book/view.php
View file @
7f455052
...
...
@@ -152,15 +152,8 @@ if ($nextid) {
$chnavigation
.
=
'<a title="'
.
get_string
(
'navnext'
,
'book'
)
.
'" href="view.php?id='
.
$cm
->
id
.
'&chapterid='
.
$nextid
.
'"><img src="'
.
$OUTPUT
->
pix_url
(
'nav_next'
,
'mod_book'
)
.
'" class="bigicon" alt="'
.
get_string
(
'navnext'
,
'book'
)
.
'" /></a>'
;
}
else
{
$sec
=
''
;
if
(
$section
=
$DB
->
get_record
(
'course_sections'
,
array
(
'id'
=>
$cm
->
section
)))
{
$sec
=
$section
->
section
;
}
if
(
$course
->
id
==
$SITE
->
id
)
{
$returnurl
=
"
$CFG->wwwroot
/"
;
}
else
{
$returnurl
=
"
$CFG->wwwroot
/course/view.php?id=
$course->id
#section-
$sec
"
;
}
$sec
=
$DB
->
get_field
(
'course_sections'
,
'section'
,
array
(
'id'
=>
$cm
->
section
));
$returnurl
=
course_get_url
(
$course
,
$sec
);
$chnavigation
.
=
'<a title="'
.
get_string
(
'navexit'
,
'book'
)
.
'" href="'
.
$returnurl
.
'"><img src="'
.
$OUTPUT
->
pix_url
(
'nav_exit'
,
'mod_book'
)
.
'" class="bigicon" alt="'
.
get_string
(
'navexit'
,
'book'
)
.
'" /></a>'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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