version 1.175, 2009/06/12 17:58:22
|
version 1.176, 2009/06/15 11:18:11
|
Line 3438 snippets and collecting the results. Fin
|
Line 3438 snippets and collecting the results. Fin
|
helper, going to a provided page. |
helper, going to a provided page. |
|
|
If the parameter "restartCourse" is true, this will override the buttons and |
If the parameter "restartCourse" is true, this will override the buttons and |
will make a "Finish Helper" button that will re-initialize the course for them, |
will make a Save button (Finish Helper) that will re-initialize the course for them, |
which is useful for the Course Initialization helper so the users never see |
which is useful for the Course Initialization helper so the users never see |
the old values taking effect. |
the old values taking effect. |
|
|
Line 3545 sub render {
|
Line 3545 sub render {
|
|
|
my $actionURL = $self->{EXIT_PAGE}; |
my $actionURL = $self->{EXIT_PAGE}; |
my $targetURL = ''; |
my $targetURL = ''; |
my $finish=&mt('Finish'); |
my $finish=&mt('Save'); |
if ($self->{'restartCourse'}) { |
if ($self->{'restartCourse'}) { |
$actionURL = '/adm/roles'; |
$actionURL = '/adm/roles'; |
$targetURL = '/adm/menu'; |
$targetURL = '/adm/menu'; |
Line 3557 sub render {
|
Line 3557 sub render {
|
if ($env{'course.'.$env{'request.course.id'}.'.clonedfrom'}) { |
if ($env{'course.'.$env{'request.course.id'}.'.clonedfrom'}) { |
$targetURL = '/adm/parmset?overview=1'; |
$targetURL = '/adm/parmset?overview=1'; |
} |
} |
my $finish=&mt('Finish Course Initialization'); |
|
} |
} |
my $previous = HTML::Entities::encode(&mt("Back"), '<>&"'); |
my $previous = HTML::Entities::encode(&mt("Back"), '<>&"'); |
my $next = HTML::Entities::encode(&mt("Next"), '<>&"'); |
my $next = HTML::Entities::encode(&mt("Next"), '<>&"'); |
my $target = " target='loncapaclient'"; |
my $target = " target='loncapaclient'"; |
if ($env{'environment.remote'} eq 'off') { $target=''; } |
if ($env{'environment.remote'} eq 'off') { $target=''; } |
$result .= "<center>\n" . |
$result .= "<p>\n" . |
"<form action='".$actionURL."' method='post' $target>\n" . |
"<form action='".$actionURL."' method='post' $target>\n" . |
"<input type='button' onclick='history.go(-1)' value='$previous' />" . |
"<input type='button' onclick='history.go(-1)' value='$previous' />" . |
"<input type='hidden' name='orgurl' value='$targetURL' />" . |
"<input type='hidden' name='orgurl' value='$targetURL' />" . |
"<input type='hidden' name='selectrole' value='1' />\n" . |
"<input type='hidden' name='selectrole' value='1' />\n" . |
"<input type='hidden' name='" . $env{'request.role'} . |
"<input type='hidden' name='" . $env{'request.role'} . |
"' value='1' />\n<input type='submit' value='" . $finish . "' />\n" . |
"' value='1' />\n<input type='submit' value='" . $finish . "' />\n" . |
"</form></center>"; |
"</form></p>\n"; |
|
|
return $result; |
return $result; |
} |
} |
Line 3693 sub render {
|
Line 3692 sub render {
|
my $res = $navmap->getById($vars->{RESOURCE_ID}); |
my $res = $navmap->getById($vars->{RESOURCE_ID}); |
$symb = $res->symb(); |
$symb = $res->symb(); |
my $title = $res->compTitle(); |
my $title = $res->compTitle(); |
$resourceString .= '<li>'.&mt('for the resource named [_1] part [_2]',"<b>$title</b>","<b>$part</b>").'</li>'; |
$resourceString .= '<li>'.&mt('for the resource named [_1], part [_2]',"<b>$title</b>","<b>$part</b>").'</li>'; |
} else { |
} else { |
$resourceString .= '<li>'.&mt('for the resource ID [_1] (name unavailable) part [_2]','<b>'.$vars->{RESOURCE_ID}.'</b>',"<b>$part</b>").'</li>'; |
$resourceString .= '<li>'.&mt('for the resource ID [_1] (name unavailable), part [_2]','<b>'.$vars->{RESOURCE_ID}.'</b>',"<b>$part</b>").'</li>'; |
&Apache::lonnet::logthis('Retrieval of resource title failed in lonhelper.pm - could not create navmap object for course.'); |
&Apache::lonnet::logthis('Retrieval of resource title failed in lonhelper.pm - could not create navmap object for course.'); |
} |
} |
if ($vars->{TARGETS} eq 'course') { |
if ($vars->{TARGETS} eq 'course') { |
Line 3728 sub render {
|
Line 3727 sub render {
|
$result .= "<input type='hidden' name='psprt' value='". |
$result .= "<input type='hidden' name='psprt' value='". |
HTML::Entities::encode($part,"'<>&\"") . "' />\n"; |
HTML::Entities::encode($part,"'<>&\"") . "' />\n"; |
|
|
$result .= '<p>'.&mt('Confirm that this information is correct, then click "Finish Helper" to complete setting the parameter.').'<ul>'; |
$result .= '<p class="LC_info">' |
|
.&mt('Confirm that this information is correct, then click "Save" to complete setting the parameter.') |
|
.'</p>' |
|
.'<ul>'; |
|
|
# Print the type of manipulation: |
# Print the type of manipulation: |
my $extra; |
my $extra; |
Line 3804 sub render {
|
Line 3806 sub render {
|
my $showdate = &Apache::lonlocal::locallocaltime($vars->{PARM_DATE}); |
my $showdate = &Apache::lonlocal::locallocaltime($vars->{PARM_DATE}); |
$result .= '<li>'.&mt('to [_1] ([_2])',"<b>".$showdate."</b>",Apache::lonnavmaps::timeToHumanString($vars->{PARM_DATE}))."</li>\n"; |
$result .= '<li>'.&mt('to [_1] ([_2])',"<b>".$showdate."</b>",Apache::lonnavmaps::timeToHumanString($vars->{PARM_DATE}))."</li>\n"; |
} |
} |
|
|
|
$result .= '</ul>'; |
|
|
|
# FIXME: Make previous button working |
|
# Found to be dysfunctional when used to change the selected student |
|
# my $previous = HTML::Entities::encode(&mt("Back"), '<>&"'); |
|
my $buttons .= '<p><span class="LC_nobreak">' |
|
# .'<input name="back" type="button"' |
|
# .' value="'.$previous.'" onclick="history.go(-1)" />' |
|
.' <input type="submit" value="'.&mt('Save').'" />' # Finish Helper |
|
.'</span></p>'."\n"; |
|
|
# print pres_marker |
# print pres_marker |
$result .= "\n<input type='hidden' name='pres_marker'" . |
$result .= "\n<input type='hidden' name='pres_marker'" . |
" value='$affectedResourceId&$parm_name&$level' />\n"; |
" value='$affectedResourceId&$parm_name&$level' />\n"; |
Line 3814 sub render {
|
Line 3827 sub render {
|
$result .= "\n<input type='hidden' value='$symb' name='pssymb' />"; |
$result .= "\n<input type='hidden' value='$symb' name='pssymb' />"; |
$result .= "\n<input type='hidden' value='$paramlevel' name='parmlev' />"; |
$result .= "\n<input type='hidden' value='$paramlevel' name='parmlev' />"; |
|
|
$result .= "<br /><br /><center><input type='submit' value='".&mt('Finish Helper')."' /></center></form>\n"; |
$result .= $buttons; |
|
|
return $result; |
return $result; |
} |
} |