array( 'captype' => 'read', 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( 'guest' => CAP_ALLOW, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), // Ability to do the game. 'mod/game:attempt' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'riskbitmask' => RISK_SPAM, 'legacy' => array( 'guest' => CAP_ALLOW, 'student' => CAP_ALLOW, 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), // Ability for a 'Student' to review their previous attempts. Review by // 'Teachers' is controlled by mod/game:viewreports. 'mod/game:reviewmyattempts' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( 'student' => CAP_ALLOW ), 'clonepermissionsfrom' => 'moodle/game:attempt' ), // Edit the game settings, add and remove questions. 'mod/game:manage' => array( 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( 'editingteacher' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), // Preview the game. 'mod/game:preview' => array( 'captype' => 'write', // Only just a write. 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), // Manually grade and comment on student attempts at a question, and regrade games. 'mod/game:grade' => array( 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), // View the game reports. 'mod/game:viewreports' => array( 'riskbitmask' => RISK_PERSONAL, 'captype' => 'read', 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), // Delete attempts using the overview report. 'mod/game:deleteattempts' => array( 'riskbitmask' => RISK_DATALOSS, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'legacy' => array( 'editingteacher' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ) ); ?>