Diff for /loncom/interface/lonparmset.pm between versions 1.539 and 1.543

version 1.539, 2013/07/17 12:00:28 version 1.543, 2014/01/15 18:48:35
Line 46  This module sets coursewide and assessme Line 46  This module sets coursewide and assessme
   
 =over  =over
   
 =pod  
   
 =item parmval()  =item parmval()
   
 Figure out a cascading parameter.  Figure out a cascading parameter.
Line 139  javascript function 'pjump'. Line 137  javascript function 'pjump'.
   
  extractResourceInformation extracts lots of information about all of the the course's resources into a variety of hashes.   extractResourceInformation extracts lots of information about all of the the course's resources into a variety of hashes.
   
 Input: See list below:  Input: See list below
   
   =over 4
   
 =item * B<env{'user.name'}> : Current username  =item * B<env{'user.name'}> : Current username
   
 =item * B<env{'user.domain'}> : Domain of current user.  =item * B<env{'user.domain'}> : Domain of current user.
   
 =item * b<env{"request.course.fn"} : Course  =item * B<env{"request.course.fn"}> : Course
   
   =back
   
 Outputs: See list below:  Outputs: See list below:
   
   =over 4
   
 =item * B<ids> (out) : An array that will contain all of the ids in the course.  =item * B<ids> (out) : An array that will contain all of the ids in the course.
   
 =item * B<typep>(out) : hash, id->type, where "type" contains the extension of the file, thus, I<problem exam quiz assess survey form>.  =item * B<typep>(out) : hash, id->type, where "type" contains the extension of the file, thus, I<problem exam quiz assess survey form>.
Line 173  Outputs: See list below: Line 177  Outputs: See list below:
   
 =item * B<defkeytype>  =item * B<defkeytype>
   
   =back
   
 =item isdateparm()  =item isdateparm()
   
 =item parmmenu()  =item parmmenu()
Line 210  Returns: nothing Line 216  Returns: nothing
   
 Variables used (guessed by Jeremy):  Variables used (guessed by Jeremy):
   
   =over
   
 =item * B<pscat>: ParameterS CATegories? ends up a list of the types of parameters that exist, e.g., tol, weight, acc, opendate, duedate, answerdate, sig, maxtries, type.  =item * B<pscat>: ParameterS CATegories? ends up a list of the types of parameters that exist, e.g., tol, weight, acc, opendate, duedate, answerdate, sig, maxtries, type.
   
 =item * B<psprt>: ParameterS PaRTs? a list of the parts of a problem that we are displaying? Used to display only selected parts?  =item * B<psprt>: ParameterS PaRTs? a list of the parts of a problem that we are displaying? Used to display only selected parts?
Line 222  Variables used (guessed by Jeremy): Line 230  Variables used (guessed by Jeremy):
         When storing information, store as part 0          When storing information, store as part 0
         When requesting information, request from full part          When requesting information, request from full part
   
   =back
   
 =item tablestart()  =item tablestart()
   
 =item tableend()  =item tableend()
Line 288  Set portfolio metadata Line 298  Set portfolio metadata
   
 Main handler.  Calls &assessparms subroutine.  Main handler.  Calls &assessparms subroutine.
   
   
 =back  =back
   
 =cut  =cut
