Drop Box name does not change even if the Students account name changes in Site Info or Account
Description
Activity

David Roldán Martínez November 3, 2011 at 1:18 AM
We use this PL/SQL script:
PROCEDURE ACCION_ACTU_NOM_DROPBOX(p_dni IN VARCHAR2,p_nom_origen IN VARCHAR2,p_nom_destino IN VARCHAR2,w_encontrados OUT NUMBER,w_cambiados OUT NUMBER) IS
w_xml clob;
pos NUMBER;
w_blob_text VARCHAR2(32000);
BEGIN
w_encontrados:=0;
w_cambiados:=0;
– Cambiamos aquellos que guardan la información de la carpeta en el XML
– dbms_output.put_line('cod_utf8.p_nom_origen: ' || cod_utf8.to_utf8(p_nom_origen));
– dbms_output.put_line('cod_base64.cod_utf8.p_nom_origen: ' || cod_base64.text_to_base64(cod_utf8.to_utf8(p_nom_origen)));
– dbms_output.put_line('cod_utf8.p_nom_origen: ' || cod_utf8.to_utf8(p_nom_destino));
– dbms_output.put_line('cod_base64.cod_utf8.p_nom_origen: ' || cod_base64.text_to_base64(cod_utf8.to_utf8(p_nom_destino)));
BEGIN
FOR R IN (select collection_id,xml from content_collection where collection_id like '/group-user/%/'||p_dni||'/' and xml is not null) LOOP
w_encontrados:=w_encontrados+1;
w_xml:=r.xml;
pos:=INSTR(w_xml,cod_base64.text_to_base64(cod_utf8.to_utf8(p_nom_origen)));
– dbms_output.put_line(' > collection_id:' || r.collection_id);
– dbms_output.put_line(' > pos:' || pos);
– dbms_output.put_line('-----');
IF pos<>0 THEN
w_cambiados:=w_cambiados+1;
w_xml:=replace(w_xml,cod_base64.text_to_base64(cod_utf8.to_utf8(p_nom_origen)),cod_base64.text_to_base64(cod_utf8.to_utf8(p_nom_destino)));
update content_collection set xml=w_xml where collection_id=r.collection_id;
COMMIT;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS THEN dbms_output.put_line('Error:' ||SQLERRM);
END;
– dbms_output.put_line(' > w_encontrados:' || w_encontrados);
– Cambiamos aquellos registros en los que la información está en el campo BINARY_ENTITY
BEGIN
FOR k IN (select collection_id, binary_entity from content_collection where collection_id like '/group-user/%/'||p_dni||'/' and binary_entity is not null) LOOP
w_encontrados:=w_encontrados+1;
w_blob_text := UTL_RAW.CAST_TO_VARCHAR2( k.binary_entity );
pos:=instr(w_blob_text,cod_utf8.to_utf8(p_nom_origen));
--dbms_output.put_line(' > collection_id:' || k.collection_id);
IF pos<>0 THEN
w_cambiados:=w_cambiados+1;
--dbms_output.put_line(' > pos:' || pos);
--dbms_output.put_line(' > w_blob_text (1):' || w_blob_text);
w_blob_text:=replace(w_blob_text,cod_utf8.to_utf8(p_nom_origen),cod_utf8.to_utf8(p_nom_destino));
--dbms_output.put_line(' > w_blob_text (2):' || w_blob_text);
update content_collection set binary_entity=utl_raw.cast_to_raw(w_blob_text) where collection_id=k.collection_id;
COMMIT;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS THEN dbms_output.put_line('Error:' ||SQLERRM);
END;
– dbms_output.put_line(' > w_encontrados:' || w_encontrados);
END;
If anybody finds any issue with it and/or knows how to improve it, please, report it in this ticket.
Thanks!!!

Aaron Zeckoski July 6, 2010 at 1:28 AM
The solution for this is not well known. Most likely it would involve attempting to compare the dropbox folder name to the user name and then hoping that the names could be correctly compared and updated if needed. This would not be desirable for everyone though and so it would have to be possible to retain the current behavior and also possible to enable it on a site by site basis. This is also an edge case.
Because of these reason the MT will not fix this issue. Please feel free to submit a patch for this issue and we will review it. Contact QA manager if you have questions.

David Horwitz January 25, 2010 at 4:56 AM
MAINTANCE TEAM: Unassigned so these get reviewed by the Maintance Team

Peter Knoop January 9, 2008 at 12:19 PM
[Bulk Comment] This issue had 2.5 as a Target Version, however, the issu has not been updated since 01 December 2007. For now its Target Version is being rest to know, but please update this field when you have a new estimate of when you tentatively plan to address the issue.
If a student is added to a site under a name and that name is changed by admin (changes appear in Site Info), the drop box associated with that user will retain the name that was used when the student was originally added during site creation or when the student was added to the site before the name change was made.