--- edit_form.dist.php 2008-10-13 15:38:49.000000000 -0400 +++ edit_form.php 2009-01-22 13:01:34.000000000 -0500 @@ -73,6 +73,10 @@ $mform->setHelpButton('category', array('coursecategory', get_string('category'))); $mform->setDefault('category', $category->id); $mform->setType('category', PARAM_INT); + if ($course and !has_capability('moodle/course:changecategory', $coursecontext)) { + $mform->hardFreeze('category'); + $mform->setConstant('category', $category->id); + } $mform->addElement('text','fullname', get_string('fullname'),'maxlength="254" size="50"'); $mform->setHelpButton('fullname', array('coursefullname', get_string('fullname')), true); @@ -105,6 +109,9 @@ $mform->addElement('htmleditor','summary', get_string('summary'), array('rows'=> '10', 'cols'=>'65')); $mform->setHelpButton('summary', array('text', get_string('helptext')), true); $mform->setType('summary', PARAM_RAW); + if ($course and !has_capability('moodle/course:changesummary', $coursecontext)) { + $mform->hardFreeze('summary'); + } $courseformats = get_list_of_plugins('course/format'); $formcourseformats = array();