## Forum archive 2000-2006

### Nandor Sieben - number of trials set in the pg file

by Arnold Pizer -
Number of replies: 0
 number of trials set in the pg file topic started 7/3/2005; 2:47:48 PMlast post 8/16/2005; 10:20:34 AM
 Nandor Sieben - number of trials set in the pg file  7/3/2005; 2:47:48 PM (reads: 1351, responses: 7) Is there a way to set the default value for the number of trials inside the pg file? I am gussing there is an environment variable for this. I realize that the philosophy of webwork is to allow infinitely many trials but often times the answer is a small integer where guessing is unavoidable. Instructors assigning sets are usually too busy to think about every problem. The creator of the problem is probably in a better position to think about this. So what I am hoping for is this: default number of trials is infinitethis default can be adjusted in the pg filedefault value can be overwritten in a set Nandor <| Post or View Comments |>

 Michael Gage - Re: number of trials set in the pg file  7/3/2005; 4:19:41 PM (reads: 1610, responses: 0) This seems to me to be the right order to define the defaults. Currently the default number of trials is infinite. The default number can be overridden in a set.  ("Hmwk Set Editor" -> "Edit problems" -> "max attempts" input blank ) You can also reset it individually for each student to whom the set is assigned.I don't think that you can specify a maximum number of attempts from within a pg problem, although I'm not positive. This might not be a difficult feature to add. You can already specify a particular grader to use for the problem, which could provide a workaround. The maximum number of attempts is also stored in set definition files. It is in the third column of the problem listing: $path_to_problem_file,$weight_to_be_given_to_problem, $max_number_of_attempts The default weight or score is 1. The default maximum number of attempts is -1 which, along with blank, gives an infinite number of attempts. <| Post or View Comments |>  Nandor Sieben - Re: number of trials set in the pg file 7/15/2005; 12:44:40 PM (reads: 1583, responses: 0) Would it be possible to at least have a special comment type inside pg files and make the library browser display this comment. This way the problem writer could send a message to the person making up problem sets. Something like: #! Recommended number of trials is 10. This problem can be assigned more #! than once because it has a lot of randomization. Nandor <| Post or View Comments |>  John Jones - Re: number of trials set in the pg file 7/29/2005; 3:29:49 PM (reads: 1544, responses: 0) Hi Nandor, Having a special comment type is a good idea. I am making no guarantees as to how soon I would impliment the change in setmaker. Starting lines with #! seems a little cryptic, especially to someone looking at the pg file source. On the other hand, something really descriptive like #setmaker comment: Recommended number of trials is 10. This problem can be assigned more #setmaker comment: than once because it has a lot of randomization. is pretty long. How about #msg: Recommended number of trials is 10. This problem can be assigned more #msg: than once because it has a lot of randomization. It is not too long, and it is clearer that it is some sort of special message. John <| Post or View Comments |>  Michael Gage - Re: number of trials set in the pg file 7/29/2005; 3:42:06 PM (reads: 1556, responses: 0) It seems to me that in order to find these comments you would have to search through the source file. How about something like: COMMENT("Recommended number of trials is 10. This problem can be assigned more", "then once because it has a lot of randomization.");  comment would be a subroutine which concatenates its input, perhaps munges it a little, and then places it in $PG_flags{SETMAKER_COMMENTS}The library browser simply checks that location for comments and publishes them if that is desired. (PG_flags is already part of the output whenever a problem is rendered.) I'd be happy to use another name other than COMMENT. MSG might be ok. -- Mike <| Post or View Comments |>

 Nandor Sieben - Re: number of trials set in the pg file  8/2/2005; 5:33:06 PM (reads: 1524, responses: 0) Either solution would be great. Nandor <| Post or View Comments |>

 John Jones - Re: number of trials set in the pg file  8/13/2005; 5:50:45 PM (reads: 1435, responses: 0) Hi, You can now use COMMENT('Recommended number of trials is 10.'); in a pg file, and the results will only show in the Library browser. You can force a multiline comment with: COMMENT('Recommended number of trials is 10.','I think I wrote a cool problem'); The background color for the comments can be set in ur.css. John <| Post or View Comments |>

 Thomas Hagedorn - Re: number of trials set in the pg file  8/16/2005; 10:20:34 AM (reads: 1357, responses: 0) Hi, Is there a place within a course where one can change the default value from infinitely many attempts to say, 5 attempts? I can see a situation where you might have two instructors using the same problems with different philosophies on how many attempts should be used. But neither of them would want to go and change the data for possibly 300+ problems. Possibly easier would be to have default attempts parameter for each set, that could be edited on the "homework set editor" page, which serves as the default for the set (if this flag isn't set, then the set defaults to the global default). Thanks, Tom <| Post or View Comments |>