General plugins

 
 
Picture of M Adil Mazhar
Tool for Import activities to all courses at 1 click
 

I have a single activity i.e. URL which i wanna add to multiple courses. Adding that activity to all courses one by one is extremely tedious job to do. 

I searched any tool for the said job but didn't found any such tool. Strange to see that there isn't a tool for so basic functionality.

Now thinking to develop a tool myself. Kindly guide me in this regard as I'm new with moodle. Should i need to develop any block or admin tool? and how can i proceed further?

Thanks in advance!

 
Average of ratings: -
Picture of Richard Oelmann
Re: Tool for Import activities to all courses at 1 click
Group Particularly helpful MoodlersGroup Testers

Well, there's already a sharing cart tool available to help share resources and activities between courses

But for your specific requirement of a URL link on all courses - why not simply add it as a menu item, or in your theme, or even create an html block with the URL link which can be added as a 'sticky block' to all pages.

There would seem to already be several ways to achieve what you are looking for, which is probably why no-one has created another block to do it.

 
Average of ratings: -
Picture of M Adil Mazhar
Re: Tool for Import activities to all courses at 1 click
 

Thanks a lot Richard for your kind reply.

Yes I've already tested sharing cart, massaction and some other blocks but none of these are relevant to me as I've required a tool via which I may upload/import or choose an activity and send it to all the courses at on click or by checking the target courses.

Actually for the time being, my required activities are LABEL & URL and later quiz will also be required so your suggestion (of adding it as a menu item) is not suitable in my case.

 

 
Average of ratings: -
Picture of M Adil Mazhar
Re: Tool for Import activities to all courses at 1 click
 

Now thinking to develop a new block but being a newbie, I'm facing difficulties in this regard.

I'd developed a block by following this link but moodle (at localhost) doesn't display the page after adding my newly developed block to the blocks folder. After trying many techniques, I still didn't succeeded in getting the required results. 

Atlast, I once again just created two files as described in the starting paras of the Blocks_Howto page with nothing special in these:-

  1. blocks/(myblockname)/block_(myblockname).php &
  2. (myblockname)/lang/en/block_(myblockname).php 

According to that page, the simple block should display on my moodle account but after adding my block folder with just these two files in the block folder, I'm still getting the same issue i.e. page doesn't display.

Kindly see the attached files and identify my stupidity in these files if any smile. I also changed the version information and much more but nothing worked!

 
Average of ratings: -
Picture of M Adil Mazhar
Re: Tool for Import activities to all courses at 1 click
 

I found my very basic mistake smile

sorry for the last comment!

 
Average of ratings: -
Picture of Joseph Thibault
Re: Tool for Import activities to all courses at 1 click
Group Particularly helpful MoodlersGroup Testers

An alternative approach might be to enter the link or activity in a HTML block and make that block pervasive through the site using the Block's settings. You can make it display on every single Moodle page (it's handy if you have a static navigation to another system or a standard set of resources that all students should always see.

 

 
Average of ratings: -
Picture of M Adil Mazhar
Re: Tool for Import activities to all courses at 1 click
 

Thanks a lot dear Joseph for your reply!

Please read the above conversation. Same is suggested above by Mr. Richard Oelmann but as i told that URL & LABEL are my current requirements and later will require the quizzes as well. Hence there's a possibility that other activities i.e. assignments, folder, files, etc may also be required in future and i will have to import a same activity for all courses. So this technique is not suitable in my case.

 
Average of ratings: -
Picture of M Adil Mazhar
Re: Tool for Import activities to all courses at 1 click
 

Any guideline/help please to develop a custom block please?

I tried following http://docs.moodle.org/25/en/Blocks_Howto, but found it somehow confusing. I'm not getting the expected results.

Waiting for any kind and quick response!

 

Regards

M. Adil

 
Average of ratings: -
Davo
Re: Tool for Import activities to all courses at 1 click
Group DevelopersGroup Particularly helpful Moodlers

You may be waiting a while for a helpful response, as you've given very little information to go on.

'I'm not getting the expected results' - what did you do? what did you expect to happen? what actually happened?

You may want to start with taking a look at the code for existing blocks in Moodle core and then adapting them.

 
Average of ratings: -
Picture of M Adil Mazhar
Re: Tool for Import activities to all courses at 1 click
 

Thanks Davo!

Yes I'm already looking other blocks and getting positive results now. Will post here if found any issue. 

 
Average of ratings: -
Picture of M Adil Mazhar
Re: Tool for Import activities to all courses at 1 click
 

Kindly guide me in the following steps:-

  1. I want to show my block only in courses i.e. wanna hide it from frontpage/homepage.
  2. Then I'm thinking to create two drop down menus;
    1. One is selector/getter from where i will choose any activity of the current course
    2. Second is the list of all courses where i wanna send/post that activity.

I know performing above mentioned functionality is not so easy task whereas being an initial step, i just wanna create the basic format firstly. 

 

 
Average of ratings: -