[LON-CAPA-cvs] cvs: loncom /html/adm/helper resettimes.helper

albertel lon-capa-cvs@mail.lon-capa.org
Sun, 16 Jan 2005 08:21:49 -0000


albertel		Sun Jan 16 03:21:49 2005 EDT

  Modified files:              
    /loncom/html/adm/helper	resettimes.helper 
  Log:
  - add a 'Confirm' step to the single student mode
  - add mroe text to the pick maps step for a single studnet
  
  
Index: loncom/html/adm/helper/resettimes.helper
diff -u loncom/html/adm/helper/resettimes.helper:1.1 loncom/html/adm/helper/resettimes.helper:1.2
--- loncom/html/adm/helper/resettimes.helper:1.1	Sun Jan 16 03:04:10 2005
+++ loncom/html/adm/helper/resettimes.helper	Sun Jan 16 03:21:49 2005
@@ -16,8 +16,10 @@
   </state>
 
   <state name="SelectAccess">
+    <message nextstate="ConfirmStu">
+       <message_text>This is a list of maps and times they were accessed, plese select those you want deleted.</message_text>
+    </message>
     <choices variable='delete' multichoice='true'>
-      <nextstate>FinishStu</nextstate>
       <exec>
          my ($uname,$udom,$sec,$fullname)=split(':',$helper->{'VARS'}{'stu1'});
          my %times=&Apache::lonnet::dump('firstaccesstimes',$udom,$uname,
@@ -27,13 +29,34 @@
 	     my $escsymb=&Apache::lonnet::escape($symb);
 	     my $title=&Apache::lonnet::gettitle($symb);
 	     my $time=&Apache::lonlocal::locallocaltime($times{$res});
-	     my $description="<a href='/adm/navmaps?postsymb=".&Apache::lonnet::escape($symb)."'>$title</a>";
+	     my $description="<a href='/adm/navmaps?postsymb=".&Apache::lonnet::escape($symb)."'>$title</a> on $time";
 	     push(@{$state->{CHOICES}},[$description,$escsymb]);
 	 }
       </exec>
     </choices>
   </state>
 
+  <state name="ConfirmStu">
+    <message nextstate="FinishStu">
+       <message_text>Will remove access times from user <ul></message_text>
+    </message>
+    <eval>
+        my ($uname,$udom,undef,$fullname)=split(':',$helper->{'VARS'}{'stu1'});
+        if (!$fullname) { $fullname="$uname\@$udom"; }
+        return '<li>'.$fullname.'</li>';
+    </eval>
+    <message><message_text></ul> for maps <ul></message_text></message>
+    <eval>
+	my $list;
+	my @symbs=split(/\|\|\|/,$helper->{'VARS'}{'delete'});
+	foreach my $escsymb (@symbs) {
+	    my $symb=&Apache::lonnet::unescape($escsymb);
+	    $list.='<li>'.&Apache::lonnet::gettitle($symb).'</li>';
+	}
+	return $list;
+    </eval>
+  </state>
+
   <state name="FinishStu" title="Processing">
     <final>
       <finalcode>