How to add an custom field in add/edit course page ?

How to add an custom field in add/edit course page ?

Bởi Mohammad kabir -
Số lượng các câu trả lời: 10

Theme working good. It was good instruction by you.

I want to add an custom field in add/edit course page. Don't want to hack core code. If there is other way to do that by plugin/block  or extending main function.. or any other way..

Any guide line .. welcome cười

Thank you.


Trung bình điểm đánh giá: -
Để phản hồi tới Mohammad kabir

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Richard Oelmann -
Hình của Core developers Hình của Plugin developers Hình của Testers

To avoid making changes to core code, your best option will probably be to create a custom course format - clone the Topics format (for example) and add your extra field in there.

You may be better reposting that as a separate question in the Courses and Formats forum as it is a separate issue to your themes question

HTH

Richard

Để phản hồi tới Richard Oelmann

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Mohammad kabir -
Is there any paid forum for moodle ? I can be in paid forum to get some help during coding in moodle.

Thanks for you answer. I attached where I want to add custom field.

File đính kém courseEdit.png
Để phản hồi tới Mohammad kabir

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Gareth Barnard -
Hình của Core developers Hình của Particularly helpful Moodlers Hình của Plugin developers

Sometimes asking for a specific solution at a technical level is not the correct question as you might be surprised by alternatives you have not thought of.  Therefore, why do you want to add a custom field there?

Để phản hồi tới Gareth Barnard

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Mohammad kabir -

I made a custom course block. I want a field where different course icon can be uploaded. Therefor I need to add a custom field in  course settings.

My objective is to avoid hack core code. I looked for code under course/format, didn't find any code for field there.

File đính kém courseEdit.png
Để phản hồi tới Mohammad kabir

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Mary Evans -

Hi,

Where do you want the course icon to show up? In the course header?

Did you know you can add an image in the Course summary when you set up a course?  Or you can add it later if the course is already established. To do this you select Edit settings when you are in the Course itself.

That image can then be made to show up on the course page. So there is no need to make a new field.

Hope that helps?

Mary

Để phản hồi tới Mary Evans

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Mohammad kabir -

I made a custom block for course. Will use icon there. 

File đính kém cusotm_course_block.png
Để phản hồi tới Mohammad kabir

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Mary Evans -

COOL!!!

Để phản hồi tới Mary Evans

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Mohammad kabir -

I add icon by code myself now. I want to upload icon through course settings page. So admin can change the icon himself.  

Want to add that custom field( for icon upload)  by plugin or something like that. Not by hacking core code.

If anyone have suggestion. Thank you.

Moodle version : 2.8

Để phản hồi tới Mohammad kabir

Re: Adding Bootstrap jQuery Plugins to a theme (Moodle 2.8 and earlier)

Bởi Mary Evans -

Hi,

Good work...Excelent!

if you just want to add links to these two options you can do that as a Label in Main Menu 

To get to the Main Menu you need to:

  1. turn editing ON in the Frontpage
  2. select Main Menu from the ADD BLOCK block
  3. In the Main Menu block select Add activity/resource
  4. ADD a Label
  5. in that Label ADD the two links

That is assuming that is all you wanted to do?

Cheers

Mary