CVS edit link for TechNikh

I want to maintain "Camtasia relay module" developed by me and sponsored by TechSmith (http://www.techsmith.com/). I have been developing this module for a while and now it's ready to be showcased at Educause Event on Oct 12 2010. (http://www.educause.edu/)

About Camtasia relay:
Camtasia Relay allows multiple people to create screencast videos with just a computer.
Once recorded, the video is automatically produced and available for viewing online, on an iPod or just about anywhere. (http://www.techsmith.com/camtasiarelay.asp)

Steps:
1)A user captures media using Camtasia relay client.
2)This client will upload the media to Camtasia relay server.
3)The server converts this media to different formats like flv, ipod.... using pre configured encode settings.
4)The server publishes this media to Drupal server via ftp.
5)The Drupal module will scan the directory on cron run and create nodes for each recorded media.

The working of this module can be seen at http://www.lyceumtechnologies.com/
Username: demo Password: demo

Comments

technikh’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: +module, +meta, +xml, +download, +media, +player
StatusFileSize
new44.13 KB
new9.9 KB
new69.26 KB
new38.59 KB

I'm adding attachment of the written module (relay.zip).

I am also attaching few screenshots for the better understanding.

technikh’s picture

Issue tags: +Module review

Adding Tag "CVS module review"

kaw3939’s picture

I work for a university and we will use this and have been waiting
For something like this to help. I can't wait to use it!

trungonly’s picture

I'd like to put some comments:

- In relay_form() function, there are plenty of hidden form fields which have title passed to t(). Since this is a hidden field, so there is no UI for these t() passed words. Using t() will put un-translated sentences into {locals_source} database table, which is unused. We should remove t() or even remove #title in this case.

- You should require_once() only when needed, for example require_once("relay_func_file.inc") only in functions relay_cron() and relay_file_move(). Doing require_once() in the global of header file will cause these files loaded everytime the boottrap loads, even when relay module is not in use.

- You should replace strlen($dir) by drupal_strlen($dir) for more string handling.

- There are some unused code commented out like in relay_perm() function and more. We could get rid of them without trouble.

- Capitalize this word "implementation".

technikh’s picture

Thanks trugonly for your comments.

- I will remove the t() for hidden elements. I cannot remove #title & #description because in future they may not be hidden. User may be wiling to edit those fields.
- I will fix other issues and attach the updated module soon.

Thanks once again.

svendecabooter’s picture

Status: Needs review » Needs work

Setting to 'needs work' based on comments by trungonly

avpaderno’s picture

Issue tags: -module, -meta, -xml, -download, -media, -player

Just a note: the function to use to load a PHP file is module_load_include().

technikh’s picture

Status: Needs work » Needs review
StatusFileSize
new9.83 KB

Here is the Updated module as per suggestions by trugonly.

1)I removed t() for hidden form elements.
2)I used module_load_include() at the cron hook instead of top of the file. Thanks kiamlaluno & trugonly.
3)I replaced strlen($dir) with drupal_strlen($dir)
4)I removed all the unwanted & commented code.
5)I put "Implementation" instead of "implementation".

Please Review the module code and Let me know if I am missing any thing else.

I am changing the status to needs review.

Thank You all.

svendecabooter’s picture

Status: Needs review » Needs work

Some remarks while scanning though the code and UI:

  • In relay_form(), the 'hidden' form elements are using properties that are not used for this type (e.g. #title, #maxlength, #required, ...) since there is no user input - See http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.... for properties to use
  • On admin/settings/relay/configure you might want to provide default values instead of "". You should also add a validation handler to relay_admin_settings() to make sure these settings make sense (e.g. max limit should be numeric, path and default user should exist, etc...).
  • You might want to add filter_form() in the body_filter form definition at relay_form(), so users are able to select an appropriate input format for the body. Unless you intentionally want to keep this field plain text.
  • Line 325: 'file' property is not needed, since the theming system will look into the relay.module file anyway...
  • The 'admin/settings/relay/configure' menu item could be removed, since you have only 1 settings page anyway
  • You should probably use the menu wildcard loader arguments functionality. See http://drupal.org/node/224170. This means you should use $items['node/%node/meta'] in hook_menu(), so you get passed the $node object as argument to relay_meta_info() and relay_meta_access(). This avoids needing to call node_load in both of these functions. Same for node/%node/download.
  • Please use a blank CVS header in relay.views.inc (// $Id$)
  • Not sure what the echo statements in relay_func_node.inc are for on line 111 and 224, but it's normally best practice to put those through a theme() function, and return them with a return statement instead of printing or echoing.
svendecabooter’s picture

Oh... and don't use t() in relay_schema(). See http://drupal.org/node/322731

trungonly’s picture

If you like to put "#title" in hidden form field, for a place holder for later use, you may put them into a comment segment next to it ?

technikh’s picture

Status: Needs work » Needs review
StatusFileSize
new9.95 KB

Here is the Updated module as per suggestions.

1) I commented the unused properties for hidden elements. The reason I didn't remove them is in future releases they might be visible.
2) I provided default values in Settings page.
3) I put form validation handlers for max limit(numeric) and made the path field required.
4) I added filter to body field.
5) removed 'file' property in line 325
6) removed 'admin/settings/relay/configure'
7) Used menu wild card loader at all 3 places and updated functions accordingly. node/%node/
8) Corrected blank CVS header in relay.views.inc (// $Id$)
9) removed echo and print_r statements. they were for debugging.
10) removed t() in relay_schema().

