LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Bhupinder Singh -
Number of replies: 9

Hi everyone,

Can anyone suggest a Layout editor for 1.5+.

There is one for Linux that is being discussed on this forum.

Garry 

Average of ratings: -
In reply to Bhupinder Singh

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Audun Hauge -
Never tried this, but anyway ...

Use the file manager (windows explorer?) to make a copy of
 xxx\course\format\weeks
(xxx is the path to your moodle directory )
Rename the new directory to test
(you should now see these directories: pda scorm  social  test  topics  weeks )

This will give you a new course format called formattest

Unzip the layout.zip into this new directory.
Open course\format\test\format.php with notepad
Edit ( ~ line 67)

    Change:
    /// Start main column
        echo '<td id="middle-column">';

        print_heading_block(get_string('weeklyoutline'), 'outline');


    To:
    /// Start main column
        echo '<td id="middle-column">'

    $extra = '';
    if (isediting($course->id)) {
            $extra = ' &nbsp; <a title="'.get_string('layout','layout').'"
            href="format/'.$course->format.'/layout.php?id='.$course->id.'">'.get_string('layout','layout').'</a>';
    }

    print_heading_block(get_string('weeklyoutline').$extra, 'outline');


Copy or move lang\en\layout.php from the zipfile to moodle\lang\en
This gives you a minimum helpfile (needs fleshing out / rewriting).
In reply to Audun Hauge

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Bhupinder Singh -

Thanks Audun,

I do have a block as per your guidance .

Can you advise some sites where the full functionality of this block is displayed.

OR a write up to read / screenshots of its implementation.

Thanks for  you guidance.

Garry

In reply to Audun Hauge

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Bhupinder Singh -

Hi Audun,

I have set up the files as under in the

C:...\course\format\   Folder

A)  C:\Program Files\EasyPHP1-7\www\Moodle\course\format\weeks

B) C:\Program Files\EasyPHP1-7\www\Moodle\course\format\test

Now the format folder has two folder ONE --> Week TWO --> Test.

THERE AFTER EXTRACTED THE CONTENTs into the TEST FOLDER.

Amended the Format.php File

MAde changes to LAng Dir.

Thereafter went back and tried to look for the changes and the there were no cgange layout button.

PS I have tried this out in a WINDOWS ENVIRONMENT>

Any suggestions what went wrong and how to debug the same.

Garry

In reply to Bhupinder Singh

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Audun Hauge -
The link only shows up in edit-mode. I don't know if you already tried this ....
In reply to Audun Hauge

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Bhupinder Singh -

Yes I tried it in EDIT Mode

No link shows up.

GArry

In reply to Bhupinder Singh

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Audun Hauge -
Have you changed settings under admin for the course and selected the new format? The new format will show up as fomattest.
(I'm just guessing in the dark here ... )
The layout link isn't a button, just a straight text link.
In reply to Audun Hauge

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Bhupinder Singh -

Hi Audun,

You were correct I was not looking at the correct place.

After selection when one runs and tries to open an error is seen:

Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in c:\program files\easyphp1-7\www\moodle\course\format\test\format.php on line 66

I loked at the file and could not decipher the ploblem.

Any suggestions.

My file Format.php is attached for a reference.

SORRY ONCE AGAIN FOR THE TROUBLE.

Garry

In reply to Bhupinder Singh

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Audun Hauge -
It seems as if line 64 is missing a semicolon.
In reply to Audun Hauge

Re: LAYOUT EDITOR FOR 1.5+ (1.6+) --WINDOWS ENVIRONMENT

by Bhupinder Singh -

Hi Audun,

Thanks A Ton. smile

Problem Solved. The Layout editor is cool.

Garry