Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandatory for multiple language #4

Open
olleharstedt opened this issue Jun 3, 2016 · 9 comments
Open

Mandatory for multiple language #4

olleharstedt opened this issue Jun 3, 2016 · 9 comments

Comments

@olleharstedt
Copy link
Owner

No description provided.

@Shnoulle
Copy link
Contributor

Think same must be apply to "relevance" etc ....

@olleharstedt
Copy link
Owner Author

Yeah, will check.

@Shnoulle
Copy link
Contributor

If you want : i can take it for monday (or this week end) , no problem.

@olleharstedt
Copy link
Owner Author

Please, feel free. Preferably, $question->save() would save mandatory field etc for all languages. Don't know how big change that would be.

@Shnoulle
Copy link
Contributor

Shnoulle commented Jun 17, 2016

You mean fix LimeSurvey core Question model ?

If yes : save() is easily extendable in model, something like:

if (parent::save())
{
  Question::model()->updateAll(
    array('mandatory'=>$this->mandatory,'relevance'=>$this->relevance),
    'qid=:qid and language!=:language',
    array(':qid'=>$this->qid,':language'=>$this->language)
}

code surely broken somewhere

edit != $this->language
edit2 : maybe better in onAfterSave

@olleharstedt
Copy link
Owner Author

Yes, something like that. But what could it break?

@olleharstedt
Copy link
Owner Author

olleharstedt commented Jun 17, 2016

help and question are the only fields in question table that are localized?

olleharstedt added a commit that referenced this issue Jun 17, 2016
@Shnoulle
Copy link
Contributor

Shnoulle commented Jun 17, 2016

Yes, if i don't make error .....

But i thinnk you want to fix LS core :) : it's a good idea too BUT need to remove all double save ....

For code broke : i write it directly in MS editor, then surely lost a ; or a ) or a } somewhere . No ?

@Shnoulle
Copy link
Contributor

Yes : code broken,: i lost the last ); .... before closing {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants