[LON-CAPA-admin] No Cloning for ...

Stuart Raeburn raeburn at msu.edu
Fri Jun 18 21:56:18 EDT 2010


Mark,

The presence of records such as:

ohiou_415919d76334171oucapa2 = TA Orientation Fall 2004::lucas:1125627177

is surprising. This legacy format for a specific courseID gets  
replaced with the newer (more flexible) frozen hash format when either:

(a) Something is changed in the data stored for the particular  
courseID, e.g., you change the course description from "TA Orientation  
Fall 2004" to "TA Orientation -- Fall 2004" via "Modify Course  
Configuration", or

(b) /home/httpd/perl/refresh_courseids_db.pl is run

The fact that this format persists suggests that cron is not running  
the script.  What do you find in the logs, e.g.,

/home/httpd/perl/logs/refreshcourseids_db.log

If the logs suggest that cron is not running the script, then you  
could try running from the command line as the www user

su www
/home/httpd/perl/refresh_courseids_db.pl


> ohiou_219354186a7f44476oucapa2 = TA Orientation Fall   
> 2006::lucas:ohiou:Course:11
> 88595973

> Note that the 2004 course does not list the domain.
> The 2006 course does, but possibly because I re-added myself as a   
> course coordinator last night.
>
> When I re-added myself as CC, I was then allowed to select the course.

Between 2004 and 2006 the course owner, as stored in  
nohist_courseids.db, was changed from just username to  
username:domain.  Re-activating the course coordinator role would not  
have had an impact on the format used to store the course owner, but  
would have allowed cloning, as active CCs automatically receive rights  
to clone a course.

The same is true of a course owner (starting with 2.9.0).  Support for  
legacy courses in which the course owner is only identified by a  
username instead of username:domain was included (but is  
non-functional in 2.9.0 without the one line change in lond rev 1.444  
- not in 2.9.0).

Regardless, /home/http/perl/refresh_courseids_db.pl will convert  
legacy formats and under-specified course owners to the uname:udom  
format in a frozen hash, so that issue should no longer apply.

The one circumstance where this does not occur is when the course  
owner's domain is not the same domain as the course's domain, and the  
owner was stored as just username (prior to LON-CAPA 2.2.0).

I remain puzzled why the single line format has not been replaced by  
the frozen hash, by nightly execution of  
/home/httpd/perl/refresh_courseids_db.pl.

A successful run of /home/httpd/perl/refresh_courseids_db.pl should  
allow pre-2006 courses owned by lucas to be cloneable by lucas:ohiou.

Alternatively, you could also just try changing titles for the  
courses, then changing back, so as to force update of the form in  
nohist_courseids.db. In that case you would not need to change lond or  
lonpickcourse.pm.

Stuart Raeburn
MSU LON-CAPA group


Quoting Mark Lucas <lucasm at ohio.edu>:

> Stuart,
>
> On Jun 17, 2010, at 11:37 PM, Stuart Raeburn wrote:
>
>> Mark,
>>
>> Some things to check:
>>
>> 1. Is there an entry for /home/httpd/perl/refresh_courseids_db.pl   
>> in /etc/cron.d/loncapa on the library server?
> Yes
>>
>> 2. What does ls -al /home/httpd/lonUsers/ohiou/nohist_courseids.db   
>> on the library server report as the last update for this file?
> .db June 18, lock and old files June 12
>
>>
>> 3. What is reported by:
>> /home/httpd/perl/debug/dump_db.pl -u nohist_courseids.db
>> for the owner key for each of the pre-2007 courses which are   
>> reported as "No cloning for lucas:ohiou"?
> Looking at a string of TA orientation courses:
> All courses seem to be owned by me. Some courses (older) are listed   
> as a single line, colon separated, in the dump.
> Newer courses are listed as a record:
>
>
> ohiou_219354186a7f44476oucapa2 = TA Orientation Fall   
> 2006::lucas:ohiou:Course:11
> 88595973
>
> ohiou_1v298166f2c984a68oucapa2 = $VAR1 = {
>           'owner' => 'lucas:ohiou',
>           'type' => 'Course',
>           'description' => 'TA Orientation Fall 2009',
>           'inst_code' => ''
>         };
>
> ohiou_415919d76334171oucapa2 = TA Orientation Fall 2004::lucas:1125627177
>
> Note that the 2004 course does not list the domain.
> The 2006 course does, but possibly because I re-added myself as a   
> course coordinator last night.
>
> When I re-added myself as CC, I was then allowed to select the course.
>
> Looking through, though, all the files for the professor in question  
>  have ohiou in addition to the username
>
>> 4. If, as DC, you select each of these courses using   
>> /adm/modifycourse  and use
>> "View/Modify course owner, institutional code, and default   
>> authentication" who is listed as the owner?
> Courses before 2006 for TA orientation do not list an owner, but   
> that may be because I revoked my role as CC
>
> All but one of the courses in question for Professor X has the   
> professor listed as Owner.
>
> I need to run off to an all-day meeting. I'll check in when I can.
>
> Mark
>> Stuart Raeburn
>> MSU LON-CAPA group
>>
>>
>> Quoting Mark Lucas <lucasm at ohio.edu>:
>>
>>> Hi,
>>>
>>> We're looking to clone courses for Summer under 2.9.0.
>>>
>>> When I do a search of courses owned by lucas, it comes up with a    
>>> list - part of which
>>> (but not all) "No cloning for lucas:ohiou"
>>> Many of these "unclonables" are older (earlier than 2007).
>>>
>>> Any clue what the deal is?
>>>
>>> Mark
>>> --
>>> Mark Lucas
>>
>>
>> _______________________________________________
>> LON-CAPA-admin mailing list
>> LON-CAPA-admin at mail.lon-capa.org
>> http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin
>
> --
> Mark Lucas 								email: lucasm at ohiou.edu
> 252D Clippinger Lab						phone: (740)597-2984
> Department of Physics and Astronomy		fax: (740)593-0433
> Ohio University
> Athens, OH 45701






More information about the LON-CAPA-admin mailing list