Issue Details (XML | Word | Printable)

Key: MDL-14128
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Dongsheng Cai
Reporter: Dongsheng Cai
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-14085

Move all current uses of error(get_string('xxxx')) to a proper use of print_error() 1.9 and HEAD

Created: 01/Apr/08 11:55 AM   Updated: 20/Apr/08 06:42 AM
Return to search
Component/s: General
Affects Version/s: 1.9
Fix Version/s: 1.9.1

Participants: Dongsheng Cai, Eloy Lafuente (stronk7), Martin Dougiamas and Petr Skoda
Security Level: None
QA Assignee: Eloy Lafuente (stronk7)
Resolved date: 15/Apr/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dongsheng Cai committed 83 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 02/Apr/08 02:09 PM
MDL-14128, remove all uses of error(get_string())
MODIFY mod/hotpot/report.php   Rev. 1.38.2.9    (+2 -2 lines)
MODIFY admin/report/courseoverview/index.php   Rev. 1.16.4.2    (+1 -1 lines)
MODIFY mod/glossary/edit.php   Rev. 1.76.2.2    (+4 -4 lines)
MODIFY blocks/admin_bookmarks/delete.php   Rev. 1.9.2.2    (+5 -5 lines)
MODIFY course/import/groups/index.php   Rev. 1.14.2.1    (+8 -7 lines)
MODIFY admin/block.php   Rev. 1.18.4.2    (+2 -2 lines)
MODIFY course/report/stats/lib.php   Rev. 1.6.6.1    (+1 -1 lines)
MODIFY search/indexersplash.php   Rev. 1.9.2.2    (+2 -2 lines)
MODIFY course/delete.php   Rev. 1.29.2.1    (+2 -2 lines)
MODIFY mod/hotpot/grade.php   Rev. 1.1.2.4    (+1 -1 lines)
MODIFY course/editcategory.php   Rev. 1.3.2.3    (+1 -1 lines)
MODIFY course/report/stats/report.php   Rev. 1.17.2.3    (+1 -1 lines)
MODIFY admin/report/courseoverview/reportsgraph.php   Rev. 1.8.2.2    (+2 -2 lines)
MODIFY user/Attic/pixgroup.php   Rev. 1.7.8.1    (+2 -2 lines)
MODIFY mod/resource/type/ims/Attic/deploy.php   Rev. 1.24.2.2    (+3 -3 lines)
MODIFY admin/langimport.php   Rev. 1.36.2.7    (+5 -5 lines)
MODIFY search/query.php   Rev. 1.16.2.3    (+2 -2 lines)
MODIFY auth/shibboleth/index.php   Rev. 1.15.2.2    (+4 -4 lines)
MODIFY tag/edit.php   Rev. 1.5.2.17    (+2 -2 lines)
MODIFY enrol/authorize/locallib.php   Rev. 1.54.2.3    (+6 -6 lines)
MODIFY blog/edit.php   Rev. 1.49.2.10    (+4 -4 lines)
MODIFY file.php   Rev. 1.46.2.1    (+2 -2 lines)
MODIFY blocks/rss_client/Attic/block_rss_client_action.php   Rev. 1.54.2.3    (+11 -9 lines)
MODIFY login/forgot_password.php   Rev. 1.45.2.2    (+3 -3 lines)
MODIFY mod/forum/lib.php   Rev. 1.609.2.45    (+2 -2 lines)
MODIFY tag/index.php   Rev. 1.16.2.12    (+2 -2 lines)
MODIFY admin/enrol.php   Rev. 1.30.4.1    (+3 -3 lines)
MODIFY course/pending.php   Rev. 1.11.2.2    (+2 -2 lines)
MODIFY mod/scorm/lib.php   Rev. 1.87.2.7    (+2 -2 lines)
MODIFY login/confirm.php   Rev. 1.29.2.1    (+2 -2 lines)
MODIFY mod/wiki/admin.php   Rev. 1.30.2.2    (+3 -3 lines)
MODIFY question/category_class.php   Rev. 1.32.2.3    (+3 -3 lines)
MODIFY auth/shibboleth/auth.php   Rev. 1.13.2.2    (+1 -1 lines)
MODIFY admin/mnet/enr_course_enrol.php   Rev. 1.8.4.2    (+2 -2 lines)
MODIFY search/add.php   Rev. 1.5.2.2    (+3 -3 lines)
MODIFY search/indexer.php   Rev. 1.13.2.3    (+3 -3 lines)
MODIFY mod/quiz/Attic/quizfile.php   Rev. 1.16.10.2    (+2 -2 lines)
MODIFY course/user.php   Rev. 1.75.2.8    (+3 -3 lines)
MODIFY tag/manage.php   Rev. 1.7.2.7    (+2 -2 lines)
MODIFY admin/mnet/access_control.php   Rev. 1.14.4.4    (+6 -6 lines)
MODIFY mod/hotpot/attempt.php   Rev. 1.18.2.3    (+3 -3 lines)
MODIFY course/report/participation/index.php   Rev. 1.20.2.4    (+2 -2 lines)
MODIFY mod/data/edit.php   Rev. 1.32.2.2    (+3 -3 lines)
MODIFY mod/quiz/attempt.php   Rev. 1.131.2.7    (+8 -8 lines)
MODIFY search/delete.php   Rev. 1.6.2.2    (+3 -3 lines)
MODIFY admin/auth.php   Rev. 1.63.2.3    (+3 -3 lines)
MODIFY admin/uploaduser.php   Rev. 1.68.2.11    (+2 -2 lines)
MODIFY user/view.php   Rev. 1.168.2.12    (+2 -2 lines)
MODIFY mod/quiz/reviewquestion.php   Rev. 1.16.10.5    (+4 -4 lines)
MODIFY admin/Attic/module.php   Rev. 1.25.4.3    (+2 -2 lines)
MODIFY lib/adminlib.php   Rev. 1.153.2.46    (+3 -3 lines)
MODIFY mod/chat/gui_header_js/users.php   Rev. 1.13.2.2    (+2 -2 lines)
MODIFY admin/enrol_config.php   Rev. 1.15.4.1    (+2 -2 lines)
MODIFY search/update.php   Rev. 1.5.2.2    (+3 -3 lines)
MODIFY mod/forum/subscribe.php   Rev. 1.37.2.6    (+2 -2 lines)
MODIFY admin/register.php   Rev. 1.25.2.1    (+2 -2 lines)
MODIFY tag/tag_autocomplete.php   Rev. 1.3.2.7    (+2 -2 lines)
MODIFY auth/mnet/auth.php   Rev. 1.27.2.5    (+11 -11 lines)
MODIFY blocks/admin_bookmarks/create.php   Rev. 1.9.2.3    (+4 -4 lines)
MODIFY admin/mnet/peers.php   Rev. 1.14.2.2    (+10 -9 lines)
MODIFY lib/editor/htmlarea/Attic/coursefiles.php   Rev. 1.13.8.1    (+3 -3 lines)
MODIFY search/stats.php   Rev. 1.11.2.1    (+1 -1 lines)
MODIFY admin/mnet/enr_courses.php   Rev. 1.8.4.2    (+2 -2 lines)
MODIFY enrol/authorize/enrol.php   Rev. 1.135.2.6    (+2 -2 lines)
MODIFY course/category.php   Rev. 1.119.2.6    (+2 -2 lines)
MODIFY admin/lang.php   Rev. 1.106.2.5    (+3 -3 lines)
MODIFY lib/moodlelib.php   Rev. 1.960.2.69    (+7 -7 lines)
MODIFY question/file.php   Rev. 1.4.2.1    (+1 -1 lines)
MODIFY files/index.php   Rev. 1.121.2.3    (+3 -3 lines)
MODIFY course/info.php   Rev. 1.17.2.6    (+2 -2 lines)
MODIFY admin/settings.php   Rev. 1.40.2.4    (+3 -3 lines)
MODIFY question/import.php   Rev. 1.46.2.2    (+4 -4 lines)
MODIFY question/editlib.php   Rev. 1.76.2.6    (+2 -2 lines)
MODIFY mod/hotpot/review.php   Rev. 1.17.2.4    (+4 -4 lines)
MODIFY tag/search.php   Rev. 1.5.2.8    (+1 -1 lines)
MODIFY mod/forum/post.php   Rev. 1.154.2.8    (+9 -9 lines)
MODIFY mnet/lib.php   Rev. 1.16.2.2    (+3 -3 lines)
MODIFY login/change_password.php   Rev. 1.62.2.1    (+3 -3 lines)
MODIFY question/preview.php   Rev. 1.23.2.3    (+3 -3 lines)
MODIFY mod/workshop/Attic/submissions.php   Rev. 1.60.2.2    (+2 -2 lines)
MODIFY mod/assignment/type/online/assignment.class.php   Rev. 1.46.2.5    (+2 -2 lines)
MODIFY lib/componentlib.class.php   Rev. 1.7.2.6    (+3 -3 lines)
MODIFY mod/chat/gui_basic/index.php   Rev. 1.4.2.1    (+2 -2 lines)
Dongsheng Cai committed 81 files to 'Moodle CVS' - 02/Apr/08 03:17 PM
MDL-14128, remove all error(getstring()) to print_error()
MODIFY question/category_class.php   Rev. 1.34    (+3 -3 lines)
MODIFY course/pending.php   Rev. 1.14    (+2 -2 lines)
MODIFY mod/quiz/Attic/quizfile.php   Rev. 1.17    (+2 -2 lines)
MODIFY lib/adminlib.php   Rev. 1.199    (+3 -3 lines)
MODIFY login/forgot_password.php   Rev. 1.47    (+2 -2 lines)
MODIFY question/file.php   Rev. 1.5    (+1 -1 lines)
MODIFY enrol/authorize/enrol.php   Rev. 2.15    (+2 -2 lines)
MODIFY course/category.php   Rev. 1.125    (+2 -2 lines)
MODIFY blog/edit.php   Rev. 1.59    (+4 -4 lines)
MODIFY admin/auth.php   Rev. 1.66    (+3 -3 lines)
MODIFY admin/mnet/access_control.php   Rev. 1.16    (+6 -6 lines)
MODIFY mod/forum/lib.php   Rev. 1.654    (+2 -2 lines)
MODIFY mod/hotpot/review.php   Rev. 1.19    (+3 -3 lines)
MODIFY search/query.php   Rev. 1.20    (+2 -2 lines)
MODIFY mod/resource/type/ims/Attic/deploy.php   Rev. 1.26    (+3 -3 lines)
MODIFY mod/hotpot/attempt.php   Rev. 1.19    (+2 -2 lines)
MODIFY course/editcategory.php   Rev. 1.6    (+1 -1 lines)
MODIFY user/view.php   Rev. 1.180    (+1 -1 lines)
MODIFY admin/mnet/enr_courses.php   Rev. 1.10    (+2 -2 lines)
MODIFY login/change_password.php   Rev. 1.63    (+3 -3 lines)
MODIFY lib/editor/htmlarea/Attic/coursefiles.php   Rev. 1.14    (+3 -3 lines)
MODIFY course/report/stats/report.php   Rev. 1.20    (+1 -1 lines)
MODIFY admin/lang.php   Rev. 1.112    (+3 -3 lines)
MODIFY search/indexer.php   Rev. 1.18    (+3 -3 lines)
MODIFY tag/manage.php   Rev. 1.14    (+2 -2 lines)
MODIFY admin/register.php   Rev. 1.26    (+2 -2 lines)
MODIFY auth/mnet/auth.php   Rev. 1.32    (+10 -10 lines)
MODIFY admin/settings.php   Rev. 1.44    (+3 -3 lines)
MODIFY mod/workshop/Attic/submissions.php   Rev. 1.62    (+2 -2 lines)
MODIFY auth/shibboleth/auth.php   Rev. 1.15    (+1 -1 lines)
MODIFY lib/componentlib.class.php   Rev. 1.13    (+2 -2 lines)
MODIFY user/Attic/pixgroup.php   Rev. 1.8    (+2 -2 lines)
MODIFY question/import.php   Rev. 1.47    (+4 -4 lines)
MODIFY course/report/stats/lib.php   Rev. 1.7    (+1 -1 lines)
MODIFY auth/shibboleth/index.php   Rev. 1.17    (+4 -4 lines)
MODIFY course/user.php   Rev. 1.83    (+3 -3 lines)
MODIFY tag/edit.php   Rev. 1.22    (+2 -2 lines)
MODIFY course/import/groups/index.php   Rev. 1.15    (+8 -7 lines)
MODIFY tag/tag_autocomplete.php   Rev. 1.9    (+2 -2 lines)
MODIFY login/confirm.php   Rev. 1.30    (+2 -2 lines)
MODIFY mod/chat/gui_basic/index.php   Rev. 1.5    (+2 -2 lines)
MODIFY mod/assignment/type/online/assignment.class.php   Rev. 1.51    (+2 -2 lines)
MODIFY question/editlib.php   Rev. 1.81    (+2 -2 lines)
MODIFY mod/quiz/reviewquestion.php   Rev. 1.21    (+4 -4 lines)
MODIFY mod/forum/post.php   Rev. 1.162    (+9 -9 lines)
MODIFY search/update.php   Rev. 1.8    (+3 -3 lines)
MODIFY tag/search.php   Rev. 1.13    (+1 -1 lines)
MODIFY blocks/rss_client/Attic/block_rss_client_action.php   Rev. 1.57    (+9 -7 lines)
MODIFY tag/index.php   Rev. 1.27    (+2 -2 lines)
MODIFY admin/report/courseoverview/reportsgraph.php   Rev. 1.10    (+2 -2 lines)
MODIFY mod/forum/subscribe.php   Rev. 1.43    (+2 -2 lines)
MODIFY blocks/admin_bookmarks/delete.php   Rev. 1.11    (+5 -5 lines)
MODIFY admin/uploaduser.php   Rev. 1.81    (+2 -2 lines)
MODIFY search/indexersplash.php   Rev. 1.12    (+3 -3 lines)
MODIFY admin/Attic/module.php   Rev. 1.28    (+1 -1 lines)
MODIFY course/info.php   Rev. 1.22    (+2 -2 lines)
MODIFY search/add.php   Rev. 1.8    (+3 -3 lines)
MODIFY search/delete.php   Rev. 1.9    (+3 -3 lines)
MODIFY mod/data/edit.php   Rev. 1.34    (+3 -3 lines)
MODIFY admin/mnet/enr_course_enrol.php   Rev. 1.10    (+2 -2 lines)
MODIFY course/delete.php   Rev. 1.30    (+2 -2 lines)
MODIFY mod/glossary/edit.php   Rev. 1.78    (+4 -4 lines)
MODIFY course/report/participation/index.php   Rev. 1.24    (+2 -2 lines)
MODIFY question/preview.php   Rev. 1.25    (+3 -3 lines)
MODIFY admin/enrol.php   Rev. 1.31    (+3 -3 lines)
MODIFY files/index.php   Rev. 1.124    (+3 -3 lines)
DEL lib/adodb/tests/Attic/tmssql.php   Rev. 1.10    (+0 -0 lines)
MODIFY admin/enrol_config.php   Rev. 1.16    (+2 -2 lines)
MODIFY file.php   Rev. 1.47    (+2 -2 lines)
MODIFY admin/block.php   Rev. 1.20    (+2 -2 lines)
MODIFY mod/scorm/lib.php   Rev. 1.94    (+2 -2 lines)
MODIFY admin/report/courseoverview/index.php   Rev. 1.18    (+1 -1 lines)
MODIFY mnet/lib.php   Rev. 1.19    (+3 -3 lines)
MODIFY mod/chat/gui_header_js/users.php   Rev. 1.15    (+2 -2 lines)
MODIFY admin/mnet/peers.php   Rev. 1.17    (+10 -9 lines)
MODIFY search/stats.php   Rev. 1.14    (+2 -2 lines)
DEL theme/custom_corners/Attic/temp_user_styles.css   Rev. 1.2    (+0 -0 lines)
MODIFY lib/moodlelib.php   Rev. 1.1027    (+5 -5 lines)
MODIFY mod/wiki/admin.php   Rev. 1.32    (+3 -3 lines)
DEL lib/pear/Attic/System.php   Rev. 1.2    (+0 -0 lines)
MODIFY blocks/admin_bookmarks/create.php   Rev. 1.12    (+4 -4 lines)
Eloy Lafuente (stronk7) made changes - 02/Apr/08 06:35 PM
Field Original Value New Value
Fix Version/s 2.0 [ 10122 ]
Fix Version/s 1.9.2 [ 10241 ]
Eloy Lafuente (stronk7) added a comment - 07/Apr/08 08:43 AM
Hi Cai, two comments about the tracker:

