Added drag & drop feature to rearrange elements
This commit is contained in:
parent
58d7312d9e
commit
9998fa2b4a
22 changed files with 854 additions and 6 deletions
|
@ -238,8 +238,12 @@ class mod_customcert_edit_form extends moodleform {
|
|||
$row->cells[] = $icons;
|
||||
$table->data[] = $row;
|
||||
}
|
||||
// Create link to order the elements.
|
||||
$link = html_writer::link(new moodle_url('/mod/customcert/rearrange.php', array('id' => $page->id)),
|
||||
get_string('rearrangeelements', 'customcert'));
|
||||
// Add the table to the form.
|
||||
$mform->addElement('static', 'elements_' . $page->id, get_string('elements', 'customcert'), html_writer::table($table));
|
||||
$mform->addElement('static', 'elements_' . $page->id, get_string('elements', 'customcert'), html_writer::table($table)
|
||||
. html_writer::tag( 'div', $link, array('style' => 'text-align:right')));
|
||||
$mform->addHelpButton('elements_' . $page->id, 'elements', 'customcert');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue