Project

General

Profile

Bug #7524

exercice_pool.php turns &copy_question into @copy_question or %C2%A9_question =>"Re-use a copy inside the current question does not work

Added by Torkil Zachariassen over 4 years ago. Updated over 4 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
Exercises
Target version:
Start date:
12/02/2015
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

While I have not been able to reproduce this behaviour elsewhere, making a copy of a question from one to another course is broken in our installation.

When we try to copy a question from an test in course1 to a test in course2, that is
course2/Tests/course2 test1/Recycle existing questions
the URL on the CD point to
http://example.com/main/exercice/question_pool.php?cidReq=COURSE2&id_session=0&gidReq=0&origin=&selected_course=30&courseCategoryId=0&exerciseId=0&exerciseLevel=-1&answerType=-1&session_id=-1%C2%A9_question=1&course_id=30&fromExercise=1

Notice the "%C2%A9" which is some (html'ished?) garbled version of "&copy" - some browsers see "&copy" as a copyright symbol!!!

The issue was solved by a simple line of sed working on exercice_pool.php:

$ sed -i 's/copy_question/kopy_question/g' question_pool.php

replacing "copy_question" with "kopy_question" everywhere in question_pool.php

A trivial unified patch is attached for your pleasure (copy_question.patch)


Files

copy_question.patch (2 KB) copy_question.patch Torkil Zachariassen, 12/02/2015 01:59

History

#1

Updated by Yannick Warnier over 4 years ago

I guess we should have guessed some browsers would want to do that...
Nice catch!
I would prefer &question_copy than &kopy_qestion though. Now the question is... will any browser convert "&question" into "?" :-p

#2

Updated by Torkil Zachariassen over 4 years ago

The "kopy" is a northern Skandianvian version of 'copy' as our official 'ABC' actually excludes letters like 'cxywz' :-!

#3

Updated by Torkil Zachariassen over 4 years ago

  • Status changed from New to Needs testing
#4

Updated by Yannick Warnier over 4 years ago

  • Status changed from Needs testing to New

I understand that, but we're trying to standardize everything to pure English, so going the other way around won't help.
There are stuff like main/exercices that will have to change to main/exercises, and a series of things like that. It's a progressive work, but we don't want to include things that might require to move backwards afterwards, so we'll have to use &question_copy or &qst_copy to &kopy_qst, as legitimate as it might seem to you (no offense meant at all).

#5

Updated by Yannick Warnier over 4 years ago

  • Status changed from New to Bug resolved
  • % Done changed from 90 to 100

Changes to &question_copy.
I also searched for any other use of a "&copy" in Chamilo 1.10.0 and apparently there is none.

https://github.com/chamilo/chamilo-lms/commit/94c97676088907b52166bf80262280eff8adf789

Also available in: Atom PDF