Thank You all. I appreciate it. Please review the attached code. I am changing the status to 'needs review'.

technikh’s picture

Can some one please review the module and take it to next step..

trungonly’s picture

Bump. Good luck.

technikh’s picture

Thanks trungonly.

I am excited to see this moving.

Thank You all.

kaw3939’s picture

HI,

I"ve been following this module. I'd like to use it soon. When will this be approved for download / collaboration.

kaw3939’s picture

Status: Needs review » Reviewed & tested by the community

based on trungonly comments from #14 I am changing the status to reviewed & tested by the community."
and change status to reviewed & tested by the community.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs review
kaw3939’s picture

Can someone review and approve this module?

What seems to be the hold up?

I really would like to use it and I think many other people would as well, its fairly useful for educational institutions that have Camtasia Relay servers.

kaw3939’s picture

Can this be approved yet? I really want to use this module, but it needs approved for me to do so. Thank You,

Keith

dragonwize’s picture

My review of this module as requested by TechNikh: (reviewing off of file in #12)

Need fixed before approval

  1. All variables should be in the modules namespace. "dir_search_style" should be corrected to "modulename_dir_search_style".
  2. The ending comments for functions are not part of the Drupal standard and should be removed. ex: //function relay_node_info()
  3. Node name should be sentence case. "Camtasia relay"
  4. The module should not be put into a package of its own in the .info file. Refer to http://drupal.org/node/231036#package
  5. Doc block comments should follow the Drupal Doxygen format not the PHPdoc format. http://drupal.org/node/1354
  6. In "relay_meta_access()" and "relay_download_access" the else clause needs braces around it.
  7. Since simplexml is being used and it is only available in PHP5, a requirement should be listed in the .info file. ex: php = 5.x
  8. The functions in relay_func_file.inc and relay_func_node.inc should be prefixed with the module name to prevent namespace collisions.

Non-blocking suggestions

  1. The INSTALL.txt file says in step #3 to give the "upload files" permission to the anonymous role. This raises huge security issues that I do not think most sites will be willing to accept. While this is not a complete show stopper I do not see the module being of much use if this is a requirement.
  2. The module name I think could stand to be more specific. While "relay" is short it is also very generic. I would like to see this namespace saved for a more generic relay module not one specific on a service.
  3. A README.txt file describing what this module is and any other important info would be great. This is usually great place to start writing what will be on the project page.
  4. Permissions are confusing. Node is called "Camtasia Relay" while all the permissions refer to a presentation. It would be best to choose 1 term and stick with it.
  5. Comments should begin with a capital letter.
  6. Arrays in "relay_view()" should follow the standard and place the ending ); on a line by itself.
  7. The path option in "relay_views_api()" is redundant as it is by default the module's path.
  8. Use a more specific path for "node/%node/meta". That adds a meta path to every node page and it is only specific to your camtasia relay meta information. A solution might be "node/%node/relay-meta"
  9. Same for the "node/%node/download" path.
  10. relay.views.inc has some spacing issues with some $data lines not properly aligned.

All in all, this is good work. I have no doubt you are well on you well to being a great Drupal developer. Please take these an all other comments as information to help you grow in a positive way.

dragonwize’s picture

Status: Needs review » Needs work

Forgot the status change.

technikh’s picture

Thanks dragonwize for your valuable suggestions.

I fixed the show stoppers. I will fix the remaining issues before this weekend and update the code here.

Thanks again!!

technikh’s picture

Status: Needs work » Needs review
StatusFileSize
new10.85 KB

Thanks dragonwize. I updated the module with these changes. Please review it.
1. All variables are in the modules namespace.
2. The ending comments for functions are removed.
3. Node name changed to "Camtasia relay"
4. Removed package in info file
5. Doc block comments are updated
6. In "relay_meta_access()" and "relay_download_access", the else clause now has braces around it.
7. A requirement for PHP5 is listed in the .info file.
8. The functions in relay_func_file.inc and relay_func_node.inc are now prefixed with the module name to prevent namespace collisions.
9. now the "upload files" permission need not be given to anonymous role.
10. A README.txt file describing what this module is provided.
11. Arrays in "relay_view()" now follow the standard and have the ending ); on a line by itself.
12. Removed the path option in "relay_views_api()" as it's redundant.
13. Now it's "node/%node/relay-meta" and "node/%node/relay-download"
14. Resolved spacing issues in relay.views.inc Now $data lines are properly aligned.

technikh’s picture

StatusFileSize
new11.06 KB
new11.06 KB

also changed the module name from "relay" to "camtasia_relay".

technikh’s picture

kiamlaluno,

Is there anything further I can do to move this forward? I've been working on this for about 11 weeks now. Any help or advice would be much appreciated.

Nikhil

avpaderno’s picture

Status: Needs review » Fixed
avpaderno’s picture

Assigned: Unassigned » avpaderno
technikh’s picture

Awesome!! Thank You so much.

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.