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.