--- loncom/homework/lonhomework.pm 2009/05/19 22:52:19 1.311
+++ loncom/homework/lonhomework.pm 2009/10/20 08:00:36 1.316
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.311 2009/05/19 22:52:19 bisitz Exp $
+# $Id: lonhomework.pm,v 1.316 2009/10/20 08:00:36 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -688,9 +688,19 @@ sub handle_save_or_undo {
sub analyze_header {
my ($request) = @_;
my $js = &Apache::structuretags::setmode_javascript();
+
+ # Breadcrumbs
+ my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+ 'text' => 'Construction Space'},
+ {'href' => '',
+ 'text' => 'Problem Testing'},
+ {'href' => '',
+ 'text' => 'Analyzing a problem'}];
+
my $result =
- &Apache::loncommon::start_page('Analyzing a problem',$js)
- .&Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
+ &Apache::loncommon::start_page('Analyzing a problem',
+ $js,
+ {'bread_crumbs' => $brcrum,})
.&Apache::loncommon::head_subbox(
&Apache::loncommon::CSTR_pageheader());
$result .=
@@ -705,10 +715,10 @@ sub analyze_header {
'onclick="javascript:setmode(this.form,'."'editxml'".')" />
-
+
-
+
';
&Apache::lonxml::add_messages(\$result);
@@ -782,7 +792,7 @@ sub analyze {
}
&Apache::lonhtmlcommon::Update_PrgWin($request,\%prog_state,
&mt('Analyzing Results'));
- $request->print('
'
+ $request->print('
'
.''
.&mt('List of possible answers')
.'
'
@@ -916,6 +926,13 @@ sub editxmlmode {
my $only_body = ($env{'environment.remote'} eq 'off')? 0 : 1;
my $dragmath_button =
&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1);
+
+ # Breadcrumbs
+ my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+ 'text' => 'Construction Space'},
+ {'href' => '',
+ 'text' => 'Problem Editing'}];
+
my $start_page =
&Apache::loncommon::start_page(&mt("EditXML [_1]",$file),$js,
{'no_auto_mt_title' => 1,
@@ -923,10 +940,11 @@ sub editxmlmode {
'add_entries' => {
'onresize' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')],
'onload' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')],
- }});
+ },
+ 'bread_crumbs' => $brcrum,
+});
$result=$start_page
- .&Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
.&Apache::loncommon::head_subbox(
&Apache::loncommon::CSTR_pageheader());
$result.=&renderpage($request,$file,['no_output_web'],1).
@@ -953,7 +971,7 @@ sub editxmlmode {
-
+
'.&Apache::lonxml::message_location().'
' . '
@@ -1083,15 +1101,21 @@ sub get_template_list {
}
my $count = 0;
my $currentcategory='';
+ my $first = 1;
foreach my $file (@files) {
next if ($file->[1] !~ /\S/);
if ($file->[2] ne $currentcategory) {
$currentcategory=$file->[2];
if ((!$seconddiv) && ($count >= $midpoint)) {
- $result .= ''."\n".''."\n";
+ $result .= '
'."\n".''."\n";
$seconddiv = 1;
+ } elsif (!$first) {
+ $result.='
'."\n";
+ } else {
+ $first = 0;
}
- $result.=''.$currentcategory.'
';
+ $result.= ''."\n"
+ .'
'.$currentcategory.'
'."\n";
$count++;
}
$result .=
@@ -1102,11 +1126,13 @@ sub get_template_list {
}
my $filename=$file->[0];
$filename=~s/^\/home\/httpd\/html//;
- $result.='
'.&mt('Example').''."\n";
+ $result.='
'
+ .''.&mt('Example').''
+ .''."\n";
$count ++;
}
if ($numfiles > 0) {
- $result .= '
'."\n".''."\n";
+ $result .= ''."\n".''."\n";
}
return $result;
}
@@ -1140,30 +1166,33 @@ sub newproblem {
my $dest = &Apache::lonnet::filelocation("",$request->uri);
my $errormsg;
my $instructions;
+ my $brcrum = [{'href' => &Apache::loncommon::authorspace(),
+ 'text' => 'Construction Space'},
+ {'href' => '',
+ 'text' => "Create New $extension"}];
my $start_page =
- &Apache::loncommon::start_page("Create New $extension");
-
+ &Apache::loncommon::start_page("Create New $extension",
+ undef,
+ {'bread_crumbs' => $brcrum,});
$request->print(
$start_page
- .&Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
.&Apache::loncommon::head_subbox(
&Apache::loncommon::CSTR_pageheader())
.''.&mt("Creating a new $extension resource.")."
$errormsg
".&mt("The requested file [_1] currently does not exist.",
- ''.$shownurl.'')."
-
-
-".&mt("To create a new $extension, select a template from the".
- " list below. Then click on the \"Create $extension\" button.").'
-