Skip to content

Commit eb82f10

Browse files
committed
Implemented the task - CD-417.
1 parent 851763e commit eb82f10

17 files changed

+165
-59
lines changed

amd/build/learningtoolsinfo.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lang/en/local_learningtools.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
$string['successbookmarkmessage'] = "This page bookmarked successfully and you can view the bookmarks under profile / learning tools / bookmarks.";
100100
$string['removebookmarkmessage'] = "This page bookmark removed and you can view the bookmarks under profile / learning tools / bookmarks.";
101101

102+
$string['successchapterbookmarkmessage'] = "This chapter bookmarked successfully and you can view the bookmarks under profile / learning tools / bookmarks.";
103+
$string['removechapterbookmarkmessage'] = "This chapter bookmark removed and you can view the bookmarks under profile / learning tools / bookmarks.";
104+
102105
// Notes strings.
103106

104107
$string['note'] = "Notes";
@@ -198,7 +201,6 @@
198201
$string['successtoolschedule'] = "Schedule added the user calendar";
199202

200203
// Time management.
201-
202204
$string['timemanagement'] = 'Time management';
203205
$string['timemanagementheader'] = 'Time management for {$a->name}';
204206
$string['print'] = "Print";
@@ -242,5 +244,6 @@
242244
$string['strftimemonthdateyear'] = '%B, %dth %Y';
243245
$string['strftimeyearmonth'] = '%Y/%m/%d';
244246
$string['strftimemonthnamedate'] = '%B %d, %Y';
245-
$string['subplugintype_ltool'] = "Learning Tools";
246-
$string['subplugintype_ltool_plural'] = "ltools";
247+
$string['subplugintype_ltool_plural'] = 'Learning Tools';
248+
$string['strbookmarked'] = "<i class='fa fa-bookmark'></i> Bookmarked";
249+
$string['strbookmark'] = "<i class='fa fa-bookmark'></i> Bookmark";

lib.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,11 @@ function local_learningtools_get_instance_tool_view_url($row) {
498498
$courseurl = new moodle_url('/course/view.php', array('id' => $data->courseid));
499499
$viewurl = $OUTPUT->single_button($courseurl, get_string('viewcourse', 'local_learningtools'), 'get');
500500
} else if ($data->instance == 'mod') {
501-
$viewurl = $OUTPUT->single_button($row->pageurl, get_string('viewactivity', 'local_learningtools'), 'get');
501+
$pageurl = $row->pageurl;
502+
if ($row->itemtype == 'chapter') {
503+
$pageurl = $row->pageurl . "#chapters-list-" . $row->itemid;
504+
}
505+
$viewurl = $OUTPUT->single_button($pageurl, get_string('viewactivity', 'local_learningtools'), 'get');
502506
} else {
503507
$viewurl = $OUTPUT->single_button($row->pageurl, get_string('viewpage', 'local_learningtools'), 'get');
504508
}

0 commit comments

Comments
 (0)