Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Dec 9, 2020
1 parent 5c69d77 commit c6ffaeb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
13 changes: 3 additions & 10 deletions modules/dictionary/php/dictionary.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@ namespace LORIS\dictionary;
use \Psr\Http\Message\ServerRequestInterface;

/**
* Datadict module
* Handle the main index page of the dictionary module
*
* PHP version 7
*
* @category Datadict
* @package Main
* @author Ted Strauss <ted.strauss@mcgill.ca>
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
* @link https://github.com/aces/Loris-Trunk
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
*/

class Dictionary extends \DataFrameworkMenu
{
/**
* Overloading this method to allow access to site users (their own site
* only) and users w/ multisite privs
* {@inheritDoc}
*
* @param \User $user The user whose access is being checked
*
Expand Down
19 changes: 10 additions & 9 deletions modules/dictionary/php/fields.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ namespace LORIS\dictionary;
use \Psr\Http\Message\ServerRequestInterface;
use \Psr\Http\Message\ResponseInterface;
/**
* Datadict module
* The dictionary/fields endpoint handles requests to update a specific
* field description
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
*/
Expand All @@ -23,14 +24,14 @@ class Fields extends \NDB_Page
return $user->hasPermission('data_dict_edit');
}

/**
* The modules class overrides the default behaviour to handle PATCH
* requests for module_manager/modules/$modulename.
*
* @param ServerRequestInterface $request The incoming PSR7 request
*
* @return ResponseInterface
*/
/**
* The modules class overrides the default behaviour to handle PUT
* requests for the fields endpoint.
*
* @param ServerRequestInterface $request The incoming PSR7 request
*
* @return ResponseInterface
*/
public function handle(ServerRequestInterface $request) : ResponseInterface
{
$user = $request->getAttribute("user");
Expand Down
9 changes: 3 additions & 6 deletions modules/dictionary/php/moduledict.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ use \Psr\Http\Message\ServerRequestInterface;
use \Psr\Http\Message\ResponseInterface;

/**
* Categories page returns a list of valid module and their categories
* which both have a valid data dictionary and the user accessing the
* page has access to.
* The ModuleDict page returns the dictionary for a single module.
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
*/
Expand All @@ -15,8 +13,7 @@ class ModuleDict extends \NDB_Page
protected $module;

/**
* Override the hndle to return a list of valid modules and categories
* that the user has access to.
* Override the hndle to return a dictionary for a given module
*
* @param ServerRequestInterface $request the incoming PSR7 request
*
Expand All @@ -36,7 +33,7 @@ class ModuleDict extends \NDB_Page

$path = $request->getURI()->getPath();
if (strpos($path, "module/") === false) {
// if the path doesn't contain "fields" we shouldn't have
// if the path doesn't contain "module" we shouldn't have
// delegated to this class..
throw new \LorisException("Invalid internal LORIS state");
}
Expand Down

0 comments on commit c6ffaeb

Please sign in to comment.