--- loncom/interface/loncommon.pm 2009/08/14 08:25:33 1.692.4.10 +++ loncom/interface/loncommon.pm 2009/02/10 12:20:17 1.744 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.692.4.10 2009/08/14 08:25:33 raeburn Exp $ +# $Id: loncommon.pm,v 1.744 2009/02/10 12:20:17 ehlerst 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) @@ -406,10 +406,9 @@ sub studentbrowser_javascript { || ($env{'request.role'}=~/^(au|dc|su)/) ) { 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 ''; } @@ -463,7 +453,6 @@ sub selectstudent_link { sub authorbrowser_javascript { return <<"ENDAUTHORBRW"; ENDAUTHORBRW } sub coursebrowser_javascript { my ($domainfilter,$sec_element,$formname)=@_; - my $crs_or_grp_alert = &mt('Please select the type of LON-CAPA entity - Course or Community - for which you wish to add/modify a user role'); - my $id_functions = &javascript_index_functions(); - 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 domid = getIndexByName(formid,udom); - var hidedomid = getIndexByName(formid,origdom); - if (hidedomid > -1) { - var fixeddom = document.forms[formid].elements[hidedomid].value; - if (domid > -1) { - var slct = document.forms[formid].elements[domid]; - if (slct.type == 'select-one') { - var i; - for (i=0;i' - ."".$linktext.'' - .''; + return "".&mt('Select Course').""; } sub selectauthor_link { @@ -709,14 +612,6 @@ sub selectauthor_link { &mt('Select Author').''; } -sub selectuser_link { - my ($form,$unameelem,$domelem,$lastelem,$firstelem,$emailelem,$hdomelem, - $coursedom,$linktext) = @_; - return ''.$linktext.''; -} - sub check_uncheck_jscript { my $jscript = <<"ENDSCRT"; function checkAll(field) { @@ -815,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(...) @@ -916,8 +796,7 @@ sub linked_select_forms { my $first = "document.$formname.$firstselectname"; # output the javascript to do the changing my $result = ''; - $result.=' END # output the initial values for the selection lists @@ -1048,18 +926,16 @@ sub help_open_topic { if ($text ne "") { $template .= "". - "
$text"; + "$text"; } # 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 .= <<"ENDTEMPLATE"; + (Help: $topic) +ENDTEMPLATE + if ($text ne '') { $template.='' }; return $template; } @@ -1072,22 +948,22 @@ sub helpLatexCheatsheet { my $addOther = ''; if ($topic) { $addOther = &Apache::loncommon::help_open_topic($topic,$text, - undef, undef, 600) . + undef, undef, 600). ''; } $out = ''; + $addOther . + &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'), + undef,undef,600). + ''; unless ($not_author) { $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("Other_Symbols",&mt('Other Symbols'), + undef,undef,600). + ''. - &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'), - undef,undef,600). - '
'; return $out; @@ -1117,9 +993,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; @@ -1196,8 +1070,8 @@ sub help_menu_js { my $template .= <<"ENDTEMPLATE"; ENDTEMPLATE return $template; @@ -1260,7 +1134,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()); @@ -8049,7 +8094,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 @@ -1305,7 +1179,7 @@ sub help_open_faq { { $template .= "". - "'."\n";; } @@ -6263,7 +6391,7 @@ sub get_users_function { 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'; } @@ -6274,37 +6402,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 @@ -6820,7 +6917,7 @@ sub default_quota { ['quotas'],$udom); if (ref($quotahash{'quotas'}) eq 'HASH') { if ($inststatus ne '') { - my @statuses = map { &unescape($_); } split(/:/,$inststatus); + my @statuses = split(/:/,$inststatus); foreach my $item (@statuses) { if (ref($quotahash{'quotas'}{'defaultquota'}) eq 'HASH') { if ($quotahash{'quotas'}{'defaultquota'}{$item} ne '') { @@ -6999,14 +7096,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).'

'; } } } @@ -7043,7 +7138,6 @@ ENDSCRIPT my $output = <<"END_BLOCK"; $new_user_create +
$text"; + "$text"; } # Add the graphic @@ -1491,7 +1365,6 @@ sub resize_textarea_js { my $geometry = &viewport_geometry_js(); return <<"RESIZE"; RESIZE @@ -1874,7 +1746,7 @@ sub select_level_form { =pod -=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$onchange) +=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$autosubmit) Returns a string containing a '."\n"; if ($default) { - $result .= ''."\n"; } foreach my $hostid (sort(keys(%servers))) { @@ -2248,14 +2121,14 @@ sub authform_kerberos { $autharg,$jscall); my ($authnum,%can_assign) = &get_assignable_auth($in{'domain'}); if ($in{'kerb_def_auth'} eq 'krb5') { - $check5 = ' checked="checked"'; + $check5 = ' checked="on"'; } else { - $check4 = ' checked="checked"'; + $check4 = ' checked="on"'; } $krbarg = $in{'kerb_def_dom'}; if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'krb') { - $krbcheck = ' checked="checked"'; + $krbcheck = ' checked="on"'; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $krbcheck = ''; @@ -2263,10 +2136,10 @@ sub authform_kerberos { } if (defined($in{'curr_kerb_ver'})) { if ($in{'curr_krb_ver'} eq '5') { - $check5 = ' checked="checked"'; + $check5 = ' checked="on"'; $check4 = ''; } else { - $check4 = ' checked="checked"'; + $check4 = ' checked="on"'; $check5 = ''; } } @@ -2287,7 +2160,7 @@ sub authform_kerberos { } } else { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } if (!$can_assign{'krb4'} && !$can_assign{'krb5'}) { @@ -2296,7 +2169,7 @@ sub authform_kerberos { if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } } @@ -2357,7 +2230,7 @@ sub authform_internal{ if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'int') { if ($can_assign{'int'}) { - $intcheck = 'checked="checked" '; + $intcheck = 'checked="on" '; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $intcheck = ''; @@ -2373,7 +2246,7 @@ sub authform_internal{ } } else { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } if (!$can_assign{'int'}) { @@ -2382,7 +2255,7 @@ sub authform_internal{ if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } } @@ -2397,7 +2270,7 @@ sub authform_internal{ $result = &mt ('[_1] Internally authenticated (with initial password [_2])', ''.$autharg); - $result.="'; + $result.="'; return $result; } @@ -2412,7 +2285,7 @@ sub authform_local{ if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'loc') { if ($can_assign{'loc'}) { - $loccheck = 'checked="checked" '; + $loccheck = 'checked="on" '; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $loccheck = ''; @@ -2428,7 +2301,7 @@ sub authform_local{ } } else { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } if (!$can_assign{'loc'}) { @@ -2437,7 +2310,7 @@ sub authform_local{ if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } } @@ -2466,7 +2339,7 @@ sub authform_filesystem{ if (defined($in{'curr_authtype'})) { if ($in{'curr_authtype'} eq 'fsys') { if ($can_assign{'fsys'}) { - $fsyscheck = 'checked="checked" '; + $fsyscheck = 'checked="on" '; if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifyuser') { $fsyscheck = ''; @@ -2479,7 +2352,7 @@ sub authform_filesystem{ } } else { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } if (!$can_assign{'fsys'}) { @@ -2488,7 +2361,7 @@ sub authform_filesystem{ if (defined($in{'mode'})) { if ($in{'mode'} eq 'modifycourse') { if ($authnum == 1) { - $authtype = ''; + $authtype = ''; } } } @@ -2911,25 +2784,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 @@ -2956,17 +2810,14 @@ sub aboutmewrapper { return; } return ''.$link.''; + ($target?' target="$target"':'').' title="'.&mt("View this user's personal page").'">'.$link.''; } # ------------------------------------------------------------ Syllabus Wrapper sub syllabuswrapper { - my ($linktext,$coursedir,$domain,$fontcolor)=@_; - if ($fontcolor) { - $linktext=''.$linktext.''; - } + my ($linktext,$coursedir,$domain)=@_; return qq{$linktext}; } @@ -2991,27 +2842,6 @@ sub track_student_link { &help_open_topic('View_recent_activity'); } -sub slot_reservations_link { - my ($linktext,$sname,$sdom,$target) = @_; - my $link ="/adm/slotrequest?command=showresv&origin=aboutme"; - my $title = 'View slot reservation history'; - if (defined($sname) && $sname !~ /^\s*$/ && - defined($sdom) && $sdom !~ /^\s*$/) { - $link .= "&uname=$sname&udom=$sdom"; - $title .= ' of this student'; - } - if (defined($target) && $target !~ /^\s*$/) { - $target = qq{target="$target"}; - } else { - $target = ''; - } - $title = &mt($title); - $linktext = &mt($linktext); - return qq{$linktext}; -# FIXME uncomment when help item created: &help_open_topic('Slot_Reservation_History'); - -} - # ===================================================== Display a student photo @@ -3271,6 +3101,7 @@ sub user_lang { return $user_lh; } + ############################################################### ## Student Answer Attempts ## ############################################################### @@ -3986,7 +3817,7 @@ sub blocking_status { &Apache::lonnet::coursedescription($course); $coursedesc = $courseinfo{'description'}; } - $category = "Group portfolio files in the course '$coursedesc'"; + $category = "Group files in the course '$coursedesc'"; } else { $category = 'Portfolio files belonging to '; if ($env{'user.name'} eq 'public' && @@ -4120,7 +3951,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 { @@ -4347,7 +4178,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), @@ -4458,7 +4289,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(); @@ -4632,11 +4463,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 = $sidebg; - my $data_table_light = '#FAFAFA'; - my $data_table_dark = '#F0F0F0'; + my $data_table_head = $tabbg; + my $data_table_light = '#EEEEEE'; + my $data_table_dark = '#DDDDDD'; my $data_table_darker = '#CCCCCC'; my $data_table_highlight = '#FFFF00'; my $mail_new = '#FFBB77'; @@ -4649,39 +4484,53 @@ 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; @@ -4971,7 +4823,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 { @@ -5010,7 +4862,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 { @@ -5066,67 +4918,22 @@ 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; } @@ -5150,7 +4957,7 @@ table.LC_data_table tr > td.LC_roles_sel } span.LC_current_location { - font-size: x-large; + font-size:larger; background: $pgbg; } @@ -5194,9 +5001,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 { @@ -5207,7 +5014,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 { @@ -5246,7 +5053,7 @@ table.LC_pick_box { border-spacing: 1px; } table.LC_pick_box td.LC_pick_box_title { - background: $sidebg; + background: $tabbg; font-weight: bold; text-align: right; vertical-align: top; @@ -5254,7 +5061,7 @@ table.LC_pick_box td.LC_pick_box_title { padding: 8px; } table.LC_pick_box td.LC_selfenroll_pick_box_title { - background: $sidebg; + background: $tabbg; font-weight: bold; text-align: right; width: 350px; @@ -5270,7 +5077,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; } @@ -5312,7 +5119,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; } @@ -5345,7 +5152,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 { @@ -5366,7 +5173,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; @@ -5483,7 +5289,7 @@ span.LC_cusr_subheading { table.LC_docs_documents { background: #BBBBBB; - border-width: 0; + border-width: 0px; border-collapse: collapse; } @@ -5492,15 +5298,8 @@ table.LC_docs_documents td.LC_docs_docum 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; } @@ -5556,7 +5355,7 @@ table.LC_sty_end { } table.LC_double_column { - border-width: 0; + border-width: 0px; border-collapse: collapse; width: 100%; padding: 2px; @@ -5596,23 +5395,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; @@ -5620,7 +5402,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; @@ -5639,7 +5422,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, @@ -5650,7 +5434,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; @@ -5660,12 +5445,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, @@ -5682,12 +5468,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; @@ -5695,7 +5483,7 @@ table.LC_edit_problem_header_title { background: $tabbg; border-collapse: collapse; - padding: 0; + padding: 0px } div.LC_edit_problem_discards { @@ -5711,7 +5499,7 @@ hr.LC_edit_problem_divide { color: $tabbg; background-color: $tabbg; height: 3px; - border: none; + border: 0px; } img.stift{ border-width:0; @@ -5735,15 +5523,361 @@ 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%; +} + +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; +} + +.LC_bgLightGrey{ + background:URL(/adm/lonIcons/lightGreyBG.png) repeat-x left bottom; +} + + +/* Main Header with discription of Person, Course, etc. */ +.LC_HeadRight { + text-align: right; + float: right; + margin: 0px; + padding: 0px; + right:0; + position:absolute; + overflow:hidden; +} + +p, .LC_ContentBox { + padding: 10px; + +} +.LC_FormSectionClearButton input { + background-color:transparent; + border:0px; + cursor:pointer; + text-decoration:underline; +} + + +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_TabMainMenueContent, 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; + border-bottom:solid 1px $lg_border_color; +} +ul.LC_TabContent li{ + vertical-align:middle; + padding:0px 10px 0px 10px; + background-color:$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; +} +ul.LC_TabContent li:hover, ul.LC_TabContent li.active{ + background-color:#FFFFFF; +} +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; +} +#LC_CourseDocuments, #LC_SupplementalCourseDocuments +{ + margin:0px; +} + +.LC_hideThis +{ + display:none; + visibility:hidden; +} + +ol#LC_MenuBreadcrumbs, ol#LC_PathBreadcrumbs { + 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 { +/* + 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 { + 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; +} + +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_ListStyleNormal_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; +} +div.LC_columnSection > .LC_ContentBox, +div.LC_columnSection > .LC_ContentBoxSpecial + { + width: 400px; +} + +.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:65%; + padding: 10px; + height: auto; + background-color:#FFFFFF; + border:1px solid #CCCCCC; +} + + +.LC_loginpage_loginContainer { + float:left; + width: 182px; + 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 { + margin-left:20px; + float:left; + width:30%; + border:1px solid #CCCCCC; + padding:10px; +} + +.LC_loginpage_loginDomain { + margin-right:20px; + width:20%; + float:left; + padding:10px; +} + +.LC_loginpage_space { + clear:both; + margin-bottom:20px; + border-bottom: 1px solid #CCCCCC; +} + END } @@ -5871,8 +6005,7 @@ sub xml_begin { .''; } else { - $output=''. - ''; + $output=''; } return $output; } @@ -6008,31 +6141,26 @@ 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 - if (exists($args->{'bread_crumbs'}) or exists($args->{'bread_crumbs_component'})) { + + if (exists($args->{'bread_crumbs'})) { &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') { + if (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(); - } + $result .= &Apache::lonhtmlcommon::breadcrumbs(); } + return $result; } + =pod =item * &head() @@ -6175,7 +6303,7 @@ sub simple_error_page { } sub start_data_table_empty_row { - $row_count[0]++; +# $row_count[0]++; return '
+ + + + + + + + + +
$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; } @@ -7286,7 +7383,6 @@ sub personal_data_fieldtitles { middlename => 'Middle Name', generation => 'Generation', gen => 'Generation', - inststatus => 'Affiliation', ); return %fieldtitles; } @@ -7356,56 +7452,6 @@ sub get_institutional_codes { =pod -=head1 Slot Helpers - -=over 4 - -=item * sorted_slots() - -Sorts an array of slot names in order of slot start time (earliest first). - -Inputs: - -=over 4 - -slotsarr - Reference to array of unsorted slot names. - -slots - Reference to hash of hash, where outer hash keys are slot names. - -=back - -Returns: - -=over 4 - -sorted - An array of slot names sorted by the start time of the slot. - -=back - -=back - -=cut - - -sub sorted_slots { - my ($slotsarr,$slots) = @_; - my @sorted; - if ((ref($slotsarr) eq 'ARRAY') && (ref($slots) eq 'HASH')) { - @sorted = - sort { - if (ref($slots->{$a}) && ref($slots->{$b})) { - return $slots->{$a}{'starttime'} <=> $slots->{$b}{'starttime'} - } - if (ref($slots->{$a})) { return -1;} - if (ref($slots->{$b})) { return 1;} - return 0; - } @{$slotsarr}; - } - return @sorted; -} - -=pod - =back =head1 HTTP Helpers @@ -7697,9 +7743,9 @@ sub upload_embedded { ' '. $orig_uploaded_filename.'
'; } else { - $output .= ''. + $output .= ''. &mt('View embedded file: [_1]',''. - $orig_uploaded_filename.'').'
'; + $orig_uploaded_filename.'').'
'; } } close($fh); @@ -8004,8 +8050,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.'