Move buttons to Nav panel

Move buttons to Nav panel

Daniel Celestino發表於
Number of replies: 4

Hi!

I´m from Argentina and I´m working to implement moodle 3.3.2 as a exam software (Yes, weird but it´s working well)


Now, I´m changing the colors, the language, etc. And, i´m trying to move two buttos to the nav panel (See the imagen below)


I have this



Need this:



I have not knowledge of php or css, but I manage myself. 

Any ideas?


Thanks in advance!


附件 Actual.png
附件 comoloquiero.png
評比平均分數: -
In reply to Daniel Celestino

Re: Move buttons to Nav panel

Tim Hunt發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

If you know a bit of PHP, then it should be possible (not necessarily easy) to do this by applying this technique: https://docs.moodle.org/dev/Overriding_a_renderer

In reply to Tim Hunt

Re: Move buttons to Nav panel

Daniel Celestino發表於

I´m not a programmer, so I can´t do that.

I think that the key is here:

public function navigation_panel(quiz_nav_panel_base $panel) {


        $output = '';

        $userpicture = $panel->user_picture();

        if ($userpicture) {

            $fullname = fullname($userpicture->user);

            if ($userpicture->size === true) {

                $fullname = html_writer::div($fullname);

            }

            $output .= html_writer::tag('div', $this->render($userpicture) . $fullname,

                    array('id' => 'user-picture', 'class' => 'clearfix'));

        }

        $output .= $panel->render_before_button_bits($this);


        $bcc = $panel->get_button_container_class();

        $output .= html_writer::start_tag('div', array('class' => "qn_buttons clearfix $bcc"));

        foreach ($panel->get_question_buttons() as $button) {

            $output .= $this->render($button);

}

        $output .= html_writer::end_tag('div');


        $output .= html_writer::tag('div', $panel->render_end_bits($this),

                array('class' => 'othernav'));


        $this->page->requires->js_init_call('M.mod_quiz.nav.init', null, false,

                quiz_get_js_module());


        return $output;

    }


But, I do not know what can I do to render the buttons that I need. Has someone have a little knowledge to reach this?


Thanks in advance


In reply to Daniel Celestino

Re: Move buttons to Nav panel

Rick Jerz發表於
Particularly helpful Moodlers的相片 Testers的相片

I wonder if your problem might be related to the theme that you are using.  I am using the standard Boost theme,  and I already have (some) buttons under the navigation area.  However, I might not be totally understanding what you want to do.

I don't program with php.  I do use some CSS.  You will have to live with the arrangement of these features because of your lack of php and CSS.

The good news might be that students may not complain.  Mine don't... they accept the default positions.  (Only teachers seem to be fussy about these.)

Buena suerte.

In reply to Rick Jerz

Re: Move buttons to Nav panel

Daniel Celestino發表於

I know where to use css, but I do not know what is the code to reach this. I used some css code found in this forums, but I could found any related to move buttons from one side to another.

Thanks anyway for your answer.