Packaging of selected curricula items with a dynamically created curriculum description including links to learning activities and assessments.

Tracking of downloads and follow up surveying of users.

I provided the example site below for the project coordinator to take a look to get idea how this application works. Some page needs login, I will create an account for project coordinator when I get response from the coordinator.

Thank you for your generosity in sharing this work with the rest of the Moodle community. The functionality sounds like it could be very useful to the Moodle community, and the demo looks promising.

I've had a look at the module and block code, and now see that the tables used by the module are installed by the block's db/install.xml file while all of the functionality that uses the tables is in the module. That breaks convention, and means that an organisation would need to always upgrade both the block and module in the future.

In addition to the above, I have a number of concerns starting with the module and block, starting with:

Jonathan Newman
added a comment - 13/Jul/09 11:08 AM Thank you for your generosity in sharing this work with the rest of the Moodle community. The functionality sounds like it could be very useful to the Moodle community, and the demo looks promising.
I've had a look at the module and block code, and now see that the tables used by the module are installed by the block's db/install.xml file while all of the functionality that uses the tables is in the module. That breaks convention, and means that an organisation would need to always upgrade both the block and module in the future.
In addition to the above, I have a number of concerns starting with the module and block, starting with:
1. The module doesn't seem to follow Moodle's guidelines for developing modules ( http://docs.moodle.org/en/Development:Modules ). For example, none of the functions have a 'pla_' prefix, etc.
2. The module also doesn't seem to follow Moodle's general coding style guidelines ( http://docs.moodle.org/en/Development:Coding_style ).
3. Most of the require_once for config.php do not point to the corrected location (should be '../../config.php' instead of '../config.php'), so many pages don't load.
Unfortunately, I don't have time to analyse the code further.

Jonathan,
Thanks for your comments. When I developed the application, I wanted to reuse a lot of moodle libraries, I did not attempt to build an activity module since activity module is related to each course. The application I developed is on top of all courses. That is why I put everything in a separate folder called pla. When I started developing, I was relative new to moodle, in the middle of developing, I realized what I am doing is more like moodle block, if I use block feature, it is easy to maintain, upgrade. That is why I started a block which only does few things, database installation, or upgrade, the block itself just has one link pointing to the index page of pla folder which is the home page of the application.

I understands the problem you mentioned. I can covert everything into block. So there will be no separate pla folder, everything will be under block/pla/, in this way, whether it can solve some of the problems you mentioned?
I can modify the code to follow the coding style. I did check the coding style, I tried to follow. But I will check again, if anything is wrong, I will correct them.

If possible, if you can give me a link about guidelines to develop block, that will be great.

So if I make the changes, can I send the package to you again for you to check?

Ye Chen
added a comment - 14/Jul/09 2:20 AM Jonathan,
Thanks for your comments. When I developed the application, I wanted to reuse a lot of moodle libraries, I did not attempt to build an activity module since activity module is related to each course. The application I developed is on top of all courses. That is why I put everything in a separate folder called pla. When I started developing, I was relative new to moodle, in the middle of developing, I realized what I am doing is more like moodle block, if I use block feature, it is easy to maintain, upgrade. That is why I started a block which only does few things, database installation, or upgrade, the block itself just has one link pointing to the index page of pla folder which is the home page of the application.
I understands the problem you mentioned. I can covert everything into block. So there will be no separate pla folder, everything will be under block/pla/, in this way, whether it can solve some of the problems you mentioned?
I can modify the code to follow the coding style. I did check the coding style, I tried to follow. But I will check again, if anything is wrong, I will correct them.
If possible, if you can give me a link about guidelines to develop block, that will be great.
So if I make the changes, can I send the package to you again for you to check?
Thanks for your time and help.
Ye

Ye - Many thanks for sharing this block with the community. I second Jonathan's comments about getting everything under /blocks/pla which will make the code easier to treat as a block plugin similar to what I did with the mrbs block which had a lot of its own code base. It took me a while to figure out that it was best to put it all in blocks but that does help resolve a lot of issues. Once you move things around and get it working again, just re-upload the revised version here in the tracker and then I can review and test it. As for coding guidelines, I would encourage you to start at http://docs.moodle.org/en/Coding and just let us know if you have questions. Do not hestitate to let me know if you need help with anything. Peace - Anthony

Anthony Borrow
added a comment - 31/Aug/09 3:10 AM Ye - Many thanks for sharing this block with the community. I second Jonathan's comments about getting everything under /blocks/pla which will make the code easier to treat as a block plugin similar to what I did with the mrbs block which had a lot of its own code base. It took me a while to figure out that it was best to put it all in blocks but that does help resolve a lot of issues. Once you move things around and get it working again, just re-upload the revised version here in the tracker and then I can review and test it. As for coding guidelines, I would encourage you to start at http://docs.moodle.org/en/Coding and just let us know if you have questions. Do not hestitate to let me know if you need help with anything. Peace - Anthony

Anthony,
I put all files into blocks/pla folder. But I have few questions. I went through coding guideline from moodle again, I can modify my codes to meet most of them, however I have one problem. In the coding guide line, it asks one class one file. But one of my heavy used script is the back end php script to process ajax request, in the script, i have a top parent class and few child classes inherit top parent class. Whether this is acceptable?
Another problem is javascript, I used third party javascript to deal with Ajax, menu, and tree structure. Now I found YUI can have the similar libraries to use. Whether it is okay I keep the third party javascripts for now. Later I will replace them with YUI libraries which needs a lot of work to do so.

Ye Chen
added a comment - 15/Sep/09 5:02 AM Anthony,
I put all files into blocks/pla folder. But I have few questions. I went through coding guideline from moodle again, I can modify my codes to meet most of them, however I have one problem. In the coding guide line, it asks one class one file. But one of my heavy used script is the back end php script to process ajax request, in the script, i have a top parent class and few child classes inherit top parent class. Whether this is acceptable?
Another problem is javascript, I used third party javascript to deal with Ajax, menu, and tree structure. Now I found YUI can have the similar libraries to use. Whether it is okay I keep the third party javascripts for now. Later I will replace them with YUI libraries which needs a lot of work to do so.
Thanks
Ye

Ye - I am in the midst of another semester of classes and as such am a bit distracted. Your questions are good ones and I recall (but not well enough to remember what was said) a conversation about YUI vs. AJAX. Would you mind asking the question on the General Developer Forum (http://moodle.org/mod/forum/view.php?id=55) and if you do not get a response just let me know and I'll try to encourage someone who has their mind in the code to give you a good answer. Thanks for your understanding. On such things I generally find it more helpful to get feedback from the community at large rather than just one person's take on such things. Peace - Anthony

Anthony Borrow
added a comment - 15/Sep/09 1:22 PM Ye - I am in the midst of another semester of classes and as such am a bit distracted. Your questions are good ones and I recall (but not well enough to remember what was said) a conversation about YUI vs. AJAX. Would you mind asking the question on the General Developer Forum ( http://moodle.org/mod/forum/view.php?id=55 ) and if you do not get a response just let me know and I'll try to encourage someone who has their mind in the code to give you a good answer. Thanks for your understanding. On such things I generally find it more helpful to get feedback from the community at large rather than just one person's take on such things. Peace - Anthony

Ye Chen
added a comment - 23/Oct/09 3:58 AM I have made significant changes in the package and also the URL for demo site also changed. How I can upload new package to overwrite the old one and provide new URL.
Thanks
Ye

Ye - My apologies for the delayed response. Once the semester got started I did not have a chance to catch up on issues that were in my follow up folder so at last I am starting to play catch up. Thanks for your patience. You should be able to upload the revised file (with the same name) here to the tracker. Once you do, then I can evaluate it and let you know how to proceed from there. Let me know how I can be of help. Peace - Anthony

Anthony Borrow
added a comment - 28/Dec/09 3:30 AM Ye - My apologies for the delayed response. Once the semester got started I did not have a chance to catch up on issues that were in my follow up folder so at last I am starting to play catch up. Thanks for your patience. You should be able to upload the revised file (with the same name) here to the tracker. Once you do, then I can evaluate it and let you know how to proceed from there. Let me know how I can be of help. Peace - Anthony

Now that Moodle 2.0 is released, I am trying to resolve any inactive issues. I am going to resolve this issue as incomplete as it seemed we were waiting for your updates. I am not sure what happened but if you do still want this code in contrib just let me know and I can re-open the issue. Thanks for your work on this and let me know how I can best be of help. Peace - Anthony

Anthony Borrow
added a comment - 27/Nov/10 4:51 AM Now that Moodle 2.0 is released, I am trying to resolve any inactive issues. I am going to resolve this issue as incomplete as it seemed we were waiting for your updates. I am not sure what happened but if you do still want this code in contrib just let me know and I can re-open the issue. Thanks for your work on this and let me know how I can best be of help. Peace - Anthony

The new updated file has following major changes: 1. Modify the source code to meet moodle's guidelines for developing module. 2. Add initialization functionality to insert predefined data in database. 3. Provide customize functionality to allow user to customize metadata for learning activities the way they need.

I noted that there are some .DS_Store files in your zip directories. You might want to remove those.

I was able to install the code and add an instance of the block without any problems. The block, I assumed, was a starting point for the system.

I noted from the message in the block that it was a tool for educators, so I thought I would check if it was visible to students and I saw that it was. Is this something you see students using? If not, you can hide it from students and only show it to teachers/administrators. If it is only intended for teachers then I have no problem with it being a block. If it is meant to be an activity for students to complete then it should be an activity module, not a block.

When I clicked on the link in the block it opened a page and showed some messages about the code updating tables. An error was displayed...

Notice: Undefined variable: langmenu in D:\xampplite\htdocs\moodle\blocks\pla\index.php on line 9

This error appeared on other pages after that. Be sure to turn on Debugging at Site Administration --> Server --> Debugging. I recommend the second highest level labelled "ALL: Show all reasonable...".

I noticed that the breadcrumb trail at the top of the page didn't include the course. Is this plugin intended to be a per-user resource accessible from anywhere on the site? If it is different for different courses, the course should be included in the breadcrumb trail.

I went to add a learning activity. When I arrived at the form I saw numerous errors. I won't copy them all to here. I was able to add the General Information and Keywords for an activity. After I uploaded no files or links I was offered the opportunity to "save and last step". When I clicked this it said I hadn't completed the Type, Learner Level or Copyright. Perhaps the option to skip to the end should not appear when required information is complete. Also, I would ask if all the information is actually needed. Do you need to force a teacher to add all such information?

I wasn't able to add a Type or Learner Level as there were no lists to choose from. Some errors were displayed...

Notice: Undefined index: levels in D:\xampplite\htdocs\moodle\blocks\pla\pla_sublevel.php on line 176
Warning: Invalid argument supplied for foreach() in D:\xampplite\htdocs\moodle\blocks\pla\pla_sublevel.php on line 183

Is it the case that someone has to set up these lists before the plugin can be used? As there is no documentation, readme.txt or help files, it's hard for me to understand what is needed. If there are required administrative settings then these should be added as global configuration settings that he administrator is asked to fill in when the block is installed.

I was able to create a copyright. But as I was not able to set a Type or Learner Level I couldn't complete the creation of the Learning Activity. I went into the Administration area and found I could add these lists there. When I returned to contributing my Learning Activity I was able to continue the editing of the activity. I was able to add a Learner Level, but I still was not able to add a Type. The errors reported before were no longer present, but there still was no list. Therefore I could not complete the activity.

At this point I reflected that the implementation of this block is quite unconventional. If it's just a tool for teachers I think that is OK, but I would recommend a couple of things. First, perhaps the forms library can be used to a greater extent. This would bring the experience of the teacher closer to Moodle norms. At the moment there are a number of staged inputs with information stored between stages. I think combining these into a single longer form, using the forms library, would allow you to create the dependencies you need while maintaining the integrity of the database.

What you have here is quite a significant contribution. I suspect this system was first created outside of Moodle and then adapted for Moodle. Is that correct? I think in order to test the system further, apart from having a look at the numerous error messages and checking on the problems I reported above, you might also consider creating some documentation that would allow us to understand how the system should be used.

Please get back to me when you've had a chance to look at the code.

Thanks again for contributing this. It looks like this module has been around for some time, so hopefully we can help you get it published soon.

Michael de Raadt
added a comment - 01/Feb/11 10:40 AM Hi Ye Chen,
I've managed to have a look at your block.
Thanks for contributing this. It is really appreciated.
I noted that there are some .DS_Store files in your zip directories. You might want to remove those.
I was able to install the code and add an instance of the block without any problems. The block, I assumed, was a starting point for the system.
I noted from the message in the block that it was a tool for educators, so I thought I would check if it was visible to students and I saw that it was. Is this something you see students using? If not, you can hide it from students and only show it to teachers/administrators. If it is only intended for teachers then I have no problem with it being a block. If it is meant to be an activity for students to complete then it should be an activity module, not a block.
When I clicked on the link in the block it opened a page and showed some messages about the code updating tables. An error was displayed...
Notice: Undefined variable: langmenu in D:\xampplite\htdocs\moodle\blocks\pla\index.php on line 9
This error appeared on other pages after that. Be sure to turn on Debugging at Site Administration --> Server --> Debugging. I recommend the second highest level labelled "ALL: Show all reasonable...".
I noticed that the breadcrumb trail at the top of the page didn't include the course. Is this plugin intended to be a per-user resource accessible from anywhere on the site? If it is different for different courses, the course should be included in the breadcrumb trail.
I went to add a learning activity. When I arrived at the form I saw numerous errors. I won't copy them all to here. I was able to add the General Information and Keywords for an activity. After I uploaded no files or links I was offered the opportunity to "save and last step". When I clicked this it said I hadn't completed the Type, Learner Level or Copyright. Perhaps the option to skip to the end should not appear when required information is complete. Also, I would ask if all the information is actually needed. Do you need to force a teacher to add all such information?
I wasn't able to add a Type or Learner Level as there were no lists to choose from. Some errors were displayed...
Notice: Undefined index: levels in D:\xampplite\htdocs\moodle\blocks\pla\pla_sublevel.php on line 176
Warning: Invalid argument supplied for foreach() in D:\xampplite\htdocs\moodle\blocks\pla\pla_sublevel.php on line 183
Is it the case that someone has to set up these lists before the plugin can be used? As there is no documentation, readme.txt or help files, it's hard for me to understand what is needed. If there are required administrative settings then these should be added as global configuration settings that he administrator is asked to fill in when the block is installed.
I was able to create a copyright. But as I was not able to set a Type or Learner Level I couldn't complete the creation of the Learning Activity. I went into the Administration area and found I could add these lists there. When I returned to contributing my Learning Activity I was able to continue the editing of the activity. I was able to add a Learner Level, but I still was not able to add a Type. The errors reported before were no longer present, but there still was no list. Therefore I could not complete the activity.
At this point I reflected that the implementation of this block is quite unconventional. If it's just a tool for teachers I think that is OK, but I would recommend a couple of things. First, perhaps the forms library can be used to a greater extent. This would bring the experience of the teacher closer to Moodle norms. At the moment there are a number of staged inputs with information stored between stages. I think combining these into a single longer form, using the forms library, would allow you to create the dependencies you need while maintaining the integrity of the database.
What you have here is quite a significant contribution. I suspect this system was first created outside of Moodle and then adapted for Moodle. Is that correct? I think in order to test the system further, apart from having a look at the numerous error messages and checking on the problems I reported above, you might also consider creating some documentation that would allow us to understand how the system should be used.
Please get back to me when you've had a chance to look at the code.
Thanks again for contributing this. It looks like this module has been around for some time, so hopefully we can help you get it published soon.
Michael;

Michael,
Thanks to take a look at this tool. I will clean out those errors and upload the tool again with some document about how the tool works.
The main purpose of this tool is to provide a central repository for learning resources which are called Learning Activities in the tool. But it is not simple learning resources repository. Those learning resources are mapped to Competency which is high level education goal for learners through professional ability which is measurable skill or ability to demonstrate competency. So there are hierarchy structure among competency, professional ability and learning activities. The built up repository is accessible for both students and teachers to look for learning resources based on target competency and download those learning resources for teaching purpose or self learning.
But to build competency, professional ability, contribute learning activity and map them to competency is the work for educators. That part can not be accessed by users who don't have the capability.
Mainly, there are 4 parts of this tool. Contribute Learning Activity (every one has account can do it), review and approve contribution (users who has the capability), create competency, professional ability, build relation between competency and professional ability which is a curriculum map and then map approved contributions to them to create the repository (users who has the capability), browse, search repository and download learning resources (every one has account can do)
We build it as a block not an activity module, one reason it is central repository not one course activity.
It is very unconventional comparing with other moodle blocks and activity module, it seems that doesn't need to be developed as moodle block or activity module, it can be developed as a standalone application. The reason we choose moodle as the back end, one is moodle is very popular open source learning management system which has big or potential big market. We can reuse moodle powerful libraries and authentication method, moodle users can use our tool directly without installing another application and additional configuration work.
Second, currently, the tool is served as central repository, not connected to courses, users need to download learning resources from this central repository then upload it again to related courses. But our final goal is able to use the central repository to get learning resources based on target competencies and auto generate a course, so the course can be linked to competency level based on the learning resources from the repository, or the other way around, link each activity in existing course to the curriculum map (professional ability and competency). In this way, we can track learner's progress towards competencies cross courses.

We make the tool very generic to fit different user group needs. So the metadata for a learning activity can be customized. So before you upload an activity, system admin needs to customize the metadata first such as predefine learner levels, target learners, so on so forth, otherwise, there is nothing there for you to choose.

Ye Chen
added a comment - 03/Feb/11 2:07 AM Michael,
Thanks to take a look at this tool. I will clean out those errors and upload the tool again with some document about how the tool works.
The main purpose of this tool is to provide a central repository for learning resources which are called Learning Activities in the tool. But it is not simple learning resources repository. Those learning resources are mapped to Competency which is high level education goal for learners through professional ability which is measurable skill or ability to demonstrate competency. So there are hierarchy structure among competency, professional ability and learning activities. The built up repository is accessible for both students and teachers to look for learning resources based on target competency and download those learning resources for teaching purpose or self learning.
But to build competency, professional ability, contribute learning activity and map them to competency is the work for educators. That part can not be accessed by users who don't have the capability.
Mainly, there are 4 parts of this tool. Contribute Learning Activity (every one has account can do it), review and approve contribution (users who has the capability), create competency, professional ability, build relation between competency and professional ability which is a curriculum map and then map approved contributions to them to create the repository (users who has the capability), browse, search repository and download learning resources (every one has account can do)
We build it as a block not an activity module, one reason it is central repository not one course activity.
It is very unconventional comparing with other moodle blocks and activity module, it seems that doesn't need to be developed as moodle block or activity module, it can be developed as a standalone application. The reason we choose moodle as the back end, one is moodle is very popular open source learning management system which has big or potential big market. We can reuse moodle powerful libraries and authentication method, moodle users can use our tool directly without installing another application and additional configuration work.
Second, currently, the tool is served as central repository, not connected to courses, users need to download learning resources from this central repository then upload it again to related courses. But our final goal is able to use the central repository to get learning resources based on target competencies and auto generate a course, so the course can be linked to competency level based on the learning resources from the repository, or the other way around, link each activity in existing course to the curriculum map (professional ability and competency). In this way, we can track learner's progress towards competencies cross courses.
We make the tool very generic to fit different user group needs. So the metadata for a learning activity can be customized. So before you upload an activity, system admin needs to customize the metadata first such as predefine learner levels, target learners, so on so forth, otherwise, there is nothing there for you to choose.
Whenever you have time, you can check this link
https://gertie-dev.med.virginia.edu/blocks/pla/educator/pla_edu_map.php?tid=2&mode=browse
to see how the repository look like. It doesn't need account when you browse it.
I will work on the document and correcting those errors to upload a updated one for you to try again.
Thanks
Ye

Michael,
Thanks to get back to me. I have turned on debug mode to the highest level to remove those warning or notice message mainly because of variables not initialized. I could not guarantee all warning messages are gone but tried best. Since our school used this tool a lot, I kept adding functions, have not got time to prepare detail documents yet. If you have time to work on this tool, I will work out simplified document for you to test on that as administrator. I will upload the newest version code with the document no later than 6/3/11.

Ye Chen
added a comment - 31/May/11 10:12 PM Michael,
Thanks to get back to me. I have turned on debug mode to the highest level to remove those warning or notice message mainly because of variables not initialized. I could not guarantee all warning messages are gone but tried best. Since our school used this tool a lot, I kept adding functions, have not got time to prepare detail documents yet. If you have time to work on this tool, I will work out simplified document for you to test on that as administrator. I will upload the newest version code with the document no later than 6/3/11.
Thanks
Ye

Ye Chen
added a comment - 01/Jun/11 5:14 AM Newest version 2011051800 with simple instruction are added. Follow the instruction to install this block and try the basic functions and understand the working flow.

Please download this pla.zip file, it fixed the problem of SQL statement between postgres and MySQL. We used ILIKE in postgres to search non case sensitive words but it didn't work for MySQL. So we fixed it to make it work for both database.

Ye Chen
added a comment - 02/Jun/11 12:16 AM Please download this pla.zip file, it fixed the problem of SQL statement between postgres and MySQL. We used ILIKE in postgres to search non case sensitive words but it didn't work for MySQL. So we fixed it to make it work for both database.

Michael de Raadt
added a comment - 18/Aug/11 4:58 PM Hi, Ye.
I've had a look at your code and it seems to work well now, without errors.
I'll start the process of setting this up on Tracker as a new component.
Michael;

In your description, as well as describing your block, I recommend directing people to report bugs on the bug tracker as you will be notified of those, but you won't be notified of responses to your M&P entry.

Start some documentation in Moodle Docs and link to that in your M&P entry.

Michael de Raadt
added a comment - 18/Aug/11 5:16 PM You should also create an entry in the Moodle Modules and Plugins Database.
http://moodle.org/mod/data/view.php?id=6009
Add the following links
Bugs = http://tracker.moodle.org/browse/CONTRIB/component/11430
Download = Link to where you are hosting your file (we are no longer granting CVS accounts)
In your description, as well as describing your block, I recommend directing people to report bugs on the bug tracker as you will be notified of those, but you won't be notified of responses to your M&P entry.
Start some documentation in Moodle Docs and link to that in your M&P entry.
http://docs.moodle.org/en/blocks/pla/index (this is the link at the bottom of your main page)
Add [ [Category:Contributed code] ] (including square brackets) to the bottom of your Moodle Docs page so it can be indexed as contributed code.
Add a discussion topic to the appropriate forum and announce your new plugin providing links.
http://moodle.org/course/view.php?id=5
You probably want to announce on the Blocks forum. Again, direct people to report bugs on the bug tracker.
Add a link to the new topic in your M&P entry.
Once you have a complete M&P entry, let me know in this issue and I will approve it.