Line 2088  sub assessparms { Line 2097  sub assessparms {
             $id='';              $id='';
         } else {          } else {
             $message=              $message=
             '<span class="LC_error">'.&mt("Unknown ID")." '$id' ".                  '<p class="LC_warning">'.
             &mt('at domain')." '$udom'</span>";                  &mt('Unknown ID [_1] at domain [_2]',
                       "'".$id."'","'".$udom."'").
                   '</p>';
         }          }
     } else {      } else {
         $uname=$env{'form.uname'};          $uname=$env{'form.uname'};
Line 2100  sub assessparms { Line 2111  sub assessparms {
         $uhome=&Apache::lonnet::homeserver($uname,$udom);          $uhome=&Apache::lonnet::homeserver($uname,$udom);
         if ($uhome eq 'no_host') {          if ($uhome eq 'no_host') {
             $message=              $message=
             '<span class="LC_error">'.&mt("Unknown user")." '$uname' ".                  '<p class="LC_warning">'.
             &mt("at domain")." '$udom'</span>";                  &mt('Unknown user [_1] at domain [_2]',
                       "'".$uname."'","'".$udom."'").
                   '</p>';
             $uname='';              $uname='';
         } else {          } else {
             $csec=&Apache::lonnet::getsection($udom,$uname,              $csec=&Apache::lonnet::getsection($udom,$uname,
                           $env{'request.course.id'});                            $env{'request.course.id'});
             if ($csec eq '-1') {              if ($csec eq '-1') {
                 $message='<span class="LC_error">'.                  $message=
                 &mt("User")." '$uname' ".&mt("at domain")." '$udom' ".                      '<p class="LC_warning">'.
                 &mt("not in this course")."</span>";                      &mt('User [_1] at domain [_2] not in this course',
                           "'".$uname."'","'".$udom."'").
                       '</p>';
                 $uname='';                  $uname='';
                 $csec=$env{'form.csec'};                  $csec=$env{'form.csec'};
                 $cgroup=$env{'form.cgroup'};                  $cgroup=$env{'form.cgroup'};
Line 2373  ENDPARMSELSCRIPT Line 2388  ENDPARMSELSCRIPT
                        $userspan ++;                         $userspan ++;
                    }                     }
                    $r->print('<th colspan="'.$userspan.'" rowspan="2">');                     $r->print('<th colspan="'.$userspan.'" rowspan="2">');
                    $r->print(&mt("User")." $uname ".&mt('at Domain')." $udom</th>");                     $r->print(&mt('User [_1] at Domain [_2]',"'".$uname."'","'".$udom."'").'</th>');
                }                 }
                my %lt=&Apache::lonlocal::texthash(                 my %lt=&Apache::lonlocal::texthash(
                 'pie'    => "Parameter in Effect",                  'pie'    => "Parameter in Effect",
Line 3639  sub date_shift_one { Line 3654  sub date_shift_one {
               '<table><tr><td>'.&mt('Currently set date:').'</td><td>'.                '<table><tr><td>'.&mt('Currently set date:').'</td><td>'.
               &Apache::lonlocal::locallocaltime($env{'form.timebase'}).'</td></tr>'.                &Apache::lonlocal::locallocaltime($env{'form.timebase'}).'</td></tr>'.
               '<tr><td>'.&mt('Shifted date:').'</td><td>'.                '<tr><td>'.&mt('Shifted date:').'</td><td>'.
                     &Apache::lonhtmlcommon::dshowerfuck.net                      &Apache::lonhtmlcommon::date_setter('shiftform',
 ate_setter('shiftform',  
                                                         'timeshifted',                                                          'timeshifted',
                                                         $env{'form.timebase'},,                                                          $env{'form.timebase'},,
                                                         '').                                                          '').
Line 3664  sub date_shift_two { Line 3678  sub date_shift_two {
     $r->print($start_page.$breadcrumbs);      $r->print($start_page.$breadcrumbs);
     &startSettingsScreen($r,'parmset',$crstype);      &startSettingsScreen($r,'parmset',$crstype);
     my $timeshifted=&Apache::lonhtmlcommon::get_date_from_form('timeshifted');      my $timeshifted=&Apache::lonhtmlcommon::get_date_from_form('timeshifted');
     $r->print(&mt('Shifting all dates such that [_1] becomes [_2]',      $r->print('<h2>'.&mt('Shift Dates').'</h2>'.
                 '<p>'.&mt('Shifting all dates such that [_1] becomes [_2]',
               &Apache::lonlocal::locallocaltime($env{'form.timebase'}),                &Apache::lonlocal::locallocaltime($env{'form.timebase'}),
               &Apache::lonlocal::locallocaltime($timeshifted)));                &Apache::lonlocal::locallocaltime($timeshifted)).'</p>');
     my $delta=$timeshifted-$env{'form.timebase'};      my $delta=$timeshifted-$env{'form.timebase'};
     &dateshift($delta);      &dateshift($delta);
       $r->print(
           &Apache::lonhtmlcommon::confirm_success(&mt('Done')).
           '<br /><br />'.
           &Apache::lonhtmlcommon::actionbox(
               ['<a href="/adm/parmset">'.&mt('Content and Problem Settings').'</a>']));
     &endSettingsScreen($r);      &endSettingsScreen($r);
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
 }  }

Removed from v.1.539  
changed lines
  Added in v.1.543


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>