Index: moodle/mod/lamslesson/mod_form.php =================================================================== diff -u -r80acd159361b65ce02deaae0f5d232f6c3d31f3f -r58740c8f788c7ef480364ffc71ff34059e171ad4 --- moodle/mod/lamslesson/mod_form.php (.../mod_form.php) (revision 80acd159361b65ce02deaae0f5d232f6c3d31f3f) +++ moodle/mod/lamslesson/mod_form.php (.../mod_form.php) (revision 58740c8f788c7ef480364ffc71ff34059e171ad4) @@ -92,57 +92,33 @@ $openpreviewlabel = get_string('previewthislesson', 'lamslesson'); // html "chunk" for open Author button - $authorpreviewbutton = << - - -
- - - $openauthorlabel - -
+ $authorpreviewbutton .= html_writer::script('', $CFG->wwwroot.'/mod/lamslesson/preview.js'); -XXX; + + $authorpreviewbutton .= html_writer::start_tag('div', array('id' => 'buttons', 'style' => 'float:right;')); + // Preview button + $authorpreviewbutton .= html_writer::start_tag('span', array('id' => 'previewbutton', 'style' => 'visibility:hidden;', 'class' => 'yui-button yui-link-button')); + $authorpreviewbutton .= html_writer::start_tag('span', array('class' => 'first-child')); + $authorpreviewbutton .= html_writer::link('#nogo', $openpreviewlabel, array('onclick' => js_writer::function_call('openPreview', array('1' => $previewurl, '2' => preview, '3' => 0)))); + $authorpreviewbutton .= html_writer::end_tag('span'); + $authorpreviewbutton .= html_writer::end_tag('span'); + //Authoring button + $authorpreviewbutton .= html_writer::start_tag('span', array('id' => 'authorbutton', 'class' => 'yui-button yui-link-button')); + $authorpreviewbutton .= html_writer::start_tag('span', array('class' => 'first-child')); + $authorpreviewbutton .= html_writer::link('#nogo', $openauthorlabel, array('onclick' => js_writer::function_call('openAuthor', array('1' => $authorurl, '2' => author, '3' => 0)))); + $authorpreviewbutton .= html_writer::end_tag('span'); + $authorpreviewbutton .= html_writer::end_tag('span'); + $authorpreviewbutton .= html_writer::end_tag('div'); } -// $mform->addElement('',''); $mform->addElement('hidden', 'sequence_id'); $mform->setType('sequence_id', PARAM_INT);