[root@moodle html]# diff -urNwbBE moodle/course/edit_form.php moodle23/course/edit_form.php
--- moodle/course/edit_form.php 2012-07-13 08:04:39.000000000 +0800
+++ moodle23/course/edit_form.php 2014-03-25 10:44:11.747969393 +0800
@@ -114,8 +114,10 @@
$courseformats = get_plugin_list('format');
$formcourseformats = array();
foreach ($courseformats as $courseformat => $formatdir) {
+ if ( $courseformat == "topics" or $courseformat == "weeks" ) { //dywang
$formcourseformats[$courseformat] = get_string('pluginname', "format_$courseformat");
}
+ }
$mform->addElement('select', 'format', get_string('format'), $formcourseformats);
$mform->addHelpButton('format', 'format');
$mform->setDefault('format', $courseconfig->format);
@@ -135,6 +137,10 @@
$mform->addElement('date_selector', 'startdate', get_string('startdate'));
$mform->addHelpButton('startdate', 'startdate');
$mform->setDefault('startdate', time() + 3600 * 24);
+ if (!empty($course->id) and !has_capability('moodle/course:changefullname', $coursecontext)) { //dywang
+ $mform->hardFreeze('startdate');
+ $mform->setConstant('startdate', $course->startdate );
+ }
$choices = array();
$choices['0'] = get_string('hiddensectionscollapsed');
course/edit_form.php 第 239 到 293 行包含語言選擇及角色更名,系統暫時不開放,都先註解程式。
@@ -233,7 +239,7 @@
}
}
-//--------------------------------------------------------------------------------
+/*/-------------------------------------------------------------------------------//dywang
$mform->addElement('header',”, get_string('language'));
$languages=array();
@@ -284,7 +290,7 @@
}
}
-//--------------------------------------------------------------------------------
+*///dywang--------------------------------------------------------------------------------
$this->add_action_buttons();
//--------------------------------------------------------------------------------
$mform->addElement('hidden', 'id', null);