- Thrash works, drop mods onto trash
- Available resources from other courses are shown as a scrunched list under mod-icon, click icon to expand list.
- The calendar icon works, click on day,h,m to adjust. Drag the module (preexisting, not blue) to desired week, drag calendar onto mod and click (changes color, day show). Mods with date limits get their dates set.
- Remove many activities fast
- Share activities to other courses
Name field of the module has "+" sign when there should be " ".
I have two questions:
- Can admin bring all the modules from other courses?
- Can teacher bring all the modules from all the courses, where he is teacher?
The code for finding available modules for copying is:
$mycourseids = 'select id,course from user_teachers where userid='.$USER->id
FROM $thismod->name r
WHERE r.course = c.id and r.course != '.$course->id.'
AND ( INSTR(r.name,"[PUBLIC_COPY]")
OR r.course IN ('.$mycourseidlist.') )
Thus a teacher gets copies from all her courses and also from mods where [PUBLIC_COPY] is part of the name
I just tested as admin, I get nothing to copy. The list could be rather big if admin was to be able to copy from all courses. Perhaps an option to select course to copy from ?
There are some functions in lib/datalib.php which maybe could be of use:
get_my_courses , get_courses_page, etc...
It's better if admin must be in actual list of teachers to get copies. No option is needed.
This "toy" sounds really useful. In my use of moode I frequently need to copy or move activities or even whole sections from one course to another. I have some money to fund the development of a tool that will let you do that and the most sensible thing it seems would be to expand and build on the work you have already done. Would you be interested in that?
If yes, please send me an e-mail at alim(AT)nur(DOT)edu.
Thanks for your contribution!
I have one problem. . . I am working locally on 1.5dev - I have an error popping up when I attempt to go to my admin page
Fatal error: Class courseblock_layout: Cannot inherit from undefined class moodleblock in ../../moodle/blocks/layout/block_layout.php on line 5
I am just not sure if I have done everything right and beyond that, I don't know if you intended for .layout to be used for this version, so no worries there.
I have also tried with 1.4.2 with no luck. All of my blocks disappear.
I have concluded that I am doing something kookie and was hoping for some guidance.
The nooB strikes again
I'll post a new version sometime before the new year. You can get the script to work by following suggestion by Darren:
$this->content->items='<a href="'.$CFG->wwwroot.'/blocks/layout/layout.php?id='.$this->course->id.'">Edit Layout</a>';
... in block_admin.php you just get a link in the admin menu rather than having to add the block to every course
Also you can enter .../blocks/layout/layout.php?id=xxx
into the adress line of your browser.
xxx is id of your course (will show on adress line).
This has some excellent features - thee ability to just grab and move weeks and resources around is superb but I am also having problems under 1.4.3 with IE and firefox1. When I try to load the page both browsers complain about:
Thinking about it more, this is possibly because we have 100s of resources it is trying to load - The unexpanded resource lines do take up around 5 screens worth of scrolling down. Perhaps a drop down list of course so the user can select which course he wants to view resources from instead of getting the full list may spread the initial load up?
On a minor note, it may be useful if the icons were labelled and the save changes button doesn't appear - it just appears as text but was a button in the last version. Is that deliberate?
Hope that was helpful rather that critical
I've left of labeling icons so that I didn't have to add language strings (icons work in all languages), will add text & stuff later.
The GUI is just a prelim version, I didn't get the behavior I wanted from a submit-button. I expect I'll either add a button or an imitation.
Thanks for the helpful critisism!
So - will have some fun figuring out new code for shifting blocks in this new version. Also fixing code so that the layout-editor can handle any number of external resources/mods.
I'm surprised that the code degraded so gracefully - would have expected total collapse (testing on fresh 1.5). Coding for moodle is fun . Thanks to Martin and Jon and .. and ...
Very very nice, tested under 1.4.3: gives you the feeling that you really create/rearrange a course on the fly. Brings Moodle to a new level of user friendlyness, thanks...
How difficult is it to create a second (empty) course next to the first one and drag and drop resources from the first to the second (and then save the second?)
With one thing or another I have been very lazy about getting your block to work. I failed to get the 1.4 version to work with 1.5 (no surprises) as reported at another post.
But today, at last, I tried to get the 1.4 (and when that failed the 1.5) version to work with my 1.4.4+. Neither version of the block seem to have been recognised when I went to the admin or blocks screen. No tables were created. All was quiet, as if I had not uploaded the layout folder to the blocks folder of moodle.
My guess is that it is a something to do with my version
Moodle 1.4.4 + (2004083140)
Suggestiosn would be gratefully recieved.