CVS edit link for Wambolo

We (a team of 4 computer science students of TU Darmstadt, Germany) wrote a module during a lab in the last winter term.
We would now like to commit our result to the community, since our principal called our attention on the request of such a modul in the community.

The modul provides a Wiki for Organic Groups. The modul is meanwhile integrated in the Drupal-based website of our principal (www.mypaed.de, a community platform for students of science of education at TU Darmstadt).

The basic features are:

* every group can create a new wiki with typical wiki functionality
* 3 different wiki syntaxes (mediawiki, dokuwiki, wikicreole) are provided (if bueditor is installed new wiki editors will be added)
* mutex: an article can be edited only by one user until his lock expires
* configurable read/write rights
* list of last changes
* diff overview

Our modules depend on diff, pearwiki filter, bueditor, og and views.

If you register at mypaed.de you can see the wiki in action.

regards
Stefan

CommentFileSizeAuthor
#2 groupwiki_module_pack.zip46.47 KBWambolo

Comments

avpaderno’s picture

Hello, and thanks for applying for a CVS account.

In order to allow this CVS application to continue, you need to follow what reported in the email the system sent you; similar instructions are given in the page you visited before to apply for a CVS account, and in the description for the motivation form field.

The previous application was #847288: Wambolo [wambolo].

Wambolo’s picture

StatusFileSize
new46.47 KB

Hi,

just install and enable the modules and enjoy the wiki. (og, diff, views must be installed)
Each og can create a wiki. This can be done by the group admin.
The module mutual_exclusion is optional and the wiki will work without it too. Mutual exclusion will lock an article if an user is editing it. Other users canot modify the article during that time.

We also have a module called groupwiki syntax which provides bueditor integration and wikisyntax like creole 1.0 and rudimentary versions of mediawiki and dokuwiki. I did not upload this module because it depends on a modified pearwiki filter module (some filter files needed to be changed) and buttons must be copied into the bueditor folder. I could contribute the module anyway if you wish.

If you have any questions feel free to ask.

regards
Stefan

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Needs review
avpaderno’s picture

Status: Needs review » Needs work
  • This is a partial review.
  • The points reported in this review are not in order of importance / relevance.
  • Most of the times I report the code that present an issue. In such cases, the same error can be present in other parts of the code; the fact I don't report the same issue more than once doesn't mean the same issue is not present in different places.
  • Not all the reported points are application blockers; some of the points I report are simple suggestions to who applies for a CVS account. For a list of what is considered a blocker for the application approval, see CVS applications review, what to expect. Keep in mind the list is still under construction, and can be changed to adapt it to what has been found out during code review, or to make the list clearer to who applies for a CVS account.
  1. The version line needs to be removed from the .info file.
  2. Menu descriptions and titles, as well as schema descriptions, are not passed to t().
  3. function groupwiki_delete_groupwikis() {
      $q = db_query('SELECT nid FROM {groupwiki_wikis}');
      while ($f = db_fetch_object($q)) {
        node_delete($f->nid);
      }
    }
    
    

    None of the Drupal core modules that define content types delete the nodes of the content types they define, when they are uninstalled.

  4. See http://drupal.org/coding-standards to understand how a module should be written. In particular, see hoe Drupal variables, global variables, constants, and functions defined from the module should be named; how the code should be formatted.
  5. /**
     * Form builder for the GroupWiki creation or editing form.
     *
     * @param &$node
     *   The node to be created or edited
     * @param $form_state
     *   The current form's state
     *
     * @return
     *   The form-object to be displayed
     *
     * @see groupwiki_validate()
     * @see groupwiki_submit()
     * @see groupwiki_update()
     * @ingroup forms
     */
    function groupwiki_form(&$node, $form_state) {
    

    Hook implementation comments should be like the following one:

    /**
     * Implements hook_menu().
     */
    

    As reported in Documenting hook implementations:

    If the implementation of a hook is rather standard and does not require more explanation than the hook reference provides, a shorthand documentation form may be used in place of the full function documentation block described above:

    /**
     * Implements hook_help().
     */
    function blog_help($section) {
      // ...
    }
    

    This generates a link to the hook reference, reminds the developer that this is a hook implementation, and avoids having to document parameters and return values that are the same for every implementation of the hook. Optionally, you can add more information in a separate paragraph to describe the particular quirks of your hook implementation.

    In the case of hooks that have variables in the names, such as hook_form_FORM_ID_alter(), a slightly expanded syntax should be used:

    <?
    /**
    * Implements hook_form_FORM_ID_alter() for node_type_form().
    */
    function mymodule_form_node_type_form_alter(&$form, &$form_state) {
    // ...
    }
    ?>

    This generates a link to the hook reference, as well as to the particular form that is being altered. Again, optionally you can add more information in a separate paragraph to describe the particular quirks of your hook implementation.

  6.   if (!groupwiki_is_groupadmin($user->uid, $groupid)) {
        drupal_access_denied();
      }
    
    

    That code is not necessary, if hook_access() does its work.

  7.   $form['title'] = array(
        '#type' => 'hidden',
        '#title' => t('textfield'),
        '#required' => TRUE,
        '#description' => t('Title of the Wikis'),
        '#default_value' => $form_values['title'],
      );
    
    

    A hidden form field doesn't use #require.
    Is there really the need to use a hidden form field?

  8.     '#description' => t('Sets the edit permissions for the whole GroupWiki'),
    
    

    Description strings (as most of the strings used in the user interface) should end with a period.

  9. // param: $node ein Knoten vom Typ og
    
    

    Comments and variable names should be in English.

  10.     'title' => t("Last changes at wiki of '!title'", array('!title' => $node->title)),
    
    

    The node title needs to passed through check_plain(); this means the placeholder is not the right type.

  11.     if ($tmp['uid'] > 0) {
          return TRUE;
        }
        else {
          return FALSE;
        }
    
    
      return $tmp['uid'] > 0;
    
avpaderno’s picture

Status: Needs work » Closed (won't fix)

I am closing this issue due to lack of replies.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes
Status: Closed (won't fix) » Closed (duplicate)
Related issues: +#847288: Wambolo [wambolo]