[LON-CAPA-cvs] cvs: modules /gerd/harvesting lonrecommender.pm

www www at source.lon-capa.org
Sun Jul 29 16:13:10 EDT 2012


www		Sun Jul 29 20:13:10 2012 EDT

  Modified files:              
    /modules/gerd/harvesting	lonrecommender.pm 
  Log:
  * Only for courses, not communities
  * Only for people who can modify course content
  * Do not show links to content that you cannot see or use
  * Consent form (not approved yet)
  
  
Index: modules/gerd/harvesting/lonrecommender.pm
diff -u modules/gerd/harvesting/lonrecommender.pm:1.33 modules/gerd/harvesting/lonrecommender.pm:1.34
--- modules/gerd/harvesting/lonrecommender.pm:1.33	Thu Jul 19 19:42:20 2012
+++ modules/gerd/harvesting/lonrecommender.pm	Sun Jul 29 20:13:10 2012
@@ -5,7 +5,7 @@
 #
 # MODIFY $datapath VARIABLE FOR LOCATION OF DATA FILES
 #
-# $Id: lonrecommender.pm,v 1.33 2012/07/19 19:42:20 www Exp $
+# $Id: lonrecommender.pm,v 1.34 2012/07/29 20:13:10 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -143,7 +143,9 @@
    &elog('topsorted',$maxassoc,$maxcount,
          $newlist[0],$$associations{$newlist[0]},$counts{$newlist[0]},
          $newlist[1],$$associations{$newlist[1]},$counts{$newlist[1]},
-         $newlist[2],$$associations{$newlist[2]},$counts{$newlist[2]}
+         $newlist[2],$$associations{$newlist[2]},$counts{$newlist[2]},
+         $newlist[3],$$associations{$newlist[3]},$counts{$newlist[3]},
+         $newlist[4],$$associations{$newlist[4]},$counts{$newlist[4]}
         );
    return @newlist;
 }
@@ -558,6 +560,8 @@
 
 sub display_line {
    my ($url,$taxocats,$taxonomy,$editflag)=@_;
+   unless ((&Apache::lonnet::allowed('bre',$url)) ||
+           (&Apache::lonnet::allowed('bro',$url))) { return ''; }
    return "\n".&Apache::loncommon::start_data_table_row().'<th>'.
           &submit_link(($editflag?'Remove':'Add'),($editflag?'rem:':'add:').$url).
           "</th><td>".
@@ -810,6 +814,11 @@
 # ------
 # Only advanced users should get here
     unless ($env{'user.adv'}) { return; }
+# Not meant for Communities
+    if (&Apache::loncommon::course_type() eq 'Community') { return; }
+# Not meant for people who cannot modify the course contents
+    unless (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { return; };
+
 # Log transaction
     &elog('is',$env{'form.cmd'},$env{'form.filter'},$env{'form.searchterm'});
 # ------
@@ -910,9 +919,11 @@
              &display($r,\%taxonomy_categories,\%selectedids,$filter,$lower,10,&associated($urlid{$url}));
           }
        }
-    } else {
+    } elsif ($cmd=~/^gaveconsent/) {
        &elog("first", at existingbasket);
        &display($r,\%taxonomy_categories,\%selectedids,$filter,$lower,20,&associated(@existingbasket));
+    } else {
+       &consent_form($r);
     }
 
 # ------ Close page
@@ -920,4 +931,36 @@
     $r->print(&Apache::loncommon::end_page());
     return 1;
 }
+
+sub consent_form {
+   my ($r)=@_;
+   $r->print(<<'ENDCONSENT');
+<h1>Consent Form</h1>
+<h2>Effectiveness of Recommender System for Educational Resources</h2>
+<font size="-1">
+<p>
+As part of the ongoing research effort of the LON-CAPA project, we are asking you to use a new Recommender tool when compiling your courses. The Recommender combines the functions of Browse and Search with recommendations that are extracted from prior resource usage data. The current implementation of the Recommender is a prototype, which is not intended to become part of a production release. With this study, we aim to assess the effectiveness of the underlying algorithms and relative weighting of resource properties.
+</p>
+<p>
+The study will use course identifiers to track data (e.g., “Michigan State University LB 273 Fall 2012”), however, these identifiers will be removed or substituted in any reports or publications. The tracking data used in this study will not include your personal username. Participation is voluntary. 
+</p>
+<p>
+By using this Recommender tool, you are indicating that you have freely consented to take part in a study of the effectiveness of the tool, supervised by Dr. Gerd Kortemeyer, a faculty member in Lyman Briggs. The other tools, Browse and Search, are still available on your servers, so you can decide to compile your courses as you did in previous semesters without any drawbacks.
+</p>
+<p>
+If you have concerns or questions about this study, such as scientific issues, how to do any part of it, or to report an injury, please contact the researcher Dr. Kortemeyer, E-187 Holmes Hall, Phone 517.282.6446 or email - korte at lite.msu.edu. 
+</p>
+<p>
+If you have questions or concerns about your role and rights as a research participant, would like to obtain information or offer input, or would like to register a complaint about this study, you may contact, anonymously if you wish, the Michigan State University’s Human Research Protection Program at 517-355-2180, Fax 517-432-4503, or e-mail irb at msu.edu or regular mail at 207 Olds Hall, MSU, East Lansing, MI 48824.
+</p>
+<p>
+Information that you supply will be treated with strict confidence. Any research report based on your data will be anonymous. Your confidentiality will be protected to the maximum extent allowable by law.
+</p>
+<p>
+Using this Recommender tool indicates that you voluntarily agree to participate in this research.
+</p>
+</font>
+ENDCONSENT
+   $r->print(&submit_link(&mt('I agree'),'gaveconsent'));
+}
 1;




More information about the LON-CAPA-cvs mailing list