mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
public templates deactivated
This commit is contained in:
parent
c0772270d7
commit
71720abd2f
@ -99,11 +99,12 @@ if(isset($create_template_formdata->savetemplate) && $create_template_formdata->
|
||||
{
|
||||
$savereturn = 'notsaved_name';
|
||||
}else {
|
||||
if(has_capability('mod/feedback:createpublictemplate', $context)) {
|
||||
$create_template_formdata->ispublic = isset($create_template_formdata->ispublic) ? 1 : 0;
|
||||
}else {
|
||||
//public templates are currently deaktivated
|
||||
// if(has_capability('mod/feedback:createpublictemplate', $context)) {
|
||||
// $create_template_formdata->ispublic = isset($create_template_formdata->ispublic) ? 1 : 0;
|
||||
// }else {
|
||||
$create_template_formdata->ispublic = 0;
|
||||
}
|
||||
// }
|
||||
if(!feedback_save_as_template($feedback, $create_template_formdata->templatename, $create_template_formdata->ispublic))
|
||||
{
|
||||
$savereturn = 'failed';
|
||||
|
@ -129,9 +129,11 @@ class feedback_edit_create_template_form extends moodleform {
|
||||
|
||||
$elementgroup[] =& $mform->createElement('static', 'templatenamelabel', get_string('name', 'feedback'));
|
||||
$elementgroup[] =& $mform->createElement('text', 'templatename', get_string('name', 'feedback'), array('size'=>'40', 'maxlength'=>'200'));
|
||||
if(has_capability('mod/feedback:createpublictemplate', $this->feedbackdata->context)) {
|
||||
$elementgroup[] =& $mform->createElement('checkbox', 'ispublic', get_string('public', 'feedback'), get_string('public', 'feedback'));
|
||||
}
|
||||
|
||||
//public templates are currently deactivated
|
||||
// if(has_capability('mod/feedback:createpublictemplate', $this->feedbackdata->context)) {
|
||||
// $elementgroup[] =& $mform->createElement('checkbox', 'ispublic', get_string('public', 'feedback'), get_string('public', 'feedback'));
|
||||
// }
|
||||
|
||||
// buttons
|
||||
$elementgroup[] =& $mform->createElement('submit', 'create_template', get_string('save_as_new_template', 'feedback'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user