auto submit event is not i18n

Description

When exam is autosubmitted, event in event log is "No Errors (Auto submit)" when no errors and "Error during auto submit" when error.
These events are not internationalized.

Environment

None

Test Plan

  • Save an exam but not send

  • When exam is autosubmitted, it look event in event log

Attachments

1

Activity

Show:

Mark Golbeck August 28, 2024 at 7:31 PM

Since it's been over two years without any further information provided, we're closing this Jira issue for now. If more details become available in the future, we can reopen it. Thank you.

Joaquín Marqués Alós February 23, 2017 at 2:27 AM
Edited

I've solved it in my github branch.

Solution proposed by Matthew Jones <matthew@longsight.com> in sakai-dev list ([sakai-dev] auto submit event is not i18n):

So I looked at this and I can't 100% tell why it's not working the way you have it. However it's not a good idea to insert i18n'd data into the database as then it will run as the whichever user executed the job, rather than the user viewing the data. So what you want to do is insert your generic string into the database, then do the i18n in the UI which is straightforward. It looks like EventLogData.java in hibernate checks on "No Errors" too so that will need to be fixed. This seems like the only way to do it without checking every language

Then we could just run a conversion script to convert the old text (which would all be in English) over to these new strings.

So like

UPDATE SAM_EVENTLOG_T set ERRORMSG = 'error_auto_submit' where ERRORMSG = 'Error during auto submit';

UPDATE SAM_EVENTLOG_T set ERRORMSG = 'no_error_auto_submit' where ERRORMSG = 'No Errors (Auto submit)';

Joaquín Marqués Alós February 21, 2017 at 4:35 AM

I have tested with bundle folder in samigo-services\src\java\org\sakaiproject\tool\assessment and in java class:

import org.sakaiproject.util.ResourceLoader;
private static ResourceLoader rb = new ResourceLoader("org.sakaiproject.tool.assessment.bundle.messages");
rb.getString("no_error_auto_submit");

but not work.

I have tested with bundle folder in samigo-services\src\ and in java class:

import org.sakaiproject.util.ResourceLoader;
protected static ResourceLoader rb = new ResourceLoader("messages");
rb.getString("no_error_auto_submit");

and add in samigo-services\pom.xml:

<resource>
<directory>${basedir}/src/bundle</directory>
<includes>
<include>*/.properties</include>
</includes>
</resource>

but not work.

Always when start server and access to the portal show this error:

WARN http-apr-8080-exec-1 org.sakaiproject.portal.util.ErrorReporter -
org.sakaiproject.portal.api.PortalHandlerException: java.lang.IllegalStateException: The org.sakaiproject.authz.api.SecurityService.cache Cache is not alive (STATUS_SHUTDOWN)
at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:901)
caused by: java.lang.IllegalStateException: The org.sakaiproject.authz.api.SecurityService.cache Cache is not alive (STATUS_SHUTDOWN)

It is possible to use i18n in samigo-services?

Won't Fix

Details

Assignee

Reporter

Components

Affects versions

Priority

Created February 14, 2017 at 10:01 AM
Updated August 28, 2024 at 7:31 PM
Resolved August 28, 2024 at 7:31 PM