--- loncom/interface/loncommon.pm 2010/01/19 16:20:38 1.692.4.23 +++ loncom/interface/loncommon.pm 2009/04/08 10:13:08 1.785 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.692.4.23 2010/01/19 16:20:38 raeburn Exp $ +# $Id: loncommon.pm,v 1.785 2009/04/08 10:13:08 tempelho Exp $ # # Copyright Michigan State University Board of Trustees # @@ -271,7 +271,7 @@ BEGIN { } } &Apache::lonnet::logthis( - "INFO: Read file types"); + "INFO: Read file types"); $readit=1; } # end of unless($readit) @@ -407,9 +407,8 @@ sub studentbrowser_javascript { ) { return ''; } return (<<'ENDSTDBRW'); ENDSTDBRW } sub selectstudent_link { - my ($form,$unameele,$udomele,$courseadvonly)=@_; - my $callargs = "'".$form."','".$unameele."','".$udomele."'"; + my ($form,$unameele,$udomele)=@_; if ($env{'request.course.id'}) { if (!&Apache::lonnet::allowed('srm',$env{'request.course.id'}) && !&Apache::lonnet::allowed('srm',$env{'request.course.id'}. '/'.$env{'request.course.sec'})) { return ''; } - if ($courseadvonly) { - $callargs .= ",'',1,1"; - } - return ''. - ''. - &mt('Select User').''; + return "".&mt('Select User').""; } if ($env{'request.role'}=~/^(au|dc|su)/) { - $callargs .= ",1"; - return ''. - ''. - &mt('Select User').''; + return "".&mt('Select User').""; } return ''; } sub authorbrowser_javascript { return <<"ENDAUTHORBRW"; - ENDAUTHORBRW } sub coursebrowser_javascript { - my ($domainfilter,$sec_element,$formname,$role_element,$crstype) = @_; - my $wintitle = 'Course_Browser'; - if ($crstype eq 'Community') { - $wintitle = 'Community_Browser'; - } - my $id_functions = &javascript_index_functions(); - my $output = ' + my ($domainfilter,$sec_element,$formname)=@_; + my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Group - for which you wish to add/modify a user role'); + my $output = ' '; - return $output; -} - -sub javascript_index_functions { - return <<"ENDJS"; - -function getFormIdByName(formname) { - for (var i=0;i -1) { - var domid = getIndexByName(formid,udom); - if (domid > -1) { - if (document.forms[formid].elements[domid].type == 'select-one') { - userdom=document.forms[formid].elements[domid].options[document.forms[formid].elements[domid].selectedIndex].value; - } - if (document.forms[formid].elements[domid].type == 'hidden') { - userdom=document.forms[formid].elements[domid].value; + function getFormIdByName(formname) { + for (var i=0;i -1) { - var unameid = getIndexByName(formid,uname); - var domid = getIndexByName(formid,udom); - var hidedomid = getIndexByName(formid,origdom); - if (hidedomid > -1) { - var fixeddom = document.forms[formid].elements[hidedomid].value; - var unameval = document.forms[formid].elements[unameid].value; - if ((fixeddom != '') && (fixeddom != undefined) && (fixeddom != null) && (unameval != '') && (unameval != undefined) && (unameval != null)) { - if (domid > -1) { - var slct = document.forms[formid].elements[domid]; - if (slct.type == 'select-one') { - var i; - for (i=0;i' - ."".$linktext.'' - .''; + my ($form,$unameele,$udomele,$desc,$extra_element,$multflag,$selecttype)=@_; + return "".&mt('Select Course').""; } sub selectauthor_link { @@ -778,14 +612,6 @@ sub selectauthor_link { &mt('Select Author').''; } -sub selectuser_link { - my ($form,$unameelem,$domelem,$lastelem,$firstelem,$emailelem,$hdomelem, - $coursedom,$linktext,$caller) = @_; - return ''.$linktext.''; -} - sub check_uncheck_jscript { my $jscript = <<"ENDSCRT"; function checkAll(field) { @@ -884,21 +710,6 @@ sub select_datelocale { return $output; } -sub select_language { - my ($name,$selected,$includeempty) = @_; - my %langchoices; - if ($includeempty) { - %langchoices = ('' => 'No language preference'); - } - foreach my $id (&languageids()) { - my $code = &supportedlanguagecode($id); - if ($code) { - $langchoices{$code} = &plainlanguagedescription($id); - } - } - return &select_form($selected,$name,%langchoices); -} - =pod =item * &linked_select_forms(...) @@ -986,7 +797,6 @@ sub linked_select_forms { # output the javascript to do the changing my $result = ''; $result.=' END # output the initial values for the selection lists @@ -1114,20 +923,22 @@ sub help_open_topic { } # Add the text - if ($text ne "") { - $template .= - "". - "
$text"; + if ($text ne "") { + $template.='' + .'' + .$text.''; } - # Add the graphic + # (Always) Add the graphic my $title = &mt('Online Help'); my $helpicon=&lonhttpdurl("/adm/help/help.png"); - $template .= ''. - ''.&mt('Help: [_1]',$topic).
-                 ''; - if ($text ne '') { - $template.='
'; + $template.=' ' + .''.&mt('Help: [_1]',$topic).''; + if ($text ne "") { + $template.=''; } return $template; @@ -1140,25 +951,26 @@ sub helpLatexCheatsheet { my $out; my $addOther = ''; if ($topic) { - $addOther = &Apache::loncommon::help_open_topic($topic,$text, - undef, undef, 600) . - ''; - } - $out = ''; + $addOther = ''.&Apache::loncommon::help_open_topic($topic,&mt($text), + undef, undef, 600). + ' '; + } + $out = '' # Start cheatsheet + .$addOther + .'' + .&Apache::loncommon::help_open_topic('Greek_Symbols',&mt('Greek Symbols'), + undef,undef,600) + .' ' + .&Apache::loncommon::help_open_topic('Other_Symbols',&mt('Other Symbols'), + undef,undef,600) + .''; unless ($not_author) { - $out .= ''; + $out .= ' ' + .&Apache::loncommon::help_open_topic('Authoring_Output_Tags',&mt('Output Tags'), + undef,undef,600) + .''; } - $out .= '
'. - $addOther . - &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'), - undef,undef,600). - ''. - &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'), - undef,undef,600). - ''. - &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'), - undef,undef,600). - '
'; + $out .= ''; # End cheatsheet return $out; } @@ -1166,7 +978,7 @@ sub general_help { my $helptopic='Student_Intro'; if ($env{'request.role'}=~/^(ca|au)/) { $helptopic='Authoring_Intro'; - } elsif ($env{'request.role'}=~/^(cc|co)/) { + } elsif ($env{'request.role'}=~/^cc/) { $helptopic='Course_Coordination_Intro'; } elsif ($env{'request.role'}=~/^dc/) { $helptopic='Domain_Coordination_Intro'; @@ -1186,9 +998,7 @@ sub update_help_link { my $banner_link = "/adm/helpmenu?page=banner&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage"; my $output .= <<"ENDOUTPUT"; ENDOUTPUT return $output; @@ -1265,8 +1075,8 @@ sub help_menu_js { my $template .= <<"ENDTEMPLATE"; ENDTEMPLATE return $template; @@ -1329,7 +1139,7 @@ sub help_open_bug { { $template .= "". - "'); - } + $r->print(''); } $r->print(&end_data_table_header_row()); foreach my $hash (@$samples) { $r->print(&start_data_table_row()); @@ -8166,7 +8299,7 @@ sub csv_print_select_table { my ($value,$display,$defaultcol)=@{ $array_ref }; $r->print(&start_data_table_row().''); - $r->print('
$text"; + "$text"; } # Add the graphic @@ -1374,7 +1184,7 @@ sub help_open_faq { { $template .= "". - " ENDROLE - my $titleinfo = ''.$title.''; + my $titleinfo = '

'.$title.'

'; if ($customtitle) { $titleinfo = $customtitle; } @@ -4536,7 +4315,7 @@ ENDROLE .''.&mt('Construction Space').': ' .'' - .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."$lastitem
" + .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv','','+1',1)."$lastitem
" .&Apache::lonhtmlcommon::select_recent('construct','recent','this.form.action=this.form.recent.value;this.form.submit()') .'' .&Apache::lonmenu::constspaceform(); @@ -4710,11 +4489,15 @@ sub standard_css { my $vlink = &designparm($function.'.vlink', $domain); my $link = &designparm($function.'.link', $domain); + my $loginbg = &designparm('login.sidebg',$domain); + my $bgcol = &designparm('login.bgcol',$domain); + my $textcol = &designparm('login.textcol',$domain); + my $sans = 'Verdana,Arial,Helvetica,sans-serif'; my $mono = 'monospace'; my $data_table_head = $tabbg; - my $data_table_light = '#FAFAFA'; - my $data_table_dark = '#F0F0F0'; + my $data_table_light = '#EEEEEE'; + my $data_table_dark = '#DDDDDD'; my $data_table_darker = '#CCCCCC'; my $data_table_highlight = '#FFFF00'; my $mail_new = '#FFBB77'; @@ -4727,40 +4510,58 @@ sub standard_css { my $mail_other_hover = '#669999'; my $table_header = '#DDDDDD'; my $feedback_link_bg = '#BBBBBB'; - my $lg_border_color = '#C8C8C8'; + my $lg_border_color = '#C8C8C8'; my $border = ($env{'browser.type'} eq 'explorer' || - $env{'browser.type'} eq 'safari' ) ? '0 2px 0 2px' - : '0 3px 0 4px'; + $env{'browser.type'} eq 'safari' ) ? '0px 2px 0px 2px' + : '0px 3px 0px 4px'; return < td { background-color: #CCCCCC; font-weight: bold; text-align: left; } -table.LC_data_table tr.LC_odd_row > td, +table.LC_data_table tr.LC_odd_row > td, table.LC_pick_box tr > td.LC_odd_row, table.LC_aboutme_port tr td { background-color: $data_table_light; @@ -5087,7 +4856,7 @@ table.LC_nested tr.LC_empty_row td { table.LC_nested_outer tr th { font-weight: bold; background-color: $data_table_head; - font-size: smaller; + font-size: small; border-bottom: 1px solid #000000; } table.LC_nested_outer tr td.LC_subheader { @@ -5126,7 +4895,7 @@ table.LC_createuser { } table.LC_createuser tr.LC_section_row td { - font-size: smaller; + font-size: small; } table.LC_createuser tr.LC_info_row td { @@ -5152,13 +4921,16 @@ table.LC_calendar tr td.LC_calendar_day_ table.LC_calendar tr td.LC_calendar_day_current { background-color: $data_table_highlight; } - table.LC_mail_list tr.LC_mail_new { background-color: $mail_new; } table.LC_mail_list tr.LC_mail_new:hover { background-color: $mail_new_hover; } +table.LC_mail_list tr.LC_mail_even{ +} +table.LC_mail_list tr.LC_mail_odd{ +} table.LC_mail_list tr.LC_mail_read { background-color: $mail_read; } @@ -5177,72 +4949,23 @@ table.LC_mail_list tr.LC_mail_other { table.LC_mail_list tr.LC_mail_other:hover { background-color: $mail_other_hover; } -table.LC_mail_list tr.LC_mail_even { -} -table.LC_mail_list tr.LC_mail_odd { -} - - -table#LC_portfolio_actions { - width: auto; - background: $pgbg; - border: none; - border-spacing: 2px 2px; - padding: 0; - margin: 0; - border-collapse: separate; -} -table#LC_portfolio_actions td.LC_label { - background: $tabbg; - text-align: right; -} -table#LC_portfolio_actions td.LC_value { - background: $tabbg; -} - -table#LC_cstr_controls { - width: 100%; - border-collapse: collapse; -} -table#LC_cstr_controls tr td { - border: 4px solid $pgbg; - padding: 4px; - text-align: center; - background: $tabbg; -} -table#LC_cstr_controls tr th { - border: 4px solid $pgbg; - background: $table_header; - text-align: center; - font-family: $sans; - font-size: smaller; -} -table#LC_browser { - -} -table#LC_browser tr th { - background: $table_header; -} -table#LC_browser tr td { - padding: 2px; -} -table#LC_browser tr.LC_browser_file, -table#LC_browser tr.LC_browser_file_published { +table.LC_data_table tr > td.LC_browser_file, +table.LC_data_table tr > td.LC_browser_file_published { background: #CCFF88; } -table#LC_browser tr.LC_browser_file_locked, -table#LC_browser tr.LC_browser_file_unpublished { +table.LC_data_table tr > td.LC_browser_file_locked, +table.LC_data_table tr > td.LC_browser_file_unpublished { background: #FFAA99; } -table#LC_browser tr.LC_browser_file_obsolete { +table.LC_data_table tr > td.LC_browser_file_obsolete { background: #AAAAAA; } -table#LC_browser tr.LC_browser_file_modified, -table#LC_browser tr.LC_browser_file_metamodified { +table.LC_data_table tr > td.LC_browser_file_modified, +table.LC_data_table tr > td.LC_browser_file_metamodified { background: #FFFF77; } -table#LC_browser tr.LC_browser_folder { +table.LC_data_table tr.LC_browser_folder > td { background: #CCCCFF; } @@ -5266,7 +4989,7 @@ table.LC_data_table tr > td.LC_roles_sel } span.LC_current_location { - font-size: x-large; + font-size:larger; background: $pgbg; } @@ -5293,7 +5016,7 @@ span.LC_parm_folder, span.LC_parm_symb { } td.LC_parm_overview_level_menu, td.LC_parm_overview_map_menu, -td.LC_parm_overview_parm_selectors, td.LC_parm_overview_parm_restrictions { +td.LC_parm_overview_parm_selectors,td.LC_parm_overview_restrictions { border: 1px solid black; border-collapse: collapse; } @@ -5310,9 +5033,9 @@ table.LC_parm_overview_restrictions th { border-color: $pgbg; } table#LC_helpmenu { - border: none; + border: 0px; height: 55px; - border-spacing: 0; + border-spacing: 0px; } table#LC_helpmenu fieldset legend { @@ -5323,7 +5046,7 @@ table#LC_helpmenu_links { width: 100%; border: 1px solid black; background: $pgbg; - padding: 0; + padding: 0px; border-spacing: 1px; } table#LC_helpmenu_links tr td { @@ -5386,7 +5109,7 @@ table.LC_pick_box td.LC_pick_box_select padding: 8px; } table.LC_pick_box td.LC_pick_box_separator { - padding: 0; + padding: 0px; height: 1px; background: black; } @@ -5428,7 +5151,7 @@ table.LC_helpform_receipt td.LC_oddrow_v background-color: $data_table_light; } table.LC_helpform_receipt td.LC_pick_box_separator { - padding: 0; + padding: 0px; height: 1px; background: black; } @@ -5461,7 +5184,7 @@ table.LC_group_priv_box td.LC_groups_fun } table.LC_group_priv td { text-align: left; - padding: 0; + padding: 0px; } table.LC_notify_front_page { @@ -5482,7 +5205,6 @@ table.LC_notify_front_page td { background: $tabbg; vertical-align: middle; margin: 2ex 0ex 2ex 0ex; - padding: 3px; } .LC_topic_bar span { vertical-align: middle; @@ -5506,7 +5228,7 @@ table.LC_descriptive_input td.LC_descrip div.LC_feedback_link { clear: both; background: white; - width: 100%; + width: 100%; } span.LC_feedback_link { background: $feedback_link_bg; @@ -5537,7 +5259,7 @@ table.LC_prior_tries td { background: #FFAAAA ! important; color: black; } -.LC_answer_not_charged_try, +.LC_answer_not_charged_try, .LC_answer_no_grade, .LC_answer_late { background: #FFFFAA; @@ -5555,8 +5277,6 @@ table.LC_prior_tries td { background: orange; color: black; } - - span.LC_prior_numerical, span.LC_prior_string, span.LC_prior_custom, @@ -5584,6 +5304,7 @@ table.LC_prior_match tr td { border: 1px solid #000000; } +td.LC_nobreak, span.LC_nobreak { white-space: nowrap; } @@ -5599,24 +5320,15 @@ span.LC_cusr_subheading { table.LC_docs_documents { background: #BBBBBB; - border-width: 0; + border-width: 0px; border-collapse: collapse; } - table.LC_docs_documents td.LC_docs_document { border: 2px solid black; padding: 4px; } - -.LC_docs_course_commands div { - float: left; - border: 4px solid #AAAAAA; - padding: 4px; - background: #DDDDCC; -} - .LC_docs_entry_move { - border: none; + border: 0px; border-collapse: collapse; } @@ -5672,7 +5384,7 @@ table.LC_sty_end { } table.LC_double_column { - border-width: 0; + border-width: 0px; border-collapse: collapse; width: 100%; padding: 2px; @@ -5687,7 +5399,7 @@ table.LC_double_column tr td.LC_left_col table.LC_double_column tr td.LC_right_col { top: 2px; - right: 2px; + right: 2px; width: 47%; vertical-align: top; } @@ -5712,23 +5424,6 @@ div.LC_clear_float_footer { } -div.LC_grade_select_mode { - font-family: $sans; -} -div.LC_grade_select_mode div div { - margin: 5px; -} -div.LC_grade_select_mode_selector { - margin: 5px; - float: left; -} -div.LC_grade_select_mode_selector_header { - font: bold medium $sans; -} -div.LC_grade_select_mode_type { - clear: left; -} - div.LC_grade_show_user { margin-top: 20px; border: 1px solid black; @@ -5736,7 +5431,8 @@ div.LC_grade_show_user { div.LC_grade_user_name { background: #DDDDEE; border-bottom: 1px solid black; - font: bold large $sans; + font-weight: bold; + font-size: large; } div.LC_grade_show_user_odd_row div.LC_grade_user_name { background: #DDEEDD; @@ -5755,7 +5451,8 @@ div.LC_grade_show_problem_header, div.LC_grade_submissions_header, div.LC_grade_message_center_header, div.LC_grade_assign_header { - font: bold large $sans; + font-weight: bold; + font-size: large; } div.LC_grade_show_problem_problem, div.LC_grade_submissions_body, @@ -5766,7 +5463,8 @@ div.LC_grade_assign_body { background: #FFFFFF; } span.LC_grade_check_note { - font: normal medium $sans; + font-weight: normal; + font-size: medium; display: inline; position: absolute; right: 1em; @@ -5776,12 +5474,13 @@ table.LC_scantron_action { width: 100%; } table.LC_scantron_action tr th { - font: normal bold $sans; + font-weight:bold; + font-style:normal; } - -div.LC_edit_problem_header, +.LC_edit_problem_header, div.LC_edit_problem_footer { - font: normal medium $sans; + font-weight: normal; + font-size: medium; margin: 2px; } div.LC_edit_problem_header, @@ -5798,12 +5497,14 @@ div.LC_edit_problem_header_edit_row { margin-bottom: 5px; } div.LC_edit_problem_header_title { - font: larger bold $sans; + font-weight: bold; + font-size: larger; background: $tabbg; padding: 3px; } table.LC_edit_problem_header_title { - font: larger bold $sans; + font-size: larger; + font-weight: bold; width: 100%; border-color: $pgbg; border-style: solid; @@ -5811,7 +5512,7 @@ table.LC_edit_problem_header_title { background: $tabbg; border-collapse: collapse; - padding: 0; + padding: 0px } div.LC_edit_problem_discards { @@ -5827,7 +5528,7 @@ hr.LC_edit_problem_divide { color: $tabbg; background-color: $tabbg; height: 3px; - border: none; + border: 0px; } img.stift{ border-width:0; @@ -5851,15 +5552,478 @@ table#LC_mainmenu td.LC_mainmenu_col_fie font-size: small; font-weight: bold; } -fieldset#LC_mainmenu_fieldset { - margin:0 10px 10px 0; +div.LC_createcourse { + margin: 10px 10px 10px 10px; +} +/* ---- Remove when done ---- +# The following styles is part of the redesign of LON-CAPA and are +# subject to change during this project. +# Don't rely on their current functionality as they might be +# changed or removed. +# --------------------------*/ + +a:hover, +ol.LC_smallMenu a:hover, +ol#LC_MenuBreadcrumbs a:hover, +ol#LC_PathBreadcrumbs a:hover, +ul#LC_TabMainMenuContent a:hover, +.LC_FormSectionClearButton input:hover +ul.LC_TabContent li:hover a{ + color:#BF2317; + text-decoration:none; +} + +h1 { + padding:5px 10px 5px 20px; + line-height:130%; } -div.LC_createcourse { - margin: 10px 10px 10px 10px; +h2,h3,h4,h5,h6 +{ + margin:5px 0px 5px 0px; + padding:0px; + line-height:130%; +} +.LC_hcell{ + padding:3px 15px 3px 15px; + margin:0px; + background-color:$tabbg; + border-bottom:solid 1px $lg_border_color; +} +.LC_noBorder { + border:0px; } + +/* Main Header with discription of Person, Course, etc. */ + +.LC_Right { + float: right; + margin: 0px; + padding: 0px; +} + +p, .LC_ContentBox { + padding: 10px; + +} +.LC_FormSectionClearButton input { + background-color:transparent; + border:0px; + cursor:pointer; + text-decoration:underline; +} + +.LC_help_open_topic { + color: #FFFFFF; + background-color: #EEEEFF; + margin: 1px; + padding: 4px; + border: 1px solid #000033; + white-space: nowrap; +/* vertical-align: middle; */ +} + +dl,ul,div,fieldset { + margin: 10px 10px 10px 0px; + overflow:hidden; +} +ol.LC_smallMenu, ol#LC_PathBreadcrumbs { + margin: 0px; +} + +ol.LC_smallMenu li { + display: inline; + padding: 5px 5px 0px 10px; + vertical-align: top; +} + +ol.LC_smallMenu li img { + vertical-align: bottom; +} + +ol.LC_smallMenu a { + font-size: 90%; + color: RGB(80, 80, 80); + text-decoration: none; +} +ol#LC_TabMainMenuContent, ul.LC_TabContent , +ul.LC_TabContentBigger { + display:block; + list-style:none; + margin: 0px; + padding: 0px; +} + +ol#LC_TabMainMenuContent li, ul.LC_TabContent li, +ul.LC_TabContentBigger li{ + display: inline; + border-right: solid 1px $lg_border_color; + float:left; + line-height:140%; + white-space:nowrap; +} +ol#LC_TabMainMenuContent li{ + vertical-align: bottom; + border-bottom: solid 1px RGB(175, 175, 175); + padding: 5px 10px 5px 10px; + margin-right:5px; + margin-bottom:3px; + font-weight: bold; + background: url(/adm/lonIcons/lightGreyBG.png) repeat-x left top; +} + +ol#LC_TabMainMenuContent li a{ + color: RGB(47, 47, 47); + text-decoration: none; +} +ul.LC_TabContent { + min-height:1.6em; +} +ul.LC_TabContent li{ + vertical-align:middle; + padding:0px 10px 0px 10px; + background-color:$tabbg; + border-bottom:solid 1px $lg_border_color; +} +ul.LC_TabContent li a, ul.LC_TabContent li{ + color:rgb(47,47,47); + text-decoration:none; + font-size:95%; + font-weight:bold; + padding-right: 16px; +} +ul.LC_TabContent li:hover, ul.LC_TabContent li.active{ + background:#FFFFFF url(/adm/lonIcons/open.gif) no-repeat scroll right center; + border-bottom:solid 1px #FFFFFF; + padding-right: 16px; +} +ul.LC_TabContentBigger li{ + vertical-align:bottom; + border-top:solid 1px $lg_border_color; + border-left:solid 1px $lg_border_color; + padding:5px 10px 5px 10px; + margin-left:2px; + background:url(/adm/lonIcons/lightGreyBG.png) repeat-x left top; +} +ul.LC_TabContentBigger li:hover, ul.LC_TabContentBigger li.active{ + background:url(/adm/lonIcons/lightGreyBG.png) repeat-x right bottom; +} +ul.LC_TabContentBigger li, ul.LC_TabContentBigger li a{ + font-size:110%; + font-weight:bold; +} + +ol#LC_MenuBreadcrumbs, ol#LC_PathBreadcrumbs, ul.LC_CourseBreadcrumbs{ + border-top: solid 1px RGB(255, 255, 255); + height: 20px; + line-height: 20px; + vertical-align: bottom; + margin: 0px 0px 30px 0px; + padding-left: 10px; + list-style-position: inside; + background: url(/adm/lonIcons/lightGreyBG.png) repeat-x left top; +} + +ol#LC_MenuBreadcrumbs li, ol#LC_PathBreadcrumbs li, ul.LC_CourseBreadcrumbs li { +/* + background: url(/adm/lonIcons/arrow_white.png) no-repeat left center; +*/ + display: inline; + padding: 0px 0px 0px 10px; +/* vertical-align: bottom; */ + overflow:hidden; +} + +ol#LC_MenuBreadcrumbs li a, ul.LC_CourseBreadcrumbs li a { + text-decoration: none; + font-size:90%; +} +ol#LC_PathBreadcrumbs li a{ + text-decoration:none; + font-size:100%; + font-weight:bold; +} +.LC_ContentBoxSpecial +{ + border: solid 1px $lg_border_color; +} +.LC_ContentBoxSpecialContactInfo +{ + border: solid 1px $lg_border_color; + max-width:25%; + min-width:25%; +} +.LC_AboutMe_Image +{ + float:left; + margin-right:10px; +} +.LC_Clear_AboutMe_Image +{ + clear:left; +} +dl.LC_ListStyleClean dt { + padding-right: 5px; + display: table-header-group; +} + +dl.LC_ListStyleClean dd { + display: table-row; +} + +.LC_ListStyleClean, +.LC_ListStyleSimple, +.LC_ListStyleNormal, +.LC_ListStyle_Border, +.LC_ListStyleSpecial + { + /*display:block; */ + list-style-position: inside; + list-style-type: none; + overflow: hidden; + padding: 0px; +} + +.LC_ListStyleSimple li, +.LC_ListStyleSimple dd, +.LC_ListStyleNormal li, +.LC_ListStyleNormal dd, +.LC_ListStyleSpecial li, +.LC_ListStyleSpecial dd + { + margin: 0px; + padding: 5px 5px 5px 10px; + clear: both; +} + +.LC_ListStyleClean li, +.LC_ListStyleClean dd { + padding-top: 0px; + padding-bottom: 0px; +} + +.LC_ListStyleSimple dd, +.LC_ListStyleSimple li{ + border-bottom: solid 1px $lg_border_color; +} + +.LC_ListStyleSpecial li, +.LC_ListStyleSpecial dd { + list-style-type: none; + background-color: RGB(220, 220, 220); + margin-bottom: 4px; +} + +table.LC_SimpleTable { + margin:5px; + border:solid 1px $lg_border_color; + } + +table.LC_SimpleTable tr { + padding:0px; + border:solid 1px $lg_border_color; +} +table.LC_SimpleTable thead{ + background:rgb(220,220,220); +} + +div.LC_columnSection { + display: block; + clear: both; + overflow: hidden; + margin:0px; +} + +div.LC_columnSection>* { + float: left; + margin: 10px 20px 10px 0px; + overflow:hidden; +} + +.ContentBoxSpecialTemplate +{ + border: solid 1px $lg_border_color; +} +.ContentBoxTemplate { + padding:10px; +} + +div.LC_columnSection > .ContentBoxTemplate, +div.LC_columnSection > .ContentBoxSpecialTemplate + { + width: 600px; +} + +.clear{ + clear: both; + line-height: 0px; + font-size: 0px; + height: 0px; +} + +.LC_loginpage_container { + text-align:left; + margin : 0 auto; + width:90%; + padding: 10px; + height: auto; + background-color:#FFFFFF; + border:1px solid #CCCCCC; +} + + +.LC_loginpage_loginContainer { + float:left; + width: 182px; + padding: 2px; + border:1px solid #CCCCCC; + background-color:$loginbg; +} + +.LC_loginpage_loginContainer h2{ + margin-top:0; + display:block; + background:$bgcol; + color:$textcol; + padding-left:5px; +} + +.LC_loginpage_loginInfo { + float:left; + width:182px; + border:1px solid #CCCCCC; + padding:2px; +} + +.LC_loginpage_space { + clear: both; + margin-bottom: 20px; + border-bottom: 1px solid #CCCCCC; +} + +.LC_loginpage_floatLeft { + float: left; + width: 200px; + margin: 0; +} + +table em{ + font-weight: bold; + font-style: normal; +} +table.LC_tableBrowseRes, +table.LC_tableOfContent{ + border:none; + border-spacing: 1; + padding: 3px; + background-color: #FFFFFF; + font-size: 90%; +} +table.LC_tableBrowseRes a, +table.LC_tableOfContent a { + background-color: transparent; + text-decoration: none; +} + +table.LC_tableBrowseRes tr.LC_trOdd, +table.LC_tableOfContent tr.LC_trOdd{ + background-color: #EEEEEE; +} + +table.LC_tableOfContent img{ + border: none; + height: 1.3em; + vertical-align: text-bottom; + margin-right: 0.3em; +} + +a#LC_content_toolbar_firsthomework{ + background-image:url(/res/adm/pages/open-first-problem.gif); +} + +a#LC_content_toolbar_launchnav{ + background-image:url(/res/adm/pages/start-navigation.gif); +} + +a#LC_content_toolbar_closenav{ + background-image:url(/res/adm/pages/close-navigation.gif); +} + +a#LC_content_toolbar_everything{ + background-image:url(/res/adm/pages/show-all.gif); +} + +a#LC_content_toolbar_uncompleted{ + background-image:url(/res/adm/pages/show-incomplete-problems.gif); +} + +#LC_content_toolbar_clearbubbles{ + background-image:url(/res/adm/pages/mark-discussionentries-read.gif); +} + +a#LC_content_toolbar_changefolder{ + background : url(/res/adm/pages/close-all-folders.gif) top center ; +} + +a#LC_content_toolbar_changefolder_toggled{ + background-image:url(/res/adm/pages/open-all-folders.gif); +} + +ul#LC_toolbar li a:hover{ + background-position: bottom center; +} + +ul#LC_toolbar{ + padding:0; + margin: 2px; + list-style:none; + position:relative; + background-color:white; +} + +ul#LC_toolbar li{ + border:1px solid white; + padding:0; + margin: 0; + float: left; + display:inline; + vertical-align:middle; +} + +/* + This style is used for standard function lists, e.g. functions of Personal Information Page. + It produces a horizontally aligned list with a bullet at the beginning of each function item. + */ +.LC_fieldset_functions li { + float: right; + height: 35px; + background-color: blue; + white-space: nowrap; + margin-left: 10px; +} + +a.LC_toolbarItem{ + display:block; + padding:0; + margin:0; + height: 32px; + width: 32px; + color:white; + border:0 none; + background-repeat:no-repeat; + background-color:transparent; +} + +ul.LC_functionslist li { + float: left; + white-space: nowrap; + height: 35px; /* at least as high as heighest list item */ + margin: 0px 15px 15px 10px; +} + + END } @@ -5987,8 +6151,7 @@ sub xml_begin { .''; } else { - $output=''. - ''; + $output=''; } return $output; } @@ -6124,31 +6287,33 @@ sub start_page { } if ($args->{'js_ready'}) { - $result = &js_ready($result); + $result = &js_ready($result); } if ($args->{'html_encode'}) { - $result = &html_encode($result); + $result = &html_encode($result); } - #Breadcrumbs + + #Breadcrumbs if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) { - &Apache::lonhtmlcommon::clear_breadcrumbs(); - #if any br links exists, add them to the breadcrumbs - if (exists($args->{'bread_crumbs'}) and ref($args->{'bread_crumbs'}) eq 'ARRAY') { - foreach my $crumb (@{$args->{'bread_crumbs'}}){ - &Apache::lonhtmlcommon::add_breadcrumb($crumb); - } - } + &Apache::lonhtmlcommon::clear_breadcrumbs(); + #if any br links exists, add them to the breadcrumbs + if (exists($args->{'bread_crumbs'}) and ref($args->{'bread_crumbs'}) eq 'ARRAY') { + foreach my $crumb (@{$args->{'bread_crumbs'}}){ + &Apache::lonhtmlcommon::add_breadcrumb($crumb); + } + } - #if bread_crumbs_component exists show it as headline else show only the breadcrumbs - if (exists($args->{'bread_crumbs_component'})){ - $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'}); - } else { - $result .= &Apache::lonhtmlcommon::breadcrumbs(); - } + #if bread_crumbs_component exists show it as headline else show only the breadcrumbs + if(exists($args->{'bread_crumbs_component'})){ + $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'}); + }else{ + $result .= &Apache::lonhtmlcommon::breadcrumbs(); + } } return $result; } + =pod =item * &head() @@ -6291,7 +6456,7 @@ sub simple_error_page { } sub start_data_table_empty_row { - $row_count[0]++; +# $row_count[0]++; return ''."\n";; } @@ -6373,13 +6538,13 @@ Returns either 'student','coordinator',' ############################################### sub get_users_function { my $function = 'student'; - if ($env{'request.role'}=~/^(cc|co|in|ta|ep)/ + if ($env{'request.role'}=~/^(cc|in|ta|ep)/) { $function='coordinator'; } if ($env{'request.role'}=~/^(su|dc|ad|li)/) { $function='admin'; } - if (($env{'request.role'}=~/^(au|ca|aa)/) || + if (($env{'request.role'}=~/^(au|ca)/) || ($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) { $function='author'; } @@ -6390,37 +6555,6 @@ sub get_users_function { =pod -=item * &show_course() - -Used by lonmenu.pm and lonroles.pm to determine whether to use the word -'Courses' or 'Roles' in inline navigation and on screen displaying user's roles. -Inputs: -None - -Outputs: -Scalar: 1 if 'Course' to be used, 0 otherwise. - -=cut - -############################################### -sub show_course { - my $course = !$env{'user.adv'}; - if (!$env{'user.adv'}) { - foreach my $env (keys(%env)) { - next if ($env !~ m/^user\.priv\./); - if ($env !~ m/^user\.priv\.(?:st|cm)/) { - $course = 0; - last; - } - } - } - return $course; -} - -############################################### - -=pod - =item * &check_user_status() Determines current status of supplied role for a @@ -6443,7 +6577,7 @@ sub check_user_status { my $active_chk = 'none'; my $now = time; if (@uroles > 0) { - if (($role eq 'cc') || ($role eq 'co') || ($sec eq '') || (!defined($sec))) { + if (($role eq 'cc') || ($sec eq '') || (!defined($sec))) { $srchstr = '/'.$cdom.'/'.$crs.'_'.$role; } else { $srchstr = '/'.$cdom.'/'.$crs.'/'.$sec.'_'.$role; @@ -7074,7 +7208,6 @@ sub user_picker { # loncreateuser::print_user_query_page() # has been completed. next if ($option eq 'alc'); - next if (($option eq 'crs') && ($env{'form.form'} eq 'requestcrs')); next if ($option eq 'crs' && !$env{'request.course.id'}); if ($curr_selected{'srchin'} eq $option) { $srchinsel .= ' @@ -7118,14 +7251,12 @@ sub user_picker { if ($cancreate) { $new_user_create = '

&"').'" onclick="javascript:setSearch(\'1\','.$caller.');" />

'; } else { - my $helplink = 'javascript:helpMenu('."'display'".')'; + my $helplink = ' href="javascript:helpMenu('."'display'".')"'; my %usertypetext = ( official => 'institutional', unofficial => 'non-institutional', ); - $new_user_create = '

'. - &mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.").' '. - &mt('Please contact the [_1]helpdesk[_2] for assistance.','','').'


'; + $new_user_create = '
'.&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.").' '.&mt('Contact the helpdesk for assistance.',$helplink).'

'; } } } @@ -7162,7 +7293,6 @@ ENDSCRIPT my $output = <<"END_BLOCK"; $new_user_create +
$text"; + "$text"; } # Add the graphic @@ -1560,7 +1370,6 @@ sub resize_textarea_js { my $geometry = &viewport_geometry_js(); return <<"RESIZE"; RESIZE @@ -1943,7 +1751,7 @@ sub select_level_form { =pod -=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange,$incdoms) +=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$autosubmit) Returns a string containing a \n"; foreach my $dom (@domains) { @@ -2029,7 +1831,7 @@ sub home_server_form_item { if ($numlib > 1) { $result .= '".&mt('Visible input').''; + $result.="'; return $result; } @@ -2987,25 +2789,6 @@ sub screenname { return $names{'screenname'}; } -# ------------------------------------------------------------- Confirm Wrapper -=pod - -=item confirmwrapper - -Wrap messages about completion of operation in box - -=cut - -sub confirmwrapper { - my ($message)=@_; - if ($message) { - return "\n".'
'."\n" - .$message."\n" - .'
'."\n"; - } else { - return $message; - } -} # ------------------------------------------------------------- Message Wrapper @@ -3039,15 +2822,12 @@ sub aboutmewrapper { sub syllabuswrapper { - my ($linktext,$coursedir,$domain,$fontcolor)=@_; - if ($fontcolor) { - $linktext=''.$linktext.''; - } + my ($linktext,$coursedir,$domain)=@_; return qq{$linktext}; } sub track_student_link { - my ($linktext,$sname,$sdom,$target,$start,$only_body) = @_; + my ($linktext,$sname,$sdom,$target,$start) = @_; my $link ="/adm/trackstudent?"; my $title = 'View recent activity'; if (defined($sname) && $sname !~ /^\s*$/ && @@ -3061,7 +2841,6 @@ sub track_student_link { $target = ''; } if ($start) { $link.='&start='.$start; } - if ($only_body) { $link .= '&only_body=1'; } $title = &mt($title); $linktext = &mt($linktext); return qq{$linktext}. @@ -3348,6 +3127,7 @@ sub user_lang { return $user_lh; } + ############################################################### ## Student Answer Attempts ## ############################################################### @@ -3737,7 +3517,6 @@ sub findallcourses { if (!%roles) { %roles = ( cc => 1, - co => 1, in => 1, ep => 1, ta => 1, @@ -4064,7 +3843,7 @@ sub blocking_status { &Apache::lonnet::coursedescription($course); $coursedesc = $courseinfo{'description'}; } - $category = "Group portfolio files in the course '$coursedesc'"; + $category = "Group portfolio in the course '$coursedesc'"; } else { $category = 'Portfolio files belonging to '; if ($env{'user.name'} eq 'public' && @@ -4167,7 +3946,7 @@ sub determinedomain { my $domain=shift; if (! $domain) { # Determine domain if we have not been given one - $domain = &Apache::lonnet::default_login_domain(); + $domain = $Apache::lonnet::perlvar{'lonDefDomain'}; if ($env{'user.domain'}) { $domain=$env{'user.domain'}; } if ($env{'request.role.domain'}) { $domain=$env{'request.role.domain'}; @@ -4198,7 +3977,7 @@ sub get_domainconf { foreach my $key (keys(%{$domconfig{'login'}})) { if (ref($domconfig{'login'}{$key}) eq 'HASH') { foreach my $img (keys(%{$domconfig{'login'}{$key}})) { - $designhash{$udom.'.login.'.$key.'_'.$img} = + $designhash{$udom.'.login.'.$key.'_'.$img} = $domconfig{'login'}{$key}{$img}; } } else { @@ -4425,7 +4204,7 @@ sub bodytag { my $font = &designparm($function.'.font',$domain); my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain); - my %design = ( 'style' => 'margin-top: 0', + my %design = ( 'style' => 'margin-top: 0px', 'bgcolor' => $pgbg, 'text' => $font, 'alink' => &designparm($function.'.alink',$domain), @@ -4493,7 +4272,7 @@ $realm 
+ + + + + + + + + +
$lt{'doma'}:$domform
$lt{'usr'}:$srchbysel + $srchtypesel + + $srchinsel +
+
END_BLOCK - $output .= &Apache::lonhtmlcommon::start_pick_box(). - &Apache::lonhtmlcommon::row_title($lt{'doma'}). - $domform. - &Apache::lonhtmlcommon::row_closure(). - &Apache::lonhtmlcommon::row_title($lt{'usr'}). - $srchbysel. - $srchtypesel. - ''. - $srchinsel. - &Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::end_pick_box(). - '
'; return $output; } @@ -7481,7 +7614,7 @@ sub get_institutional_codes { =item * sorted_slots() -Sorts an array of slot names in order of slot start time (earliest first). +Sorts an array of slot names in order of slot start time (earliest first). Inputs: @@ -7523,6 +7656,7 @@ sub sorted_slots { return @sorted; } + =pod =head1 HTTP Helpers @@ -7814,9 +7948,9 @@ sub upload_embedded { ' '. $orig_uploaded_filename.'
'; } else { - $output .= ''. + $output .= ''. &mt('View embedded file: [_1]',''. - $orig_uploaded_filename.'').'
'; + $orig_uploaded_filename.'').'
'; } } close($fh); @@ -8121,8 +8255,7 @@ sub csv_print_samples { $r->print(&mt('Samples').'
'.&start_data_table(). &start_data_table_header_row()); foreach my $sample (sort({$a <=> $b} keys(%{ $samples->[0] }))) { - $r->print('
'.&mt('Column [_1]',($sample+1)).''.&mt('Column [_1]',($sample+1)).''.$display.'
'. @@ -9199,7 +9331,7 @@ sub assign_category_rows { if (ref($currcategories) eq 'ARRAY') { if (@{$currcategories} > 0) { if (grep(/^\Q$item\E$/,@{$currcategories})) { - $checked = ' checked="checked" '; + $checked = ' checked="checked"'; } } } @@ -9392,62 +9524,40 @@ sub check_clone { my $clonehome=&Apache::lonnet::homeserver($clonecrsunum,$clonecrsudom); my $clonemsg; my $can_clone = 0; - my $lctype = lc($args->{'type'}); - if ($lctype ne 'community') { - $lctype = 'course'; - } + if ($clonehome eq 'no_host') { - if ($args->{'type'} eq 'Community') { - $clonemsg = &mt('No new community created.').$linefeed.&mt('A new community could not be cloned from the specified original - [_1] - because it is a non-existent community.',$args->{'clonecourse'}.':'.$args->{'clonedomain'}); - } else { - $clonemsg = &mt('No new course created.').$linefeed.&mt('A new course could not be cloned from the specified original - [_1] - because it is a non-existent course.',$args->{'clonecourse'}.':'.$args->{'clonedomain'}); - } + $clonemsg = &mt('No new course created.').$linefeed.&mt('A new course could not be cloned from the specified original - [_1] - because it is a non-existent course.',$args->{'clonecourse'}.':'.$args->{'clonedomain'}); } else { my %clonedesc = &Apache::lonnet::coursedescription($cloneid,{'one_time' => 1}); - if ($args->{'type'} eq 'Community') { - if ($clonedesc{'type'} ne 'Community') { - $clonemsg = &mt('No new community created.').$linefeed.&mt('A new community could not be cloned from the specified original - [_1] - because it is a course not a community.',$args->{'clonecourse'}.':'.$args->{'clonedomain'}); - return ($can_clone, $clonemsg, $cloneid, $clonehome); - } - } - if (($env{'request.role.domain'} eq $args->{'clonedomain'}) && - (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'}))) { - $can_clone = 1; - } else { - my %clonehash = &Apache::lonnet::get('environment',['cloners'], - $args->{'clonedomain'},$args->{'clonecourse'}); - my @cloners = split(/,/,$clonehash{'cloners'}); + if ($env{'request.role.domain'} eq $args->{'clonedomain'}) { + $can_clone = 1; + } else { + my %clonehash = &Apache::lonnet::get('environment',['cloners'], + $args->{'clonedomain'},$args->{'clonecourse'}); + my @cloners = split(/,/,$clonehash{'cloners'}); if (grep(/^\*$/,@cloners)) { $can_clone = 1; } elsif (grep(/^\*\:\Q$args->{'ccdomain'}\E$/,@cloners)) { $can_clone = 1; } else { - my $ccrole = 'cc'; - if ($args->{'type'} eq 'Community') { - $ccrole = 'co'; - } - my %roleshash = - &Apache::lonnet::get_my_roles($args->{'ccuname'}, - $args->{'ccdomain'}, - 'userroles',['active'],[$ccrole], - [$args->{'clonedomain'}]); - if (($roleshash{$args->{'clonecourse'}.':'.$args->{'clonedomain'}.':'.$ccrole}) || (grep(/^\Q$args->{'ccuname'}\E:\Q$args->{'ccdomain'}\E$/,@cloners))) { - $can_clone = 1; - } else { - if ($args->{'type'} eq 'Community') { - $clonemsg = &mt('No new community created.').$linefeed.&mt('The new community could not be cloned from the existing community because the new community owner ([_1]) does not have cloning rights in the existing community ([_2]).',$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'}); - } else { - $clonemsg = &mt('No new course created.').$linefeed.&mt('The new course could not be cloned from the existing course because the new course owner ([_1]) does not have cloning rights in the existing course ([_2]).',$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'}); - } - } - } + my %roleshash = + &Apache::lonnet::get_my_roles($args->{'ccuname'}, + $args->{'ccdomain'}, + 'userroles',['active'],['cc'], + [$args->{'clonedomain'}]); + if (($roleshash{$args->{'clonecourse'}.':'.$args->{'clonedomain'}.':cc'}) || (grep(/^\Q$args->{'ccuname'}\E:\Q$args->{'ccdomain'}\E$/,@cloners))) { + $can_clone = 1; + } else { + $clonemsg = &mt('No new course created.').$linefeed.&mt('The new course could not be cloned from the existing course because the new course owner ([_1]) does not have cloning rights in the existing course ([_2]).',$args->{'ccuname'}.':'.$args->{'ccdomain'},$clonedesc{'description'}); + } + } } } return ($can_clone, $clonemsg, $cloneid, $clonehome); } sub construct_course { - my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context,$cnum,$category) = @_; + my ($args,$logmsg,$courseid,$crsudom,$crsunum,$udom,$uname,$context) = @_; my $outcome; my $linefeed = '
'."\n"; if ($context eq 'auto') { @@ -9485,9 +9595,7 @@ sub construct_course { $args->{'crscode'}, $args->{'ccuname'}.':'. $args->{'ccdomain'}, - $args->{'crstype'}, - $cnum,$context,$category); - + $args->{'crstype'}); # Note: The testing routines depend on this being output; see # Utils::Course. This needs to at least be output as a comment @@ -9795,22 +9903,12 @@ sub course_type { sub group_term { my $crstype = &course_type(); my %names = ( - 'Course' => 'group', - 'Community' => 'group', + 'Course' => 'group', + 'Group' => 'team', ); return $names{$crstype}; } -sub course_types { - my @types = ('official','unofficial','community'); - my %typename = ( - official => 'Official course', - unofficial => 'Unofficial course', - community => 'Community', - ); - return (\@types,\%typename); -} - sub icon { my ($file)=@_; my $curfext = lc((split(/\./,$file))[-1]); @@ -9870,22 +9968,6 @@ sub escape_url { return join('/',@urlslices).'/'.$lastitem; } -sub compare_arrays { - my ($arrayref1,$arrayref2) = @_; - my (@difference,%count); - @difference = (); - %count = (); - if ((ref($arrayref1) eq 'ARRAY') && (ref($arrayref2) eq 'ARRAY')) { - foreach my $element (@{$arrayref1}, @{$arrayref2}) { $count{$element}++; } - foreach my $element (keys(%count)) { - if ($count{$element} == 1) { - push(@difference,$element); - } - } - } - return @difference; -} - # -------------------------------------------------------- Initliaze user login sub init_user_environment { my ($r, $username, $domain, $authhost, $form, $args) = @_; @@ -10017,11 +10099,11 @@ sub init_user_environment { } foreach my $tool ('aboutme','blog','portfolio') { - $userenv{'availabletools.'.$tool} = + $userenv{'availabletools.'.$tool} = &Apache::lonnet::usertools_access($username,$domain,$tool,'reload'); } - foreach my $crstype ('official','unofficial','community') { + foreach my $crstype ('official','unofficial') { $userenv{'canrequest.'.$crstype} = &Apache::lonnet::usertools_access($username,$domain,$crstype, 'reload','requestcourses'); @@ -10039,8 +10121,8 @@ sub init_user_environment { } untie(%disk_env); } else { - &Apache::lonnet::logthis("WARNING: ". - 'Could not create environment storage in lonauth: '.$!.''); + &Apache::lonnet::logthis("WARNING: ". + 'Could not create environment storage in lonauth: '.$!.''); return 'error: '.$!; } }