Features & Development

"Change Values" button for instructors

"Change Values" button for instructors

by Dick Lane -
Number of replies: 2
I suggest a "Change Values" (or "New Version") button be added to an instructor's display of a problem within the Library Browser's "Try It" display of a problem and an instructor's view of a problem within an assignment. This would supplement the current "Edit it" or "Edit this problem" links in those settings --- however, rather than display revised output in a new window/tab, I suggest just reusing the current window/tab. [Note: I am not suggesting the Library Browser initial display of a problem be changed, just its subsequent result of invoking "Try it".]

My main objective is to aid a non-PG_literate instructor get an idea about scope of an algorithmic problem which s/he is considering.
In reply to Dick Lane

Re: "Change Values" button for instructors

by Dick Lane -
I can obtain the desired behavior for problems actually assigned to a course by

a)  having the problem load "PGcourse.pl"

b)  having the course templates/macros/PGcourse.pl contain
    loadMacros( "problemRandomize.pl" ) ;
    ProblemRandomize( when => "Always" , onlyAfterDue => 0 , style => "Button" ) ;

This is being done in my development environment where there are no students.  For a production system, I would append
        if $studentLogin eq "lane"
to the ProblemRandomize(...) command --- perhaps OR'd to enable for any instructor (? what is simplest robust way to do that ?).

The result is a "Get a new version of this problem" button when I view problems in the assignments.

+++++

My 9-June-2010 request is for similar functionality to be available within the Library Browser while problems are being considered for inclusion in an assignment.
In reply to Dick Lane

Re: "Change Values" button for instructors

by Davide Cervone -
I think your approach should work in the Library Browser when you use the View It link, but not in the main listing where there are multiple files shown -- that's because the problem's message area (where the button is placed) is not shown in the Library Browser.

One way to test for a professor is the following:

    if $permissionLevel >= $PRINT_FILE_NAMES_PERMISSION_LEVEL;
since $permissionLevel is the current user's permission level, and PRINT_FILE_NAMES_PERMISSION_LEVEL is usually at least professor level. You might want to use $effectivePermissionLevel rather than $permissionLevel if you want to avoid the re-randomize button when viewing student versions of the problems (so you don't accidentally re-randomize the problem in use by a student).

Davide