diff --git a/mod/data/field/url/field.class.php b/mod/data/field/url/field.class.php index 89c8c7cee26..00a96ee0827 100644 --- a/mod/data/field/url/field.class.php +++ b/mod/data/field/url/field.class.php @@ -54,17 +54,17 @@ class data_field_url extends data_field_base { $str .= ''; + $str .= ''; + $str .= ''; $str .= ''; $str .= '
'; $str .= get_string('url','data').':'; $str .= ''; - $str .= '
'.get_string('text','data').':
'; } else { // Just the URL field $str .= ''; $str .= ''; + $str .= ''; } - $str .= ''; - // print out file picker //$str .= $OUTPUT->render($fp); diff --git a/mod/data/import.php b/mod/data/import.php index c1c5979bae1..5a4526b10c3 100644 --- a/mod/data/import.php +++ b/mod/data/import.php @@ -159,7 +159,10 @@ if (!$formdata = $form->get_data()) { if (preg_match("/^(latlong|url)$/", $field->type)) { $values = explode(" ", $value, 2); $content->content = $values[0]; - $content->content1 = $values[1]; + // The url field doesn't always have two values (unforced autolinking). + if (count($values) > 1) { + $content->content1 = $values[1]; + } } else { $content->content = $value; }