1) We use to put only one release for each branch both in the "affects versions" and "fix versions". So I guess the correct ones for this should be:

affects versions: 1.9, 2.0 (HEAD)
fix versions: 1.9.1, 2.0 (HEAD)

But, generally, for something fixed in a branch (1.9) we don't use to include HEAD (2.0). It's supposed that we always merge changes there, so finally I'd leave this as:

affects versions: 1.9
fix versions: 1.9.1

And will use the 2.0 for things coming exclusively in 2.0.

Just an explanation. Ciao

P.S.: Of course, once you have resolved one bug you should mark it as resolved (fixed) to allow it to be reviewed on weekly reviews.


Dongsheng Cai added a comment - 07/Apr/08 11:30 AM
Thanks Eloy

Petr Skoda added a comment - 07/Apr/08 07:57 PM - edited
regressions - please fix before end of Teasday review:
1/
  • error(get_string("invalidpubkey", 'mnet') . $errmsg ,'peers.php?step=update&hostid='.$mnet_peer->id);
    + //error(get_string("invalidpubkey", 'mnet') . $errmsg ,'peers.php?step=update&hostid='.$mnet_peer->id);
    + print_error("invalidpubkey", 'mnet', 'peers.php?step=update&hostid='.$mnet_peer->id, $errmsg);

