diff --git a/form.php b/form.php index aa6a258..f460838 100644 --- a/form.php +++ b/form.php @@ -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', diff --git a/lang/en/report_editdates.php b/lang/en/report_editdates.php index 8970b88..5ba4294 100644 --- a/lang/en/report_editdates.php +++ b/lang/en/report_editdates.php @@ -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';