--- loncom/auth/lonroles.pm 2013/06/02 02:21:43 1.287 +++ loncom/auth/lonroles.pm 2014/01/08 17:18:15 1.294 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.287 2013/06/02 02:21:43 raeburn Exp $ +# $Id: lonroles.pm,v 1.294 2014/01/08 17:18:15 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -532,6 +532,7 @@ ENDENTERKEY my ($feeds,$syllabus_time); &Apache::lonrss::advertisefeeds($cnum,$cdom,undef,\$feeds); &Apache::lonnet::appenv({'request.course.feeds' => $feeds}); + &Apache::lonnet::get_numsuppfiles($cnum,$cdom,1); unless ($env{'course.'.$cdom.'_'.$cnum.'.updatedsyllabus'}) { unless (($env{'course.'.$cdom.'_'.$cnum.'.externalsyllabus'}) || ($env{'course.'.$cdom.'_'.$cnum.'.uploadedsyllabus'})) { @@ -544,13 +545,14 @@ ENDENTERKEY } } if (($env{'form.orgurl'}) && - ($env{'form.orgurl'}!~/^\/adm\/flip/)) { + ($env{'form.orgurl'}!~/^\/adm\/flip/) && + ($env{'form.orgurl'} ne '/adm/roles')) { my $dest=$env{'form.orgurl'}; if ($env{'form.symb'}) { if ($dest =~ /\?/) { $dest .= '&'; } else { - $dest .= '?' + $dest .= '?'; } $dest .= 'symb='.$env{'form.symb'}; } @@ -691,7 +693,7 @@ ENDENTERKEY $redirect_url .= $where; } $redirect_url .= '/'; - &redirect_user($r,&mt('Entering Construction Space'), + &redirect_user($r,&mt('Entering Authoring Space'), $redirect_url); return OK; } @@ -1156,7 +1158,7 @@ sub gather_roles { } #next if ($home eq 'no_host'); $home = &Apache::lonnet::hostname($home); - $ttype='Construction Space'; + $ttype='Authoring Space'; $twhere=&mt('User').': '.$trest.'
'.&mt('Domain'). ': '.$tdom.'
'. ' '.&mt('Server').': '.$home; @@ -1175,7 +1177,7 @@ sub gather_roles { } #next if ($home eq 'no_host'); $home = &Apache::lonnet::hostname($home); - $ttype='Construction Space'; + $ttype='Authoring Space'; $twhere=&mt('Domain').': '.$tdom.'
'.&mt('Server'). ': '.$home; $env{'course.'.$tdom.'_'.$trest.'.description'}='ca'; @@ -1348,7 +1350,7 @@ sub roletable_headers { } sub roletypes { - my @types = ('Domain','Construction Space','Course','Community','Unavailable','System'); + my @types = ('Domain','Authoring Space','Course','Community','Unavailable','System'); return @types; } @@ -1487,7 +1489,7 @@ sub privileges_info { my (undef,$tdom,$trest,$tsec)=split(m{/},$where); if ($trest) { if ($env{'course.'.$tdom.'_'.$trest.'.description'} eq 'ca') { - $ttype='Construction Space'; + $ttype='Authoring Space'; $twhere='User: '.$trest.', Domain: '.$tdom; } else { $ttype= &Apache::loncommon::course_type($tdom.'_'.$trest); @@ -2465,7 +2467,7 @@ sub update_session_roles { if ($desc) { $newmsg .= '
  • '. &mt('[_1] with status: [_2].', - $desc,$newrole{$item}).'
  • '; + $desc,&mt($newrole{$item})).''; } } if ($newmsg) { @@ -2732,11 +2734,14 @@ sub get_roles_functions { } if ($env{'user.adv'}) { if ($env{'form.display'} eq 'showall') { - push(@links,["javascript:rolesView('noshowall');",'edit-redo-22x22',&mt('Exclude expired roles')]); + push(@links,["javascript:rolesView('noshowall');",'edit-redo-22x22',&mt('Exclude expired')]); } else { - push(@links,["javascript:rolesView('showall');",'edit-undo-22x22',&mt('Include expired roles')]); + push(@links,["javascript:rolesView('showall');",'edit-undo-22x22',&mt('Include expired')]); } } + if (&Apache::loncommon::designparm('login.coursecatalog',$env{'user.domain'})) { + push(@links,['/adm/coursecatalog','ccat-22x22',&mt('Course catalog')]); + } my $funcs = &Apache::lonhtmlcommon::start_funclist(); foreach my $link (@links) { $funcs .= &Apache::lonhtmlcommon::add_item_funclist( @@ -2805,7 +2810,7 @@ sub get_queued { if (($status eq 'approval') || ($status eq 'approved')) { $output .= '

    '.&mt('Author role request').'
    '; if ($status eq 'approval') { - $output .= &mt('A request for authoring space submitted on [_1] is awaiting approval', + $output .= &mt('A request for Authoring Space submitted on [_1] is awaiting approval', &Apache::lonlocal::locallocaltime($timestamp)); } elsif ($status eq 'approved') { my %roleshash =