Merge branch 'MDL-78542-master' of https://github.com/junpataleta/moodle
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['clicktoopen'] = 'Click {$a} link to open resource.';
|
||||
$string['clicktoopen'] = 'Click on {$a} to open the resource.';
|
||||
$string['configdisplayoptions'] = 'Select all options that should be available, existing settings are not modified. Hold CTRL key to select multiple fields.';
|
||||
$string['configframesize'] = 'When a web page or an uploaded file is displayed within a frame, this value is the height (in pixels) of the top frame (which contains the navigation).';
|
||||
$string['configrolesinparams'] = 'Should customised role names (from the course settings) be available as variables for URL parameters?';
|
||||
@@ -64,6 +64,12 @@ There are a number of display options for the URL, such as embedded or opening i
|
||||
Note that URLs can also be added to any other resource or activity type through the text editor.';
|
||||
$string['modulename_link'] = 'mod/url/view';
|
||||
$string['modulenameplural'] = 'URLs';
|
||||
$string['name'] = 'Name';
|
||||
$string['name_help'] = 'This will serve as the link text for the URL.
|
||||
|
||||
Enter a meaningful text that concisely describes the URL\'s purpose.
|
||||
|
||||
Avoid using the word "link". This will help screen reader users as screen readers announce links (e.g. "Moodle.org, link") so there\'s no need to include the word "link" in the name field.';
|
||||
$string['page-mod-url-x'] = 'Any URL module page';
|
||||
$string['parameterinfo'] = '&parameter=variable';
|
||||
$string['parametersheader'] = 'URL variables';
|
||||
|
||||
@@ -277,7 +277,7 @@ function url_print_workaround($url, $cm, $course) {
|
||||
}
|
||||
|
||||
echo '<div class="urlworkaround">';
|
||||
print_string('clicktoopen', 'url', "<a href=\"$fullurl\" $extra>$fullurl</a>");
|
||||
print_string('clicktoopen', 'url', html_writer::link($fullurl, format_string($cm->name)));
|
||||
echo '</div>';
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
@@ -289,7 +289,6 @@ function url_print_workaround($url, $cm, $course) {
|
||||
* @param object $url
|
||||
* @param object $cm
|
||||
* @param object $course
|
||||
* @return does not return
|
||||
*/
|
||||
function url_display_embed($url, $cm, $course) {
|
||||
global $PAGE, $OUTPUT;
|
||||
@@ -298,7 +297,7 @@ function url_display_embed($url, $cm, $course) {
|
||||
$fullurl = url_get_full_url($url, $cm, $course);
|
||||
$title = $url->name;
|
||||
|
||||
$link = html_writer::tag('a', $fullurl, array('href'=>str_replace('&', '&', $fullurl)));
|
||||
$link = html_writer::link($fullurl, format_string($cm->name));
|
||||
$clicktoopen = get_string('clicktoopen', 'url', $link);
|
||||
$moodleurl = new moodle_url($fullurl);
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ class mod_url_mod_form extends moodleform_mod {
|
||||
//-------------------------------------------------------
|
||||
$mform->addElement('header', 'general', get_string('general', 'form'));
|
||||
$mform->addElement('text', 'name', get_string('name'), array('size'=>'48'));
|
||||
$mform->addHelpButton('name', 'name', 'url');
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
} else {
|
||||
|
||||
@@ -31,7 +31,9 @@ Feature: View activity completion information in the URL resource
|
||||
| completionview | 1 |
|
||||
| display | 0 |
|
||||
When I am on the "Music history" "url activity" page logged in as teacher1
|
||||
Then "Music history" should have the "View" completion condition
|
||||
Then "Music history" "link" should exist
|
||||
And I should see "Click on Music history to open the resource."
|
||||
And "Music history" should have the "View" completion condition
|
||||
|
||||
Scenario: View automatic completion items in automatic display mode as student
|
||||
Given the following "activity" exists:
|
||||
|
||||
Reference in New Issue
Block a user