This commit is contained in:
dhawes 2005-01-25 01:57:56 +00:00
parent 9c8febab60
commit c0c6f36bf2
2 changed files with 3 additions and 2 deletions

View file

@ -73,7 +73,7 @@ class block_rss_client extends block_base {
//if the user is an admin, course teacher, or all user are allowed - //if the user is an admin, course teacher, or all user are allowed -
// then allow the user to add rss feeds // then allow the user to add rss feeds
if ( isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher) ) { if ( !isguest() && (isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher)) ) {
$output .= '<div align="center"><a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?courseid='. $courseid .'">'. get_string('block_rss_feeds_add_edit', 'block_rss_client') .'</a></div><br />'; $output .= '<div align="center"><a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_action.php?courseid='. $courseid .'">'. get_string('block_rss_feeds_add_edit', 'block_rss_client') .'</a></div><br />';
} }

View file

@ -46,9 +46,10 @@
if ($courseid != 'none'){ if ($courseid != 'none'){
$isteacher = isteacher($courseid); $isteacher = isteacher($courseid);
} }
//if the user is an admin or course teacher then allow the user to //if the user is an admin or course teacher then allow the user to
//assign categories to other uses than personal //assign categories to other uses than personal
if (! ( isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher) ) ) { if (isguest() || !( isadmin() || $submitters == SUBMITTERS_ALL_ACCOUNT_HOLDERS || ($submitters == SUBMITTERS_ADMIN_AND_TEACHER && $isteacher) ) ) {
error(get_string('noguestpost', 'forum'), $referrer); error(get_string('noguestpost', 'forum'), $referrer);
} }