fixed style

This commit is contained in:
2026-02-07 11:06:44 +08:00
parent f19bd3933b
commit da0cbf555b
2 changed files with 13 additions and 1 deletions

View File

@@ -30,6 +30,14 @@
text-align: left; text-align: left;
} }
.path-mod-programming .programming-code-input {
width: 100%;
max-width: 100%;
min-height: 420px;
box-sizing: border-box;
font-family: "Consolas","Courier New",Courier,monospace;
}
.path-mod-programming .buttons { .path-mod-programming .buttons {
margin: 1em; margin: 1em;
text-align: center; text-align: center;

View File

@@ -10,7 +10,11 @@ class submit_form extends moodleform {
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
$mform->addElement('hidden', 'id', $cm->id); $mform->addElement('hidden', 'id', $cm->id);
$mform->setType('id', PARAM_INT); $mform->setType('id', PARAM_INT);
$mform->addElement('textarea', 'code', get_string('programcode', 'programming'), 'rows="20" cols="90"'); $mform->addElement('textarea', 'code', get_string('programcode', 'programming'), array(
'rows' => 24,
'cols' => 120,
'class' => 'programming-code-input'
));
$attributes = 'onchange ="change()"'; $attributes = 'onchange ="change()"';
$mform->addElement('select', 'language', get_string('programminglanguage', 'programming'), programming_get_language_options($programming),$attributes); $mform->addElement('select', 'language', get_string('programminglanguage', 'programming'), programming_get_language_options($programming),$attributes);