فهرست منبع

Update 'db/access.php'

Synchronizing iAssign Git with the current iAssign stable version (until Moodle 5.0).
Small changes in: ilm_manager.php, lang/*/iassign.php
Bigger changes in: ilm_manager_form.php, lib.php, settings_form.php, settings.php, version.php, backup/moodle2/*.php, ilm_debug/escreva.php, ilm_handlers/java.php
New iLM versions: iassign/ilm/iFractions/, iassign/ilm/iHanoi/, iassign/ilm/iVProg/
New file (was missing): settings_activities.php
leo 2 هفته پیش
والد
کامیت
20fe57644b
1فایلهای تغییر یافته به همراه11 افزوده شده و 4 حذف شده
  1. 11 4
      db/access.php

+ 11 - 4
db/access.php

@@ -1,7 +1,11 @@
 <?php
 
 /**
- * Capability definitions for the ia module.
+ * Capability definitions for the iAssign module.
+ * For instance, this is used when anyone, under role smaller then teacher, try to edit any iAssign activity, trying
+ * http://.../<your_moodle>/mod/iassign/view.php?action=edit&id=2&iassign_current=1&iassign_up=1&iassign_down=65
+ * then 'locallib.php!iassign->__construct(...)' block the access using 
+ * "if (!has_capability('mod/iassign:evaluateiassign', $this->context, $USER->id))"
  * 
  * The system has four possible values for a capability:
  *  - CAP_ALLOW
@@ -18,15 +22,18 @@
  *  - user  - All users who login.
  * 
  * @author Patricia Alves Rodrigues
- * @author Leônidas O. Brandão
+ * @author Leo^idas de Oliveira Branda~o
+ * 
+ * @version v 1.1 2023/05/25 additional explanation of has_capability(.)
  * @version v 1.0 2010/09/27
  * @package mod_iassign_db
  * @since 2010/09/27
- * @copyright iMatica (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
+ * @copyleft iMath (<a href="http://www.matematica.br">iMath</a>) - Computer Science Dep. of IME-USP (Brazil)
  * 
  * <b>License</b> 
  *  - http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
+
 $capabilities = array(
   'mod/iassign:view' => array(
     'captype' => 'read',
@@ -125,4 +132,4 @@ $capabilities = array(
       'manager' => CAP_ALLOW
     )
   )
-);
+);