WIP: vchamilo fixes see BT#11051

pull/2487/head
jmontoyaa 9 years ago
parent 06ba3bfe07
commit a1046dcfd7
  1. 4
      plugin/vchamilo/views/editinstance.controller.php
  2. 14
      plugin/vchamilo/views/editinstance_form.php

@ -70,12 +70,12 @@ if ($data->what == 'addinstance' || $data->what == 'registerinstance') {
ctrace("Creating physical course dir in $coursedir");
mkdir($coursedir, 0777, true);
// initiate default index
$indexFile = fopen($coursedir.'/index.html', 'w');
$indexFile = $coursedir.'/index.html';
if ($indexFile) {
file_put_contents($indexFile, vchamilo_get_default_course_index_fragment());
}
$htaccessFile = fopen($coursedir.'/.htaccess', 'w');
$htaccessFile = $coursedir.'/.htaccess';
if ($htaccessFile) {
file_put_contents($htaccessFile, vchamilo_get_htaccess_fragment($slug));
}

@ -405,7 +405,7 @@ class InstanceForm extends ChamiloForm
'onclick="opencnxpopup(\''.$_configuration['root_web'].'\'); return false;"'
);
/*
/**
* Template selection.
*/
if ($this->is_in_add_mode()) {
@ -414,10 +414,17 @@ class InstanceForm extends ChamiloForm
$templateoptions = vchamilo_get_available_templates();
// Template choice
$form->addElement('select', 'template', $this->_plugin->get_lang('template'), $templateoptions);
$form->addSelect(
'template',
$this->_plugin->get_lang('template'),
$templateoptions
);
} else {
if ($this->instance) {
$form->addLabel($this->_plugin->get_lang('template'), $this->instance->template);
$form->addLabel(
$this->_plugin->get_lang('template'),
$this->instance['template']
);
}
}
@ -432,6 +439,7 @@ class InstanceForm extends ChamiloForm
null,
'client'
);
$form->addRule('root_web', $this->_plugin->get_lang('rootwebinputerror'), 'required', null, 'client');
$form->addRule(
'main_database',

Loading…
Cancel
Save