2/

  • error(get_string('noguestpost', 'forum').
  • ' You are not allowed to make modifications to this RSS feed at this time.',
  • $referrer);

+ //print_error(get_string('noguestpost', 'forum').
+ // ' You are not allowed to make modifications to this RSS feed at this time.',
+ // $referrer);
+ print_error('noguestpost', 'forum', $referrer, 'You are not allowed to make modifications to this RSS feed at this time.');

}

3/

  • error(get_string('noguestpost', 'forum').
  • ' You are not allowed to make modifications to this RSS feed at this time.',
  • $referrer);

+ //print_error(get_string('noguestpost', 'forum').
+ // ' You are not allowed to make modifications to this RSS feed at this time.',
+ // $referrer);
+ print_error('noguestpost', 'forum', $referrer, 'You are not allowed to make modifications to this RSS feed at this time.');

4/

  • error(get_string('missingfield', 'error', $name). " ".
  • get_string('erroronline', 'error', $linenum) .". ".
  • get_string('processingstops', 'error'),
  • 'uploaduser.php?sesskey='.$USER->sesskey);

+ //error(get_string('missingfield', 'error', $name). " ".
+ // get_string('erroronline', 'error', $linenum) .". ".
+ // get_string('processingstops', 'error'),
+ // 'uploaduser.php?sesskey='.$USER->sesskey);
+ print_error('missingfield', 'error', 'uploaduser.php?sesskey='.$USER->sesskey, $name);


Martin Dougiamas added a comment - 08/Apr/08 11:16 AM - edited
1) Ah, I see the append now (looked like a comma). OK, yes revert

2 and 3) Needs a whole new string yes (in lang/en_utf8/forum.php)

4) yeah this is wierd, should be reverted


Dongsheng Cai committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 09/Apr/08 11:03 AM
MDL-14128, cannot use a full string in the param.
MODIFY question/format.php   Rev. 1.35.2.6    (+2 -2 lines)
Dongsheng Cai made changes - 15/Apr/08 10:04 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Dongsheng Cai added a comment - 15/Apr/08 10:20 AM

Eloy Lafuente (stronk7) added a comment - 16/Apr/08 07:00 AM
Revert confirmed. Closing.

Eloy Lafuente (stronk7) made changes - 16/Apr/08 07:00 AM
QA Assignee stronk7
Status Resolved [ 5 ] Closed [ 6 ]
Petr Skoda made changes - 20/Apr/08 06:42 AM
Affects Version/s 1.9.1 [ 10240 ]
Affects Version/s 2.0 [ 10122 ]