dirroot. '/repository/lib.php'); // necessary for the constants used in args $args = new stdClass(); $args->accepted_types = '*'; $args->return_types = FILE_EXTERNAL; $args->context = $this->context; $args->env = 'url'; $fp = new file_picker($args); $options = $fp->options; $fieldid = 'field_url_'.$options->client_id; $straddlink = get_string('choosealink', 'repository'); $url = ''; $text = ''; if ($recordid) { if ($content = $DB->get_record('data_content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid))) { $url = $content->content; $text = $content->content1; } } $str = '
'; $str .= get_string('url','data').': | '; $str .= ''; $str .= ''; $str .= ' |
'.get_string('text','data').': |