Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions form.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,17 @@ public function definition() {

if ($coursehasavailability) {
if ($cm->availability) {
// If there are retricted access date settings.
if (strpos($cm->availability, '"type":"date"') !== false) {
$timeline[$cm->id] = array_merge($timeline[$cm->id], array('restrict' => $cm->availability));
$editsettingurl = new moodle_url('/course/modedit.php', array('update' => $cm->id));
$editsettingurltext = html_writer::tag('a',
get_string('editrestrictedaccess', 'report_editdates'),
array('href' => $editsettingurl->out(false),
'target' => '_blank',
'class' => 'editdates_highlight'));
$mform->addElement('static', '',
get_string('hasrestrictedaccess', 'report_editdates', ($cm->name)),
$editsettingurltext);
}
// If there are any retricted access settings.
$timeline[$cm->id] = array_merge($timeline[$cm->id], array('restrict' => $cm->availability));
$editsettingurl = new moodle_url('/course/modedit.php', array('update' => $cm->id));
$editsettingurltext = html_writer::tag('a',
get_string('editrestrictedaccess', 'report_editdates'),
array('href' => $editsettingurl->out(false),
'target' => '_blank',
'class' => 'editdates_highlight'));
$mform->addElement('static', '',
get_string('hasrestrictedaccess', 'report_editdates', ($cm->name)),
$editsettingurltext);
} else {
$editsettingurl = new moodle_url('/course/modedit.php', array('update' => $cm->id));
$editsettingurltext = html_writer::tag('a',
Expand Down
4 changes: 2 additions & 2 deletions lang/en/report_editdates.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
$string['timelinemaxdesc'] = 'Maximum number of years shown on timeline.';
$string['timelinedonotshow'] = 'Do not show the timeline';
$string['toomuchtime'] = 'Timeline not created: Times were spread over {$a}+ years.';
$string['hasrestrictedaccess'] = '{$a} has restricted date access settings';
$string['norestrictedaccess'] = 'No restricted date access settings on {$a}';
$string['hasrestrictedaccess'] = '{$a} has restricted access settings';
$string['norestrictedaccess'] = 'No restricted access settings on {$a}';
$string['addrestrictedaccess'] = 'Add restricted access (opens a new window)';
$string['editrestrictedaccess'] = 'Edit restricted access (opens a new window)';
$string['event:reportviewed'] = 'Edit dates report viewed';
Expand Down