Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e7c0a48c
Commit
e7c0a48c
authored
Jul 04, 2008
by
Richard Mansfield
Browse files
Set group view access on creation of group views
parent
9ae8d8bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/view/edit.php
View file @
e7c0a48c
...
...
@@ -186,6 +186,17 @@ function editview_submit(Pieform $form, $values) {
}
$view
->
commit
();
if
(
empty
(
$editing
)
&&
$group
)
{
// By default, group views should be visible to the group
$view
->
set_access
(
array
(
array
(
'type'
=>
'group'
,
'id'
=>
$group
,
'startdate'
=>
null
,
'stopdate'
=>
null
,
'role'
=>
null
)));
$view
->
commit
();
}
if
(
$values
[
'new'
])
{
$redirecturl
=
'/view/blocks.php?id='
.
$view
->
get
(
'id'
)
.
'&new=1'
;
...
...
htdocs/view/groupviews.php
View file @
e7c0a48c
...
...
@@ -59,7 +59,7 @@ $pagination = build_pagination(array(
$smarty
=
smarty
();
$smarty
->
assign
(
'groupid'
,
$group
);
$smarty
->
assign
(
'views'
,
$data
->
data
);
$smarty
->
assign
(
'caneditgroupview
s
'
,
group_user_can_edit_views
(
$group
));
$smarty
->
assign
(
'caneditgroupview'
,
group_user_can_edit_views
(
$group
));
$smarty
->
assign
(
'pagination'
,
$pagination
[
'html'
]);
$smarty
->
assign
(
'heading'
,
get_string
(
'groupviewsfor'
,
'view'
,
get_field
(
'group'
,
'name'
,
'id'
,
$group
)));
$smarty
->
display
(
'view/index.tpl'
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment