It seems to me that the id="11" is used within the imported file (which imports yet another library file) and redundantly in the actual problem file to import the first library file. I think you 'might' want to use an id other than "11" in your problem file, for the import.
----- Original Message ----- From: "Itay Furman" <it...@nospammail.net> To: lon-capa-users@mail.lon-capa.org Sent: Sunday, 27 October, 2013 08:45:18 Subject: [LON-CAPA-users] Duplicated ids found Hi, This is problem a newbie question. But I didn't find information on this. Sorry for that. After publishing a problem I get the following error message: [start] ERROR: Duplicated ids found, problem will operate incorrectly. Duplicated ids seen: 11 This error occurred while processing response 12 in part [end] I could find in my code only a single id="11". Note that the numerical ids in <import id="11">/res/jce/itayf/pub/lib/const_phys.library</import> and <numericalresponse unit="C" format="2E" answer="$q" id="12"> were added by lon-capa after publication. The code follows below. Thanks in advance, Itay [start code] <problem> <comment> File = elec_coulomb_identical-hanging-charges.problem Author = Itay Furman, PhD, it...@fastmail.fm Created = 2013-10-08 Updated = 2013-10-08 Version = 0.01 Source = Expanded from a problem by Michael Friedberg, JCE. </comment> <import id="11">/res/jce/itayf/pub/lib/const_phys.library</import> <script type="loncapa/perl"> # Set-up $k_coulomb = $Coulomb_Const; $g = 9.8; # Gravity acceleration [m / s^2]. $len = &random(10, 50, 5); # String length [cm]. $theta = &random(4,25,1); # Angle between string and vertical [degrees]. $th_rad = $theta* $Pi / 180; # Same angle [rad]. $mass = &random(5,80,5); # Body mass [g]. # Compute the magnitude of the charge on each body. $q = 2 * ($len/100) * sin($th_rad) * sqrt(($mass/1000) * $g * tan($th_rad) / $k_coulomb); # Note the following factors are required: # 1/100 in ($len/100) to convert $len: [cm] -> [m]. # 1/1000 in ($mass/1000) to convert $mass: [g] -> [kg]. # $Pi/180 in ($theta*$Pi/180) to convert sin()'s arg: [deg] -> [Rad]. </script> <startouttext /> <h2>The Electrostatic Force Between a Pair of Identical Hanging Point Charges</h2> <p> Two point bodies, each having a mass of <num>$mass</num> [g], are connected to identical massless isolating strings whose length is <num>$len</num> [cm]. The strings are connected to the same hook on the ceiling. </p> <p> The bodies carry identical charges. Therefore, due to electrostatic repulsion, each string is inclined with an angle of $theta<sup>o</sup> relative to the line that pass through the hook and is orthogonal to the ceiling. </p> <endouttext /> <part id="q" display="Compute the charge."> <startouttext /> <strong>Compute: </strong> the electric charge on each body is <endouttext /> <numericalresponse unit="C" format="2E" answer="$q" id="12"> <responseparam name="tol" type="tolerance" default="2%" description="Numerical Tolerance" /> <textline readonly="no" /> </numericalresponse> </part> <img alt="A pair of identical hanging charged masses." src="/res/jce/itayf/pub/share/img/131012_pair-hanging-charges.jpg" encrypturl="no" /> <allow src="/res/jce/itayf/pub/share/img/131012_pair-hanging-charges.jpg" /> </problem> [end code] _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users -- Raymond J. Batchelor, PhD. Department of Chemistry Simon Fraser University Phone: 778-782-5635 _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users