Moodle

Show last edited question on the question bank page

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: 1.9.7
  • Component/s: Questions
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

When doing batch jobs (usually in some category) on editing similar questions it's quite helpful to see what question you last edited when you select the next. Unfortunately question name is far away even when you save the question.

Suggested solution includes:
A) (Tim) Higlight this question in the question list - probably the best one...
B) write a message with question name before question list

Activity

Hide
Oleg Sychev added a comment -

Tim, could you suggest an existing class (style) that can be used for highlighting last saved question? Or, failing that, some guidlines how you want to see it. I'm in no way designer, so may come to strange conclusions there...

Show
Oleg Sychev added a comment - Tim, could you suggest an existing class (style) that can be used for highlighting last saved question? Or, failing that, some guidlines how you want to see it. I'm in no way designer, so may come to strange conclusions there...
Hide
Tim Hunt added a comment -

I can't think of an existing class to reuse. How about class="lastedited". I would just give it a pale grey background.

Show
Tim Hunt added a comment - I can't think of an existing class to reuse. How about class="lastedited". I would just give it a pale grey background.
Hide
Oleg Sychev added a comment -

Does adding new class mean that this change would be 2.0 only? That would be a sad thing...

The only existing class I can think of is a class with green background used to highlight correct choices when reviewing multichoice question. Don't know if you think it's OK to use such class there.

Show
Oleg Sychev added a comment - Does adding new class mean that this change would be 2.0 only? That would be a sad thing... The only existing class I can think of is a class with green background used to highlight correct choices when reviewing multichoice question. Don't know if you think it's OK to use such class there.
Hide
Tim Hunt added a comment -

No, no problem with this in 1.9. Adding a new class="" to the HTML is not going to break things for anyone.

Show
Tim Hunt added a comment - No, no problem with this in 1.9. Adding a new class="" to the HTML is not going to break things for anyone.
Hide
Oleg Sychev added a comment -

I'm sorry for a long pause - I'm still quite busy on the main work.

I suppose I should add class "lastchanged" and optional argument with similar name and id of the saved question to the questionbank.
The questions are:
1) should "lastchanged" class be added to the question styles or core styles? other parts of the Moodle may end up with similar highlighting
2) in the case 1) is core, pale grey often used in tables to visually distinguish rows, so we probably should use another color

Show
Oleg Sychev added a comment - I'm sorry for a long pause - I'm still quite busy on the main work. I suppose I should add class "lastchanged" and optional argument with similar name and id of the saved question to the questionbank. The questions are: 1) should "lastchanged" class be added to the question styles or core styles? other parts of the Moodle may end up with similar highlighting 2) in the case 1) is core, pale grey often used in tables to visually distinguish rows, so we probably should use another color
Hide
Tim Hunt added a comment -

I think it should be a core style. And just pick a colour that looks good to you, other people don't like it, they can changeit And your idea about an optional argument is the right way to do this.

Show
Tim Hunt added a comment - I think it should be a core style. And just pick a colour that looks good to you, other people don't like it, they can changeit And your idea about an optional argument is the right way to do this.
Hide
Oleg Sychev added a comment -

I finally could scrap up some time and write an (actually simple) patch for 1.9. Please review/commit.

Looking at core styles I found style 'highlight' and that probably supposed to be used in such situations, so here it is.

Show
Oleg Sychev added a comment - I finally could scrap up some time and write an (actually simple) patch for 1.9. Please review/commit. Looking at core styles I found style 'highlight' and that probably supposed to be used in such situations, so here it is.
Hide
Tim Hunt added a comment -

Thanks Oleg. Merged to Moodle 2.0 and committed.

Show
Tim Hunt added a comment - Thanks Oleg. Merged to Moodle 2.0 and committed.
Hide
Oleg Sychev added a comment -

Thanks, Tim.

Are you sure that 2.0 merge is working?
in editlib.php I didn't see any use of $nameclasss in function get_row_classes after it get a value
Maybe it should have something with $classes array?

Show
Oleg Sychev added a comment - Thanks, Tim. Are you sure that 2.0 merge is working? in editlib.php I didn't see any use of $nameclasss in function get_row_classes after it get a value Maybe it should have something with $classes array?
Hide
Sam Hemelryk added a comment -

Thanks Oleg for spotting that merge error
I have just commited a change to fix, you were correct in that it did need to be in the $classes array rather than $namespace

Show
Sam Hemelryk added a comment - Thanks Oleg for spotting that merge error I have just commited a change to fix, you were correct in that it did need to be in the $classes array rather than $namespace
Hide
Sam Hemelryk added a comment -

Tested and tested again, all functional. Thanks guys

Show
Sam Hemelryk added a comment - Tested and tested again, all functional. Thanks guys
Hide
Oleg Sychev added a comment -

In practice I found out that on pressing "cancel" button question should be highlighted too (so you still know you place even if you don't edit the question). I'm going to add a patch for that. Patch can be applied for both 1.9 and 2.0 since code managing "cancel" button doesn't changed.

Show
Oleg Sychev added a comment - In practice I found out that on pressing "cancel" button question should be highlighted too (so you still know you place even if you don't edit the question). I'm going to add a patch for that. Patch can be applied for both 1.9 and 2.0 since code managing "cancel" button doesn't changed.
Hide
Tim Hunt added a comment -

Adittional patch committed.

Show
Tim Hunt added a comment - Adittional patch committed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: