mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
portfolio MDL-22272 remove portfolio stuff from export tab
This commit is contained in:
parent
72d5e574ab
commit
5fcbdc6bf0
@ -96,20 +96,6 @@ if($mform->is_cancelled()) {
|
||||
die;
|
||||
}
|
||||
|
||||
if (array_key_exists('portfolio', $formdata) && !empty($formdata['portfolio'])) {
|
||||
// fake portfolio callback stuff and redirect
|
||||
$formdata['id'] = $cm->id;
|
||||
require_once($CFG->libdir . '/portfoliolib.php');
|
||||
$button = new portfolio_add_button();
|
||||
$button->set_callback_options('data_portfolio_caller', $formdata, '/mod/data/locallib.php');
|
||||
if ($formdata['exporttype'] == 'csv') {
|
||||
$button->set_format_by_intended_file('csv'); // so we can do mime checking
|
||||
}
|
||||
$url = $button->to_html(PORTFOLIO_ADD_FAKE_URL);
|
||||
$url .= '&instance=' . $formdata['portfolio']; // add on the instance since we know it
|
||||
redirect($url);
|
||||
}
|
||||
|
||||
$selectedfields = array();
|
||||
foreach ($formdata as $key => $value) {
|
||||
if (strpos($key, 'field_') === 0) {
|
||||
|
@ -33,9 +33,6 @@ class mod_data_export_form extends moodleform {
|
||||
$typesarray[] = &MoodleQuickForm::createElement('select', 'delimiter_name', null, $choices);
|
||||
$typesarray[] = &MoodleQuickForm::createElement('radio', 'exporttype', null, get_string('excel', 'data'), 'xls');
|
||||
$typesarray[] = &MoodleQuickForm::createElement('radio', 'exporttype', null, get_string('ods', 'data'), 'ods');
|
||||
if ($CFG->enableportfolios) {
|
||||
$typesarray[] = &MoodleQuickForm::createElement('radio', 'exporttype', null, get_string('format_leap2a', 'portfolio'), 'leap2a');
|
||||
}
|
||||
$mform->addGroup($typesarray, 'exportar', '', array(''), false);
|
||||
$mform->addRule('exportar', null, 'required');
|
||||
$mform->setDefault('exporttype', 'csv');
|
||||
@ -58,23 +55,6 @@ class mod_data_export_form extends moodleform {
|
||||
}
|
||||
}
|
||||
$this->add_checkbox_controller(1, null, null, 1);
|
||||
if ($CFG->enableportfolios && has_capability('mod/data:exportallentries', get_context_instance(CONTEXT_MODULE, $this->_cm->id))) {
|
||||
require_once($CFG->libdir . '/portfoliolib.php');
|
||||
require_once($CFG->dirroot . '/mod/data/locallib.php');
|
||||
if ($portfoliooptions = portfolio_instance_select(
|
||||
portfolio_instances(),
|
||||
call_user_func(array('data_portfolio_caller', 'base_supported_formats')),
|
||||
'data_portfolio_caller',
|
||||
mimeinfo('type', 'export.csv'),
|
||||
'instance',
|
||||
true,
|
||||
true)) {
|
||||
$mform->addElement('header', 'notice', get_string('portfolionotfile', 'data') . ':');
|
||||
$portfoliooptions[0] = get_string('none');
|
||||
ksort($portfoliooptions);
|
||||
$mform->addElement('select', 'portfolio', get_string('portfolio', 'portfolio'), $portfoliooptions);
|
||||
}
|
||||
}
|
||||
$this->add_action_buttons(true, get_string('exportdatabaserecords', 'data'));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user