Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Moodle Mod Adobeconnect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
elc
Moodle Mod Adobeconnect
Commits
fc1363d6
Commit
fc1363d6
authored
5 years ago
by
DFNVC
Browse files
Options
Downloads
Patches
Plain Diff
Anpassung für Moodle 3.6 und 3.7 - Bug MDL-65668
parent
834174ca
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
db/install.php
+56
-8
56 additions, 8 deletions
db/install.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
57 additions
and
9 deletions
db/install.php
+
56
−
8
View file @
fc1363d6
...
@@ -11,13 +11,63 @@
...
@@ -11,13 +11,63 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
*/
//
// DFNconf - Workaround wegen Bug MDL-65668
//
function
ac_assign_capability
(
$capability
,
$permission
,
$roleid
,
$contextid
,
$overwrite
=
false
)
{
global
$USER
,
$DB
;
if
(
$contextid
instanceof
context
)
{
$context
=
$contextid
;
}
else
{
$context
=
context
::
instance_by_id
(
$contextid
);
}
// Capability must exist.
//if (!$capinfo = get_capability_info($capability)) {
// throw new coding_exception("Capability '{$capability}' was not found! This has to be fixed in code.");
//}
if
(
empty
(
$permission
)
||
$permission
==
CAP_INHERIT
)
{
// if permission is not set
unassign_capability
(
$capability
,
$roleid
,
$context
->
id
);
return
true
;
}
$existing
=
$DB
->
get_record
(
'role_capabilities'
,
array
(
'contextid'
=>
$context
->
id
,
'roleid'
=>
$roleid
,
'capability'
=>
$capability
));
if
(
$existing
and
!
$overwrite
)
{
// We want to keep whatever is there already
return
true
;
}
$cap
=
new
stdClass
();
$cap
->
contextid
=
$context
->
id
;
$cap
->
roleid
=
$roleid
;
$cap
->
capability
=
$capability
;
$cap
->
permission
=
$permission
;
$cap
->
timemodified
=
time
();
$cap
->
modifierid
=
empty
(
$USER
->
id
)
?
0
:
$USER
->
id
;
if
(
$existing
)
{
$cap
->
id
=
$existing
->
id
;
$DB
->
update_record
(
'role_capabilities'
,
$cap
);
}
else
{
if
(
$DB
->
record_exists
(
'context'
,
array
(
'id'
=>
$context
->
id
)))
{
$DB
->
insert_record
(
'role_capabilities'
,
$cap
);
}
}
// Reset any cache of this role, including MUC.
accesslib_clear_role_cache
(
$roleid
);
return
true
;
}
function
xmldb_adobeconnect_install
()
{
function
xmldb_adobeconnect_install
()
{
global
$DB
;
global
$DB
;
// The commented out code is waiting for a fix for MDL-25709
$result
=
true
;
$result
=
true
;
$timenow
=
time
();
$timenow
=
time
();
$sysctx
=
get_
context_instance
(
CONTEXT_SYSTEM
);
$sysctx
=
context_
system
::
instance
();
$mrole
=
new
stdClass
();
$mrole
=
new
stdClass
();
$levels
=
array
(
CONTEXT_COURSECAT
,
CONTEXT_COURSE
,
CONTEXT_MODULE
);
$levels
=
array
(
CONTEXT_COURSECAT
,
CONTEXT_COURSE
,
CONTEXT_MODULE
);
...
@@ -51,11 +101,9 @@ function xmldb_adobeconnect_install() {
...
@@ -51,11 +101,9 @@ function xmldb_adobeconnect_install() {
if
(
$rid
=
create_role
(
get_string
(
'adobeconnectpresenter'
,
'adobeconnect'
),
'adobeconnectpresenter'
,
if
(
$rid
=
create_role
(
get_string
(
'adobeconnectpresenter'
,
'adobeconnect'
),
'adobeconnectpresenter'
,
get_string
(
'adobeconnectpresenterdescription'
,
'adobeconnect'
),
'adobeconnectpresenter'
))
{
get_string
(
'adobeconnectpresenterdescription'
,
'adobeconnect'
),
'adobeconnectpresenter'
))
{
$mrole
=
new
stdClass
();
$mrole
=
new
stdClass
();
$mrole
->
id
=
$rid
;
$mrole
->
id
=
$rid
;
$result
=
$result
&&
assign_capability
(
'mod/adobeconnect:meetingpresenter'
,
CAP_ALLOW
,
$mrole
->
id
,
$sysctx
->
id
);
$result
=
$result
&&
ac_assign_capability
(
'mod/adobeconnect:meetingpresenter'
,
CAP_ALLOW
,
$mrole
->
id
,
$sysctx
->
id
);
set_role_contextlevels
(
$mrole
->
id
,
$levels
);
set_role_contextlevels
(
$mrole
->
id
,
$levels
);
}
else
{
}
else
{
$result
=
false
;
$result
=
false
;
...
@@ -93,7 +141,7 @@ function xmldb_adobeconnect_install() {
...
@@ -93,7 +141,7 @@ function xmldb_adobeconnect_install() {
$mrole
=
new
stdClass
();
$mrole
=
new
stdClass
();
$mrole
->
id
=
$rid
;
$mrole
->
id
=
$rid
;
$result
=
$result
&&
assign_capability
(
'mod/adobeconnect:meetingparticipant'
,
CAP_ALLOW
,
$mrole
->
id
,
$sysctx
->
id
);
$result
=
$result
&&
ac_
assign_capability
(
'mod/adobeconnect:meetingparticipant'
,
CAP_ALLOW
,
$mrole
->
id
,
$sysctx
->
id
);
set_role_contextlevels
(
$mrole
->
id
,
$levels
);
set_role_contextlevels
(
$mrole
->
id
,
$levels
);
}
else
{
}
else
{
$result
=
false
;
$result
=
false
;
...
@@ -130,7 +178,7 @@ function xmldb_adobeconnect_install() {
...
@@ -130,7 +178,7 @@ function xmldb_adobeconnect_install() {
$mrole
=
new
stdClass
();
$mrole
=
new
stdClass
();
$mrole
->
id
=
$rid
;
$mrole
->
id
=
$rid
;
$result
=
$result
&&
assign_capability
(
'mod/adobeconnect:meetinghost'
,
CAP_ALLOW
,
$mrole
->
id
,
$sysctx
->
id
);
$result
=
$result
&&
ac_
assign_capability
(
'mod/adobeconnect:meetinghost'
,
CAP_ALLOW
,
$mrole
->
id
,
$sysctx
->
id
);
set_role_contextlevels
(
$mrole
->
id
,
$levels
);
set_role_contextlevels
(
$mrole
->
id
,
$levels
);
}
else
{
}
else
{
$result
=
false
;
$result
=
false
;
...
...
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
fc1363d6
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
*/
$plugin
->
version
=
201
81219
00
;
// The current module version (Date: YYYYMMDDXX)
$plugin
->
version
=
201
90730
00
;
// The current module version (Date: YYYYMMDDXX)
$plugin
->
requires
=
2014051212
;
// Requires this Moodle version
$plugin
->
requires
=
2014051212
;
// Requires this Moodle version
$plugin
->
component
=
'mod_adobeconnect'
;
$plugin
->
component
=
'mod_adobeconnect'
;
$plugin
->
cron
=
0
;
// Period for cron to check this module (secs)
$plugin
->
cron
=
0
;
// Period for cron to check this module (secs)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment