Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show new fields in course view #17

Open
HoracioAlvarado opened this issue Feb 4, 2019 · 3 comments
Open

Show new fields in course view #17

HoracioAlvarado opened this issue Feb 4, 2019 · 3 comments

Comments

@HoracioAlvarado
Copy link

Hello,

We are trying to use this moodle plugin to add new fields to all courses.
We were able to add the fields and set the values in each course, but we can't find how or where are the fields show.

Moodle 3.6

Any help would be appreciated.

@HoracioAlvarado HoracioAlvarado changed the title Show new fileds in course view Show new fields in course view Feb 4, 2019
@seb-vial
Copy link

seb-vial commented Feb 5, 2019

Hello,

If your database is correctly filled with metadata for your courses, it's then up to you to implement the display feature in the theme you use.

@HoracioAlvarado
Copy link
Author

@Birssan thanks for your answer.

We were looking for a plugin that allowed us to add new fields to courses without the need to modify moodle core code (we have done this in the past and updating moodle after is a nightmare)

As I understand, with this plugin we can add new fields and we only need to modify the theme to show the fields.

A related question (please let me know if I need to open a new issue for this), we are going to need to get the field via Rest API, do you guys have any advise on this?

Thanks

@seb-vial
Copy link

seb-vial commented Feb 6, 2019

That's right, as far as I know (and I could definitely be wrong) , there is no way for local plugins to "inject" view code in theme templates. You have to edit your theme templates and renderers to get metadata and display them. I would suggest (if not already done) to inherit from the theme you're using.

Regarding your need for REST API, I don't think this is implemented for this plugin, but if you really need that feature, you're welcome to check the developer documentation about web services and more specifically how to add web services to your plugin. If you decide to contribute to the plugin, don't hesitate to make a PR @mchurchward will look at it when he can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants