@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $reader = array_pop($readers); |
| 95 | 95 | $context = $info->get_context(); |
| 96 | 96 | $viewscount = $reader->get_events_select_count('contextid = :context AND userid = :userid AND crud = :crud', |
| 97 | - array('context' => $context->id, 'userid' => $userid, 'crud' => 'r')); |
|
| 97 | + array('context' => $context->id, 'userid' => $userid, 'crud' => 'r')); |
|
| 98 | 98 | $allow = ($viewscount < $this->viewslimit); |
| 99 | 99 | if ($not) { |
| 100 | 100 | $allow = !$allow; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $reader = array_pop($readers); |
| 124 | 124 | $context = $info->get_context(); |
| 125 | 125 | $viewscount = $reader->get_events_select_count('contextid = :context AND userid = :userid AND crud = :crud', |
| 126 | - array('context' => $context->id, 'userid' => $USER->id, 'crud' => 'r')); |
|
| 126 | + array('context' => $context->id, 'userid' => $USER->id, 'crud' => 'r')); |
|
| 127 | 127 | |
| 128 | 128 | $a = new \stdclass(); |
| 129 | 129 | $a->viewslimit = $this->viewslimit; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -$string['ajaxerror'] = 'Erro ao conectar no servidor';//'Error contacting server' |
|
| 25 | +$string['ajaxerror'] = 'Erro ao conectar no servidor'; //'Error contacting server' |
|
| 26 | 26 | $string['pluginname'] = 'Max Views'; |
| 27 | 27 | $string['title'] = 'Maximum Views'; |
| 28 | 28 | $string['description'] = 'Bloqueia o acesso à um módulo pelo número de visualizações'; |
@@ -28,4 +28,4 @@ |
||
| 28 | 28 | $plugin->requires = 2014111000; |
| 29 | 29 | $plugin->component = 'availability_maxviews'; |
| 30 | 30 | $plugin->release = 3; |
| 31 | -$plugin->maturity = MATURITY_STABLE; |
|
| 31 | +$plugin->maturity = MATURITY_STABLE; |
|